]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Change use get_new_plane_state instead of existing plane state
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Mon, 9 Apr 2018 12:46:53 +0000 (14:46 +0200)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Mon, 9 Apr 2018 13:58:53 +0000 (15:58 +0200)
The get_existing macros are deprecated and should be replaced by
get_old/new_state for clarity.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180409124656.39886-1-maarten.lankhorst@linux.intel.com
[mlankhorst: Remove useless warn. (Ville)]
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
drivers/gpu/drm/i915/intel_atomic.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_pm.c

index bb8c1687823e574c8d510511a537ba1916e27bdd..40285d1b91b7fb8968bcfea69b9353ab8b2e782f 100644 (file)
@@ -227,6 +227,7 @@ int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
        struct intel_crtc_scaler_state *scaler_state =
                &crtc_state->scaler_state;
        struct drm_atomic_state *drm_state = crtc_state->base.state;
+       struct intel_atomic_state *intel_state = to_intel_atomic_state(drm_state);
        int num_scalers_need;
        int i, j;
 
@@ -304,8 +305,8 @@ int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
                                continue;
                        }
 
-                       plane_state = intel_atomic_get_existing_plane_state(drm_state,
-                                                                           intel_plane);
+                       plane_state = intel_atomic_get_new_plane_state(intel_state,
+                                                                      intel_plane);
                        scaler_id = &plane_state->scaler_id;
                }
 
index b2e0fa04ef5b0e7d4736bc98551b53c3ef5c919b..e545aa673bd91876dc54d0a1a149e1c482d8a6fe 100644 (file)
@@ -2109,17 +2109,6 @@ intel_atomic_get_existing_crtc_state(struct drm_atomic_state *state,
                return NULL;
 }
 
-static inline struct intel_plane_state *
-intel_atomic_get_existing_plane_state(struct drm_atomic_state *state,
-                                     struct intel_plane *plane)
-{
-       struct drm_plane_state *plane_state;
-
-       plane_state = drm_atomic_get_existing_plane_state(state, &plane->base);
-
-       return to_intel_plane_state(plane_state);
-}
-
 int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
                               struct intel_crtc *intel_crtc,
                               struct intel_crtc_state *crtc_state);
index 007a12ebe7254c796ac75ba470d5627589b29558..4baab858e4427e9139e6fce33b0da6ab61224d62 100644 (file)
@@ -5037,8 +5037,6 @@ skl_ddb_add_affected_planes(struct intel_crtc_state *cstate)
        struct drm_plane *plane;
        enum pipe pipe = intel_crtc->pipe;
 
-       WARN_ON(!drm_atomic_get_existing_crtc_state(state, crtc));
-
        drm_for_each_plane_mask(plane, dev, cstate->base.plane_mask) {
                enum plane_id plane_id = to_intel_plane(plane)->id;