[Intel-gfx] [PATCH 3/4] drm/i915: Introduce a for_each_crtc() macro
Jani Nikula
jani.nikula at linux.intel.com
Wed May 14 10:56:12 CEST 2014
On Wed, 14 May 2014, Damien Lespiau <damien.lespiau at intel.com> wrote:
> Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index edf7299..4006dfe 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -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)
> +
Would this be useful in some drm header as drm_for_each_crtc()?
BR,
Jani.
> #define for_each_intel_crtc(dev, intel_crtc) \
> list_for_each_entry(intel_crtc, &dev->mode_config.crtc_list, base.head)
>
> --
> 1.8.3.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list