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>
#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)
{
{
u32 class_id = 0;
int i;
- void *cpuva;
+ void *cpuva = NULL;
/* push user gathers */
for (i = 0 ; i < job->num_gathers; i++) {
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,