[PATCH v2 10/10] drm/i915/scaler: eliminate dead code

Michał Grzelak
2026-04-11T17:46:27Z

We short-cut skl_scaler_get_config() when skl_pipe_scaler_get_hw_state()
has failed. Remove codepaths that assume scaler_id < 0.

Cc: Nemesa Garg <nemesa.garg@intel.com>
Signed-off-by: Michał Grzelak <michal.grzelak@intel.com>
---
drivers/gpu/drm/i915/display/skl_scaler.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/skl_scaler.c b/drivers/gpu/drm/i915/display/skl_scaler.c
index 1f47c5fc1802f..d789a5ac8bab8 100644
--- a/drivers/gpu/drm/i915/display/skl_scaler.c
+++ b/drivers/gpu/drm/i915/display/skl_scaler.c
@@ -989,10 +989,7 @@ void skl_scaler_get_config(struct intel_crtc_state *crtc_state)
scaler_state->scalers[scaler_id].in_use = true;

scaler_state->scaler_id = scaler_id;
- if (scaler_id >= 0)
- scaler_state->scaler_users |= (1 << SKL_CRTC_INDEX);
- else
- scaler_state->scaler_users &= ~(1 << SKL_CRTC_INDEX);
+ scaler_state->scaler_users |= (1 << SKL_CRTC_INDEX);
}

void adl_scaler_ecc_mask(const struct intel_crtc_state *crtc_state)
--
2.45.2