summaryrefslogtreecommitdiff
path: root/drivers/video/tegra
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2014-06-23 11:48:06 +0530
committerEmad Mir <emir@nvidia.com>2014-06-25 11:21:11 -0700
commit66f03b7272d21a418f4b42d6affc008b19c968e9 (patch)
tree30d2df1c22312c0a81773ccff294d9ce79480893 /drivers/video/tegra
parentea4c50fc6407abca05983b3b06cc56951efc8593 (diff)
video: tegra: host: map command buffer if tracing is enabled
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>
Diffstat (limited to 'drivers/video/tegra')
-rw-r--r--drivers/video/tegra/host/host1x/host1x_channel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/video/tegra/host/host1x/host1x_channel.c b/drivers/video/tegra/host/host1x/host1x_channel.c
index c182c1d79360..46f319ea83f6 100644
--- a/drivers/video/tegra/host/host1x/host1x_channel.c
+++ b/drivers/video/tegra/host/host1x/host1x_channel.c
@@ -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,