[PATCH 04/10] drm/i915: Include need_vlv_dsi_wa in intel_vblank_evade_ctx
Ville Syrjala
ville.syrjala at linux.intel.com
Fri Jan 12 19:28:28 UTC 2024
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
Pull the need_vlv_dsi_wa details into intel_vblank_evade_init()
so that caller doesn't have to care about it.
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_crtc.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_crtc.c b/drivers/gpu/drm/i915/display/intel_crtc.c
index 93474fc9e502..92cfb7c8eadb 100644
--- a/drivers/gpu/drm/i915/display/intel_crtc.c
+++ b/drivers/gpu/drm/i915/display/intel_crtc.c
@@ -473,6 +473,7 @@ static int intel_mode_vblank_start(const struct drm_display_mode *mode)
struct intel_vblank_evade_ctx {
int min, max, vblank_start;
+ bool need_vlv_dsi_wa;
};
static void intel_vblank_evade_init(const struct intel_crtc_state *old_crtc_state,
@@ -480,9 +481,13 @@ static void intel_vblank_evade_init(const struct intel_crtc_state *old_crtc_stat
struct intel_vblank_evade_ctx *evade)
{
struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->uapi.crtc);
+ struct drm_i915_private *i915 = to_i915(crtc->base.dev);
const struct intel_crtc_state *crtc_state;
const struct drm_display_mode *adjusted_mode;
+ evade->need_vlv_dsi_wa = (IS_VALLEYVIEW(i915) || IS_CHERRYVIEW(i915)) &&
+ intel_crtc_has_type(new_crtc_state, INTEL_OUTPUT_DSI);
+
/*
* During fastsets/etc. the transcoder is still
* running with the old timings at this point.
@@ -550,8 +555,6 @@ void intel_pipe_update_start(struct intel_atomic_state *state,
long timeout = msecs_to_jiffies_timeout(1);
int scanline;
wait_queue_head_t *wq = drm_crtc_vblank_waitqueue(&crtc->base);
- bool need_vlv_dsi_wa = (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
- intel_crtc_has_type(new_crtc_state, INTEL_OUTPUT_DSI);
struct intel_vblank_evade_ctx evade;
DEFINE_WAIT(wait);
@@ -633,7 +636,7 @@ void intel_pipe_update_start(struct intel_atomic_state *state,
*
* FIXME figure out if BXT+ DSI suffers from this as well
*/
- while (need_vlv_dsi_wa && scanline == evade.vblank_start)
+ while (evade.need_vlv_dsi_wa && scanline == evade.vblank_start)
scanline = intel_get_crtc_scanline(crtc);
drm_crtc_vblank_put(&crtc->base);
--
2.41.0
More information about the Intel-gfx-trybot
mailing list