[PATCH 1/2] drm: execution context for GEM buffers v5

Boris Brezillon boris.brezillon at collabora.com
Wed Jun 21 16:54:51 UTC 2023


On Wed, 21 Jun 2023 18:51:59 +0200
Boris Brezillon <boris.brezillon at collabora.com> wrote:

> On Wed, 21 Jun 2023 15:36:59 +0200
> "Christian König" <ckoenig.leichtzumerken at gmail.com> wrote:
> 
> > +/**
> > + * drm_exec_until_all_locked - loop until all GEM objects are locked
> > + * @exec: drm_exec object
> > + *
> > + * Core functionality of the drm_exec object. Loops until all GEM objects are
> > + * locked and no more contention exists. At the beginning of the loop it is
> > + * guaranteed that no GEM object is locked.
> > + *
> > + * Since labels can't be defined local to the loops body we use a jump pointer
> > + * to make sure that the retry is only used from within the loops body.
> > + */
> > +#define drm_exec_until_all_locked(exec)				\
> > +	for (void *__drm_exec_retry_ptr; ({			\
> > +		__label__ __drm_exec_retry;			\  
> 
> The warning reported by the bot on 'drm: add drm_exec selftests v4'
> should be fixed with a
> 
> 		goto __drm_exec_retry;
> 
> placed here.

Nevermind, it's complaining about __drm_exec_retry_ptr being set but
not used. Guess __maybe_unused could cover that.

> 
> > +__drm_exec_retry:						\
> > +		__drm_exec_retry_ptr = &&__drm_exec_retry;	\
> > +		drm_exec_cleanup(exec);				\
> > +	});)  



More information about the dri-devel mailing list