From ee93b209634a60d79fb4dbd05362b01b8d389603 Mon Sep 17 00:00:00 2001 From: Sandeep Shinde Date: Wed, 1 Mar 2017 19:29:49 +0530 Subject: gpu: nvgpu: Allow compute preemption mode on PASCAL_A class Remove restriction of setting compute preemption mode for channels created with PASCAL_COMPUTE_A class only and allow it to be set for PASCAL_A class too. Also print compute preemption mode during channel closing. Bug 200284575 Change-Id: I2de3b3acda128e91caa2ab0fd341915ce6e6520b Signed-off-by: Sandeep Shinde Reviewed-on: http://git-master/r/1313286 Reviewed-by: svccoveritychecker Reviewed-by: Terje Bergstrom GVS: Gerrit_Virtual_Submit Tested-by: Donghan Ryu --- drivers/gpu/nvgpu/gp10b/gr_gp10b.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gp10b/gr_gp10b.c') diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c index da121b56..d084d5dc 100644 --- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c @@ -964,7 +964,7 @@ static int gr_gp10b_set_ctxsw_preemption_mode(struct gk20a *g, break; } - if (class == PASCAL_COMPUTE_A) { + if (class == PASCAL_COMPUTE_A || class == PASCAL_A) { switch (compute_preempt_mode) { case NVGPU_COMPUTE_PREEMPTION_MODE_WFI: case NVGPU_COMPUTE_PREEMPTION_MODE_CTA: @@ -1079,6 +1079,10 @@ static void dump_ctx_switch_stats(struct gk20a *g, struct vm_gk20a *vm, "image gfx preemption option (GFXP is 1) %x\n", gk20a_mem_rd(g, mem, ctxsw_prog_main_image_graphics_preemption_options_o())); + gk20a_err(dev_from_gk20a(g), + "image compute preemption option (CTA is 1) %x\n", + gk20a_mem_rd(g, mem, + ctxsw_prog_main_image_compute_preemption_options_o())); gk20a_mem_end(g, mem); } -- cgit v1.2.2