]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Pass intel_atomic state to check_digital_port_conflicts()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 17 May 2019 19:31:21 +0000 (22:31 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 4 Jun 2019 13:42:53 +0000 (16:42 +0300)
Pass around intel_atomic_state rather than drm_atomic_state.
This avoids some extra casts and annoing aliasing variables.

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

index 45f01178c6b77c1efb1c7502ee93f966d65b8f9d..b628524bed5e730f151e28fb133928493d937209 100644 (file)
@@ -11917,9 +11917,9 @@ static void intel_dump_pipe_config(struct intel_crtc *crtc,
        }
 }
 
-static bool check_digital_port_conflicts(struct drm_atomic_state *state)
+static bool check_digital_port_conflicts(struct intel_atomic_state *state)
 {
-       struct drm_device *dev = state->dev;
+       struct drm_device *dev = state->base.dev;
        struct drm_connector *connector;
        struct drm_connector_list_iter conn_iter;
        unsigned int used_ports = 0;
@@ -11936,7 +11936,9 @@ static bool check_digital_port_conflicts(struct drm_atomic_state *state)
                struct drm_connector_state *connector_state;
                struct intel_encoder *encoder;
 
-               connector_state = drm_atomic_get_new_connector_state(state, connector);
+               connector_state =
+                       drm_atomic_get_new_connector_state(&state->base,
+                                                          connector);
                if (!connector_state)
                        connector_state = connector->state;
 
@@ -13235,7 +13237,7 @@ static int intel_modeset_checks(struct drm_atomic_state *state)
        struct drm_crtc_state *old_crtc_state, *new_crtc_state;
        int ret = 0, i;
 
-       if (!check_digital_port_conflicts(state)) {
+       if (!check_digital_port_conflicts(intel_state)) {
                DRM_DEBUG_KMS("rejecting conflicting digital port configuration\n");
                return -EINVAL;
        }