mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
drm/i915/scaler: remove id in favor of scaler_id
id is not really used anywhere in skl_scaler_get_config(). Replace it with scaler_id. Return if no scaler was found. v1->v2 - check if any scaler was found (Ville) Cc: Nemesa Garg <nemesa.garg@intel.com> Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Michał Grzelak <michal.grzelak@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20260509164048.627399-7-michal.grzelak@intel.com
This commit is contained in:
parent
20101fc2db
commit
b8ccfbc01d
|
|
@ -951,7 +951,6 @@ void skl_scaler_get_config(struct intel_crtc_state *crtc_state)
|
|||
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
|
||||
struct intel_crtc_scaler_state *scaler_state = &crtc_state->scaler_state;
|
||||
int scaler_id;
|
||||
int id = -1;
|
||||
|
||||
/* find scaler attached to this pipe */
|
||||
for (scaler_id = 0; scaler_id < crtc->num_scalers; scaler_id++) {
|
||||
|
|
@ -961,8 +960,6 @@ void skl_scaler_get_config(struct intel_crtc_state *crtc_state)
|
|||
if ((ctl & (PS_SCALER_EN | PS_BINDING_MASK)) != (PS_SCALER_EN | PS_BINDING_PIPE))
|
||||
continue;
|
||||
|
||||
id = scaler_id;
|
||||
|
||||
if (scaler_has_casf(display, scaler_id))
|
||||
intel_casf_sharpness_get_config(crtc_state);
|
||||
|
||||
|
|
@ -981,8 +978,11 @@ void skl_scaler_get_config(struct intel_crtc_state *crtc_state)
|
|||
break;
|
||||
}
|
||||
|
||||
scaler_state->scaler_id = id;
|
||||
if (id >= 0)
|
||||
if (scaler_id == crtc->num_scalers)
|
||||
return;
|
||||
|
||||
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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user