From 89d5f40116d0d84c2f6d8427560dd24f64f2dcaa Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Tue, 4 Dec 2018 10:41:19 -0800 Subject: gpu: nvgpu: handle timestamp buffer full ctxsw_intr0 If enabled, fecs trace updating happens from ucode side even when there is no fecs trace dumper application to consume it. Due to this, trace buffer will get eventually full and ucode will trigger ctxsw_intr0. Reset fecs_trace buffer to handle timestamp buffer full ctxsw_intr0. Bug 2361571 Bug 200472922 Change-Id: Ia26a17635fc6bd6e8663b8af983acc91839ecfcd Signed-off-by: Seema Khowala Reviewed-on: https://git-master.nvidia.com/r/1965370 Reviewed-by: mobile promotions Tested-by: mobile promotions (cherry picked from commit 790ba095543b33f4cc3a145559ad31a1e9f99d98) Reviewed-on: https://git-master.nvidia.com/r/1979746 GVS: Gerrit_Virtual_Submit Reviewed-by: Debarshi Dutta Tested-by: Debarshi Dutta Reviewed-by: Bitan Biswas --- drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c index b30d1743..cac3ce27 100644 --- a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c @@ -634,4 +634,12 @@ bool gk20a_fecs_trace_is_enabled(struct gk20a *g) return (trace && nvgpu_thread_is_running(&trace->poll_task)); } + +void gk20a_fecs_trace_reset_buffer(struct gk20a *g) +{ + nvgpu_log(g, gpu_dbg_fn|gpu_dbg_ctxsw, " "); + + gk20a_fecs_trace_set_read_index(g, + gk20a_fecs_trace_get_write_index(g)); +} #endif /* CONFIG_GK20A_CTXSW_TRACE */ -- cgit v1.2.2