summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2016-12-16 04:58:39 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2016-12-21 11:46:11 -0500
commite4e0a32c7cccb3389a6afdbf1199d7104391ac01 (patch)
tree94110feab38a6e14e6727a00d01c2dab727df774 /drivers
parentec102080aba921f7811d90abd9288d50144bcc69 (diff)
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 <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1272514 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/fifo_gk20a.c4
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.h4
2 files changed, 4 insertions, 4 deletions
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(
3214 tsg ? tsg->timeslice_us : ch->timeslice_us, 3214 tsg ? tsg->timeslice_us : ch->timeslice_us,
3215 ch->timeout_ms_max, 3215 ch->timeout_ms_max,
3216 tsg ? tsg->interleave_level : ch->interleave_level, 3216 tsg ? tsg->interleave_level : ch->interleave_level,
3217 ch->ch_ctx.gr_ctx ? ch->ch_ctx.gr_ctx->graphics_preempt_mode : -1, 3217 ch->ch_ctx.gr_ctx ? ch->ch_ctx.gr_ctx->graphics_preempt_mode : U32_MAX,
3218 ch->ch_ctx.gr_ctx ? ch->ch_ctx.gr_ctx->compute_preempt_mode : -1); 3218 ch->ch_ctx.gr_ctx ? ch->ch_ctx.gr_ctx->compute_preempt_mode : U32_MAX);
3219 gk20a_channel_put(ch); 3219 gk20a_channel_put(ch);
3220 } 3220 }
3221 return 0; 3221 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 {
124struct gr_ctx_desc { 124struct gr_ctx_desc {
125 struct mem_desc mem; 125 struct mem_desc mem;
126 126
127 int graphics_preempt_mode; 127 u32 graphics_preempt_mode;
128 int compute_preempt_mode; 128 u32 compute_preempt_mode;
129#ifdef CONFIG_ARCH_TEGRA_18x_SOC 129#ifdef CONFIG_ARCH_TEGRA_18x_SOC
130 struct gr_ctx_desc_t18x t18x; 130 struct gr_ctx_desc_t18x t18x;
131#endif 131#endif