]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: add wrappers to get intel connector state
authorLucas De Marchi <lucas.demarchi@intel.com>
Wed, 30 Oct 2019 01:24:45 +0000 (18:24 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 4 Nov 2019 21:44:29 +0000 (13:44 -0800)
Wrap drm_atomic_get_old_connector_state so we can get the
intel_digital_connector_state and make it easier to migrate to intel
types.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191030012448.14937-3-lucas.demarchi@intel.com
drivers/gpu/drm/i915/display/intel_display_types.h

index 764a715c5d1cd916023a5f80f8566eda0f742884..fadd9853f96679961352f891ff3cdde96b0d9489 100644 (file)
@@ -1570,6 +1570,24 @@ intel_atomic_get_new_crtc_state(struct intel_atomic_state *state,
                                                                 &crtc->base));
 }
 
+static inline struct intel_digital_connector_state *
+intel_atomic_get_new_connector_state(struct intel_atomic_state *state,
+                                    struct intel_connector *connector)
+{
+       return to_intel_digital_connector_state(
+                       drm_atomic_get_new_connector_state(&state->base,
+                       &connector->base));
+}
+
+static inline struct intel_digital_connector_state *
+intel_atomic_get_old_connector_state(struct intel_atomic_state *state,
+                                    struct intel_connector *connector)
+{
+       return to_intel_digital_connector_state(
+                       drm_atomic_get_old_connector_state(&state->base,
+                       &connector->base));
+}
+
 /* intel_display.c */
 static inline bool
 intel_crtc_has_type(const struct intel_crtc_state *crtc_state,