[PATCH 25/36] drm/i915: Call skl_detach_scalers() only from a single place
Ville Syrjala
ville.syrjala at linux.intel.com
Wed Dec 18 16:10:42 UTC 2019
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
The code is silly and calls skl_detach_scaler() from both sides
of an if-else. Just move the call to happen before the if-else.
We probably still want to keep this as close to the pfit/plane
programming as reasonably possible so move it just before the
intel_pipe_fastset() call.
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_display.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index dbe97caf8a4e..4eb5a7763d3d 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -14379,10 +14379,7 @@ static void intel_pipe_fastset(const struct intel_crtc_state *old_crtc_state,
*/
intel_set_pipe_src_size(new_crtc_state);
- /* on skylake this is done by detaching scalers */
if (INTEL_GEN(dev_priv) >= 9) {
- skl_detach_scalers(new_crtc_state);
-
if (new_crtc_state->pch_pfit.enabled)
skylake_pfit_enable(new_crtc_state);
} else if (HAS_PCH_SPLIT(dev_priv)) {
@@ -14413,12 +14410,12 @@ static void commit_pipe_config(struct intel_atomic_state *state,
new_crtc_state->update_pipe)
intel_color_commit(new_crtc_state);
- if (INTEL_GEN(dev_priv) >= 9)
- skl_detach_scalers(new_crtc_state);
-
if (INTEL_GEN(dev_priv) >= 9 || IS_BROADWELL(dev_priv))
bdw_set_pipemisc(new_crtc_state);
+ if (INTEL_GEN(dev_priv) >= 9)
+ skl_detach_scalers(new_crtc_state);
+
if (new_crtc_state->update_pipe)
intel_pipe_fastset(old_crtc_state, new_crtc_state);
}
--
2.23.0
More information about the Intel-gfx-trybot
mailing list