drm/i915: Introduce a for_each_crtc() macro
authorDamien Lespiau <damien.lespiau@intel.com>
Tue, 13 May 2014 22:32:23 +0000 (23:32 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 13 May 2014 22:38:38 +0000 (00:38 +0200)
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h

index c8a6424e8b34ba323080bf6253c6fcc7311d7c1d..01bd4de4dbf618420c677e75f870b17c341c96aa 100644 (file)
@@ -163,6 +163,9 @@ enum hpd_pin {
 #define for_each_pipe(p) for ((p) = 0; (p) < INTEL_INFO(dev)->num_pipes; (p)++)
 #define for_each_sprite(p, s) for ((s) = 0; (s) < INTEL_INFO(dev)->num_sprites[(p)]; (s)++)
 
+#define for_each_crtc(dev, crtc) \
+       list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
+
 #define for_each_intel_crtc(dev, intel_crtc) \
        list_for_each_entry(intel_crtc, &dev->mode_config.crtc_list, base.head)