[Intel-gfx] [PATCH 4/9] drm/i915: Use intel_crtc_state in sanitize_watermarks() too

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Thu Jun 20 21:46:08 UTC 2019


Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index a518d74f898f..baa0e1957ffe 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -15738,8 +15738,8 @@ static void sanitize_watermarks(struct drm_device *dev)
 	struct drm_i915_private *dev_priv = to_i915(dev);
 	struct drm_atomic_state *state;
 	struct intel_atomic_state *intel_state;
-	struct drm_crtc *crtc;
-	struct drm_crtc_state *cstate;
+	struct intel_crtc *crtc;
+	struct intel_crtc_state *cstate;
 	struct drm_modeset_acquire_ctx ctx;
 	int ret;
 	int i;
@@ -15794,13 +15794,11 @@ static void sanitize_watermarks(struct drm_device *dev)
 	}
 
 	/* Write calculated watermark values back */
-	for_each_new_crtc_in_state(state, crtc, cstate, i) {
-		struct intel_crtc_state *cs = to_intel_crtc_state(cstate);
-
-		cs->wm.need_postvbl_update = true;
-		dev_priv->display.optimize_watermarks(intel_state, cs);
+	for_each_new_intel_crtc_in_state(intel_state, crtc, cstate, i) {
+		cstate->wm.need_postvbl_update = true;
+		dev_priv->display.optimize_watermarks(intel_state, cstate);
 
-		to_intel_crtc_state(crtc->state)->wm = cs->wm;
+		to_intel_crtc_state(crtc->base.state)->wm = cstate->wm;
 	}
 
 put_state:
-- 
2.20.1



More information about the Intel-gfx mailing list