From: Ville Syrjälä <ville.syrj...@linux.intel.com>

Dig up the appropriate new crtc and plane states from the top level
atomic state in intel_pre_plane_update() and intel_post_plane_update().

Reviewed-by: Maarten Lankhorst <maarten.lankho...@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c 
b/drivers/gpu/drm/i915/intel_display.c
index 50617f390dce..ed5f63de6769 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5098,7 +5098,8 @@ static void intel_post_plane_update(struct 
intel_crtc_state *old_crtc_state)
        struct intel_crtc *crtc = to_intel_crtc(old_crtc_state->base.crtc);
        struct drm_atomic_state *old_state = old_crtc_state->base.state;
        struct intel_crtc_state *pipe_config =
-               to_intel_crtc_state(crtc->base.state);
+               
intel_atomic_get_new_crtc_state(to_intel_atomic_state(old_state),
+                                               crtc);
        struct drm_plane *primary = crtc->base.primary;
        struct drm_plane_state *old_pri_state =
                drm_atomic_get_existing_plane_state(old_state, primary);
@@ -5110,7 +5111,8 @@ static void intel_post_plane_update(struct 
intel_crtc_state *old_crtc_state)
 
        if (old_pri_state) {
                struct intel_plane_state *primary_state =
-                       to_intel_plane_state(primary->state);
+                       
intel_atomic_get_new_plane_state(to_intel_atomic_state(old_state),
+                                                        
to_intel_plane(primary));
                struct intel_plane_state *old_primary_state =
                        to_intel_plane_state(old_pri_state);
 
@@ -5139,7 +5141,8 @@ static void intel_pre_plane_update(struct 
intel_crtc_state *old_crtc_state,
 
        if (old_pri_state) {
                struct intel_plane_state *primary_state =
-                       to_intel_plane_state(primary->state);
+                       intel_atomic_get_new_plane_state(old_intel_state,
+                                                        
to_intel_plane(primary));
                struct intel_plane_state *old_primary_state =
                        to_intel_plane_state(old_pri_state);
 
-- 
2.13.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to