diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-05-09 17:13:13 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-05-10 10:56:53 -0400 |
commit | 9357086cee7f11de57f37447ce068c59eebcd411 (patch) | |
tree | 9911f8fd9657290bac552a9de04c3b4831ea3e7a /drivers | |
parent | 771f742703bb56598bc341ec4eaee5ff7c036d4d (diff) |
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 <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1143837
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Thomas Fleury <tfleury@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) | |||
490 | 490 | ||
491 | gk20a_dbg(gpu_dbg_fn|gpu_dbg_ctxsw, "g=%p trace=%p", g, trace); | 491 | gk20a_dbg(gpu_dbg_fn|gpu_dbg_ctxsw, "g=%p trace=%p", g, trace); |
492 | 492 | ||
493 | /* if tracing is not supported, skip this */ | ||
494 | if (!g->ops.fecs_trace.init) | ||
495 | return 0; | ||
496 | |||
493 | if (likely(trace)) | 497 | if (likely(trace)) |
494 | return 0; | 498 | return 0; |
495 | 499 | ||