summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/intel_display.h
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2018-07-05 19:43:50 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2018-07-13 18:22:21 +0300
commit14aa521c5eb615c802d51e9e8884f2dbd35993a2 (patch)
tree5245f4b3a376e3506283f99fa28bd7c0f0372dfb /drivers/gpu/drm/i915/intel_display.h
parent0b100760e3e8cbb2b5d09c1c2bcb01d50201c142 (diff)
downloadlinux-14aa521c5eb615c802d51e9e8884f2dbd35993a2.tar.xz
drm/i915: Introduce for_each_intel_dp()
Add a convenience macro for iterating DP encoders. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180705164357.28512-2-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.h')
-rw-r--r--drivers/gpu/drm/i915/intel_display.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.h b/drivers/gpu/drm/i915/intel_display.h
index a77dd29db2ec..7559dfc235a2 100644
--- a/drivers/gpu/drm/i915/intel_display.h
+++ b/drivers/gpu/drm/i915/intel_display.h
@@ -289,6 +289,10 @@ struct intel_link_m_n {
&(dev)->mode_config.encoder_list, \
base.head)
+#define for_each_intel_dp(dev, intel_encoder) \
+ for_each_intel_encoder(dev, intel_encoder) \
+ for_each_if(intel_encoder_is_dp(intel_encoder))
+
#define for_each_intel_connector_iter(intel_connector, iter) \
while ((intel_connector = to_intel_connector(drm_connector_list_iter_next(iter))))