From 7784fb18a3e9b86ea86c2eff756443c005dd3e32 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Tue, 28 Oct 2014 10:07:55 +0200 Subject: gpu: nvgpu: warn on nested ctx patch begin Add WARN_ON to a critical error condition to get a backtrace dump. Bug 200046882 Change-Id: I76c4186024547c6e89f1465612fe17f44e27eefe Signed-off-by: Konsta Holtta --- drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 47f11a1f..63ab6c9f 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c @@ -593,7 +593,7 @@ int gr_gk20a_ctx_patch_write_begin(struct gk20a *g, struct channel_ctx_gk20a *ch_ctx) { /* being defensive still... */ - if (ch_ctx->patch_ctx.cpu_va) { + if (WARN_ON(ch_ctx->patch_ctx.cpu_va)) { gk20a_err(dev_from_gk20a(g), "nested ctx patch begin?"); return -EBUSY; } -- cgit v1.2.2