]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Add for_each_new_intel_connector_in_state()
authorJosé Roberto de Souza <jose.souza@intel.com>
Wed, 30 Oct 2019 01:24:44 +0000 (18:24 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 4 Nov 2019 21:44:28 +0000 (13:44 -0800)
The same macro as for_each_new_connector_in_state() but it uses
intel/i915 types instead of the drm ones.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190823082055.5992-11-lucas.demarchi@intel.com
Link: https://patchwork.freedesktop.org/patch/msgid/20191030012448.14937-2-lucas.demarchi@intel.com
drivers/gpu/drm/i915/display/intel_display.h

index 39796614756173c63a33955f69f85a3e7ce22a25..4dc490760fbc6fa78cbf2b6bd091627b2e062a6c 100644 (file)
@@ -455,6 +455,14 @@ enum phy_fia {
                for_each_if ((plane_state = \
                              to_intel_plane_state(__drm_atomic_get_current_plane_state((crtc_state)->uapi.state, &plane->base))))
 
+#define for_each_new_intel_connector_in_state(__state, connector, new_connector_state, __i) \
+       for ((__i) = 0; \
+            (__i) < (__state)->base.num_connector; \
+            (__i)++) \
+               for_each_if ((__state)->base.connectors[__i].ptr && \
+                            ((connector) = to_intel_connector((__state)->base.connectors[__i].ptr), \
+                            (new_connector_state) = to_intel_digital_connector_state((__state)->base.connectors[__i].new_state), 1))
+
 void intel_link_compute_m_n(u16 bpp, int nlanes,
                            int pixel_clock, int link_clock,
                            struct intel_link_m_n *m_n,