summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106/gr_gp106.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/gr_gp106.c')
-rw-r--r--drivers/gpu/nvgpu/gp106/gr_gp106.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/gp106/gr_gp106.c b/drivers/gpu/nvgpu/gp106/gr_gp106.c
index 1fb527d1..fea337e7 100644
--- a/drivers/gpu/nvgpu/gp106/gr_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/gr_gp106.c
@@ -141,23 +141,23 @@ int gr_gp106_set_ctxsw_preemption_mode(struct gk20a *g,
141 int err = 0; 141 int err = 0;
142 142
143 if (class == PASCAL_B && g->gr.t18x.ctx_vars.force_preemption_gfxp) 143 if (class == PASCAL_B && g->gr.t18x.ctx_vars.force_preemption_gfxp)
144 graphics_preempt_mode = NVGPU_GRAPHICS_PREEMPTION_MODE_GFXP; 144 graphics_preempt_mode = NVGPU_PREEMPTION_MODE_GRAPHICS_GFXP;
145 145
146 if (class == PASCAL_COMPUTE_B && 146 if (class == PASCAL_COMPUTE_B &&
147 g->gr.t18x.ctx_vars.force_preemption_cilp) 147 g->gr.t18x.ctx_vars.force_preemption_cilp)
148 compute_preempt_mode = NVGPU_COMPUTE_PREEMPTION_MODE_CILP; 148 compute_preempt_mode = NVGPU_PREEMPTION_MODE_COMPUTE_CILP;
149 149
150 /* check for invalid combinations */ 150 /* check for invalid combinations */
151 if ((graphics_preempt_mode == 0) && (compute_preempt_mode == 0)) 151 if ((graphics_preempt_mode == 0) && (compute_preempt_mode == 0))
152 return -EINVAL; 152 return -EINVAL;
153 153
154 if ((graphics_preempt_mode == NVGPU_GRAPHICS_PREEMPTION_MODE_GFXP) && 154 if ((graphics_preempt_mode == NVGPU_PREEMPTION_MODE_GRAPHICS_GFXP) &&
155 (compute_preempt_mode == NVGPU_COMPUTE_PREEMPTION_MODE_CILP)) 155 (compute_preempt_mode == NVGPU_PREEMPTION_MODE_COMPUTE_CILP))
156 return -EINVAL; 156 return -EINVAL;
157 157
158 /* set preemption modes */ 158 /* set preemption modes */
159 switch (graphics_preempt_mode) { 159 switch (graphics_preempt_mode) {
160 case NVGPU_GRAPHICS_PREEMPTION_MODE_GFXP: 160 case NVGPU_PREEMPTION_MODE_GRAPHICS_GFXP:
161 { 161 {
162 u32 spill_size = 162 u32 spill_size =
163 gr_gpc0_swdx_rm_spill_buffer_size_256b_default_v() * 163 gr_gpc0_swdx_rm_spill_buffer_size_256b_default_v() *
@@ -213,7 +213,7 @@ int gr_gp106_set_ctxsw_preemption_mode(struct gk20a *g,
213 break; 213 break;
214 } 214 }
215 215
216 case NVGPU_GRAPHICS_PREEMPTION_MODE_WFI: 216 case NVGPU_PREEMPTION_MODE_GRAPHICS_WFI:
217 gr_ctx->graphics_preempt_mode = graphics_preempt_mode; 217 gr_ctx->graphics_preempt_mode = graphics_preempt_mode;
218 break; 218 break;
219 219
@@ -223,9 +223,9 @@ int gr_gp106_set_ctxsw_preemption_mode(struct gk20a *g,
223 223
224 if (class == PASCAL_COMPUTE_B) { 224 if (class == PASCAL_COMPUTE_B) {
225 switch (compute_preempt_mode) { 225 switch (compute_preempt_mode) {
226 case NVGPU_COMPUTE_PREEMPTION_MODE_WFI: 226 case NVGPU_PREEMPTION_MODE_COMPUTE_WFI:
227 case NVGPU_COMPUTE_PREEMPTION_MODE_CTA: 227 case NVGPU_PREEMPTION_MODE_COMPUTE_CTA:
228 case NVGPU_COMPUTE_PREEMPTION_MODE_CILP: 228 case NVGPU_PREEMPTION_MODE_COMPUTE_CILP:
229 gr_ctx->compute_preempt_mode = compute_preempt_mode; 229 gr_ctx->compute_preempt_mode = compute_preempt_mode;
230 break; 230 break;
231 default: 231 default: