[Intel-gfx] [PATCH v3 4/8] drm: Add driver-private objects to atomic state

Chris Wilson chris at chris-wilson.co.uk
Thu Feb 9 08:08:36 UTC 2017


On Wed, Feb 08, 2017 at 10:38:07PM -0800, Dhinakaran Pandiyan wrote:
> +#define for_each_private_obj(__state, obj_funcs, obj, obj_state, __i, __funcs)	\
> +	for ((__i) = 0;							\
> +	     (__i) < (__state)->num_private_objs &&			\
> +	     ((obj) = (__state)->private_objs[__i].obj,			\
> +	     (__funcs) = (__state)->private_objs[__i].funcs,		\
> +	     (obj_state) = (__state)->private_objs[__i].obj_state, 1);	\

Align to ( and put the trailing 1 on its own line so it stands out.

	     (__i) < (__state)->num_private_objs &&			\
	     ((obj) = (__state)->private_objs[__i].obj,			\
	      (__funcs) = (__state)->private_objs[__i].funcs,		\
	      (obj_state) = (__state)->private_objs[__i].obj_state, 	\
	      1);							\
	     (__i)++)							\
> +		for_each_if (__funcs == obj_funcs)
> +
> +/**
>   * drm_atomic_crtc_needs_modeset - compute combined modeset need
>   * @state: &drm_crtc_state for the CRTC
>   *

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list