Skip to content

Commit 4c6b302

Browse files
committed
drm/i915: switch num_scalers/num_sprites to consider DISPLAY_VER
The numbers of scalers and sprites depend on the display version, so use it instead of GRAPHICS_VER. We were mixing both, which let me confused while removing CNL and GRAPHICS_VER == 10. v2 (Rodrigo): Switch IS_GEMINILAKE to DISPLAY_VER == 10 v3 (Lucas): Change check to DISPLAY_VER >= 9, to cover the GLK's num_scalers, otherwise it remains set to 0. Signed-off-by: Lucas De Marchi <[email protected]> Reviewed-by: Rodrigo Vivi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 244dba4 commit 4c6b302

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/gpu/drm/i915/intel_device_info.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,10 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
267267
if (IS_ADLS_DISPLAY_STEP(dev_priv, STEP_A0, STEP_A2))
268268
for_each_pipe(dev_priv, pipe)
269269
runtime->num_scalers[pipe] = 0;
270-
else if (GRAPHICS_VER(dev_priv) >= 10) {
270+
else if (DISPLAY_VER(dev_priv) >= 11) {
271271
for_each_pipe(dev_priv, pipe)
272272
runtime->num_scalers[pipe] = 2;
273-
} else if (GRAPHICS_VER(dev_priv) == 9) {
273+
} else if (DISPLAY_VER(dev_priv) >= 9) {
274274
runtime->num_scalers[PIPE_A] = 2;
275275
runtime->num_scalers[PIPE_B] = 2;
276276
runtime->num_scalers[PIPE_C] = 1;
@@ -281,10 +281,10 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
281281
if (DISPLAY_VER(dev_priv) >= 13 || HAS_D12_PLANE_MINIMIZATION(dev_priv))
282282
for_each_pipe(dev_priv, pipe)
283283
runtime->num_sprites[pipe] = 4;
284-
else if (GRAPHICS_VER(dev_priv) >= 11)
284+
else if (DISPLAY_VER(dev_priv) >= 11)
285285
for_each_pipe(dev_priv, pipe)
286286
runtime->num_sprites[pipe] = 6;
287-
else if (GRAPHICS_VER(dev_priv) == 10 || IS_GEMINILAKE(dev_priv))
287+
else if (DISPLAY_VER(dev_priv) == 10)
288288
for_each_pipe(dev_priv, pipe)
289289
runtime->num_sprites[pipe] = 3;
290290
else if (IS_BROXTON(dev_priv)) {
@@ -303,7 +303,7 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
303303
} else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
304304
for_each_pipe(dev_priv, pipe)
305305
runtime->num_sprites[pipe] = 2;
306-
} else if (GRAPHICS_VER(dev_priv) >= 5 || IS_G4X(dev_priv)) {
306+
} else if (DISPLAY_VER(dev_priv) >= 5 || IS_G4X(dev_priv)) {
307307
for_each_pipe(dev_priv, pipe)
308308
runtime->num_sprites[pipe] = 1;
309309
}

0 commit comments

Comments
 (0)