diff --git a/drivers/gpu/nvgpu/common/gr/ctx.c b/drivers/gpu/nvgpu/common/gr/ctx.c index 38a30d956..354ee946a 100644 --- a/drivers/gpu/nvgpu/common/gr/ctx.c +++ b/drivers/gpu/nvgpu/common/gr/ctx.c @@ -317,7 +317,8 @@ static void nvgpu_gr_ctx_unmap_global_ctx_buffers(struct gk20a *g, struct vm_gk20a *vm) { u64 *g_bfr_va = gr_ctx->global_ctx_buffer_va; - int *g_bfr_index = gr_ctx->global_ctx_buffer_index; + enum nvgpu_gr_global_ctx_index *g_bfr_index = + gr_ctx->global_ctx_buffer_index; u32 i; nvgpu_log_fn(g, " "); @@ -339,7 +340,7 @@ int nvgpu_gr_ctx_map_global_ctx_buffers(struct gk20a *g, struct vm_gk20a *vm, bool vpr) { u64 *g_bfr_va; - int *g_bfr_index; + enum nvgpu_gr_global_ctx_index *g_bfr_index; u64 gpu_va = 0ULL; nvgpu_log_fn(g, " "); diff --git a/drivers/gpu/nvgpu/include/nvgpu/gr/ctx.h b/drivers/gpu/nvgpu/include/nvgpu/gr/ctx.h index 6b23fce36..e85f5e8f5 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gr/ctx.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gr/ctx.h @@ -25,6 +25,7 @@ #include #include +#include /* * allocate a minimum of 1 page (4KB) worth of patch space, this is 512 entries @@ -127,7 +128,7 @@ struct nvgpu_gr_ctx { #endif u64 global_ctx_buffer_va[NVGPU_GR_CTX_VA_COUNT]; - int global_ctx_buffer_index[NVGPU_GR_CTX_VA_COUNT]; + enum nvgpu_gr_global_ctx_index global_ctx_buffer_index[NVGPU_GR_CTX_VA_COUNT]; bool global_ctx_buffer_mapped; u32 tsgid;