From 9357086cee7f11de57f37447ce068c59eebcd411 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Mon, 9 May 2016 14:13:13 -0700 Subject: gpu: nvgpu: Skip ctxsw trace init if not supported Skip initialization of ctxsw tracing if it's not supported for that chip. Change-Id: I5197295c2a5d0f039347e1784137b3fd99894dc7 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1143837 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Thomas Fleury GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/gpu') diff --git a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c index 6a61d744..04109df0 100644 --- a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c @@ -490,6 +490,10 @@ int gk20a_ctxsw_trace_init(struct gk20a *g) gk20a_dbg(gpu_dbg_fn|gpu_dbg_ctxsw, "g=%p trace=%p", g, trace); + /* if tracing is not supported, skip this */ + if (!g->ops.fecs_trace.init) + return 0; + if (likely(trace)) return 0; -- cgit v1.2.2