]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: host: map command buffer if tracing is enabled
authorDeepak Nibade <dnibade@nvidia.com>
Mon, 23 Jun 2014 06:18:06 +0000 (11:48 +0530)
committerEmad Mir <emir@nvidia.com>
Wed, 25 Jun 2014 18:21:11 +0000 (11:21 -0700)
Map the command buffer only if tracing is enabled.
Buffer mapping is required only for command tracing
otherwise there is no need to map.

Change-Id: If433e1dec78322f415b2f5370d1a6e7b2346c4e9
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/427020
(cherry picked from commit e42b2925ca54e8a27a833d1008318a095a18f1e6)
Reviewed-on: http://git-master/r/427655
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
drivers/video/tegra/host/host1x/host1x_channel.c

index c182c1d7936032e43919c22138263345a70727c4..46f319ea83f67d4e1c857a727fd4a9a5a6a7b64e 100644 (file)
@@ -31,6 +31,7 @@
 #include "nvhost_hwctx.h"
 #include "nvhost_intr.h"
 #include "class_ids.h"
+#include "debug.h"
 
 static void sync_waitbases(struct nvhost_channel *ch, u32 syncpt_val)
 {
@@ -247,7 +248,7 @@ static void submit_gathers(struct nvhost_job *job)
 {
        u32 class_id = 0;
        int i;
-       void *cpuva;
+       void *cpuva = NULL;
 
        /* push user gathers */
        for (i = 0 ; i < job->num_gathers; i++) {
@@ -276,7 +277,8 @@ static void submit_gathers(struct nvhost_job *job)
                        op1 = nvhost_opcode_gather(g->words);
                op2 = job->gathers[i].mem_base + g->offset;
 
-               cpuva = dma_buf_vmap(g->buf);
+               if (nvhost_debug_trace_cmdbuf)
+                       cpuva = dma_buf_vmap(g->buf);
                nvhost_cdma_push_gather(&job->ch->cdma,
                                cpuva,
                                job->gathers[i].mem_base,