]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Use intel_crtc_state in sanitize_watermarks() too
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fri, 28 Jun 2019 08:55:15 +0000 (10:55 +0200)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Mon, 1 Jul 2019 08:32:34 +0000 (10:32 +0200)
Get rid of all instances of drm_crtc_state, and rename cstate to
crtc_state for more clarity.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190628085517.31886-5-maarten.lankhorst@linux.intel.com
drivers/gpu/drm/i915/display/intel_display.c

index 6be2fd714e37523a14b7433e74ee12f678389124..4ea63026d9c416dbfa3bfc901690f0ffab930edb 100644 (file)
@@ -15812,8 +15812,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 *crtc_state;
        struct drm_modeset_acquire_ctx ctx;
        int ret;
        int i;
@@ -15868,13 +15868,11 @@ retry:
        }
 
        /* 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, crtc_state, i) {
+               crtc_state->wm.need_postvbl_update = true;
+               dev_priv->display.optimize_watermarks(intel_state, crtc_state);
 
-               to_intel_crtc_state(crtc->state)->wm = cs->wm;
+               to_intel_crtc_state(crtc->base.state)->wm = crtc_state->wm;
        }
 
 put_state: