From e4e0a32c7cccb3389a6afdbf1199d7104391ac01 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Fri, 16 Dec 2016 15:28:39 +0530 Subject: gpu: nvgpu: make preemption modes unsigned graphics and compute preemption modes are currently defined as int But it is more logical to have them as unsigned int Also, we treat preemption modes as unsigned almost everywhere in the code Fix prints in gk20a_fifo_sched_debugfs_seq_show() to print U32_MAX with %d which is same as printing -1 Bug 200263471 Change-Id: Iabd0ee3923b76d81620898e90a9b1fc5dd75b530 Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/1272514 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 4 ++-- drivers/gpu/nvgpu/gk20a/mm_gk20a.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 488ae309..b4fa8f0f 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c @@ -3214,8 +3214,8 @@ static int gk20a_fifo_sched_debugfs_seq_show( tsg ? tsg->timeslice_us : ch->timeslice_us, ch->timeout_ms_max, tsg ? tsg->interleave_level : ch->interleave_level, - ch->ch_ctx.gr_ctx ? ch->ch_ctx.gr_ctx->graphics_preempt_mode : -1, - ch->ch_ctx.gr_ctx ? ch->ch_ctx.gr_ctx->compute_preempt_mode : -1); + ch->ch_ctx.gr_ctx ? ch->ch_ctx.gr_ctx->graphics_preempt_mode : U32_MAX, + ch->ch_ctx.gr_ctx ? ch->ch_ctx.gr_ctx->compute_preempt_mode : U32_MAX); gk20a_channel_put(ch); } return 0; diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h index d2661733..d32e121a 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h @@ -124,8 +124,8 @@ struct gr_ctx_buffer_desc { struct gr_ctx_desc { struct mem_desc mem; - int graphics_preempt_mode; - int compute_preempt_mode; + u32 graphics_preempt_mode; + u32 compute_preempt_mode; #ifdef CONFIG_ARCH_TEGRA_18x_SOC struct gr_ctx_desc_t18x t18x; #endif -- cgit v1.2.2