Done, hope I got it right this time. -DK -----Original Message----- From: Daniel Vetter [mailto:daniel.vetter@xxxxxxxx] On Behalf Of Daniel Vetter Sent: Thursday, December 22, 2016 12:52 AM To: Ander Conselvan De Oliveira <conselvan2@xxxxxxxxx> Cc: Pandiyan, Dhinakaran <dhinakaran.pandiyan@xxxxxxxxx>; intel-gfx@xxxxxxxxxxxxxxxxxxxxx; Daniel Vetter <daniel.vetter@xxxxxxxx>; dri-devel@xxxxxxxxxxxxxxxxxxxxx; Ben Skeggs <bskeggs@xxxxxxxxxx>; nouveau@xxxxxxxxxxxxxxxxxxxxx Subject: Re: [PATCH v2 1/2] drm: Wrap the check for atomic_commit implementation On Thu, Dec 22, 2016 at 10:36:01AM +0200, Ander Conselvan De Oliveira wrote: > On Wed, 2016-12-21 at 12:12 -0800, Dhinakaran Pandiyan wrote: > > This check is useful for drivers that do not have DRIVER_ATOMIC set > > but have atomic modesetting internally implemented. Wrap the check > > into a function since this is used in many places and as a bonus, > > the function name helps to document what the check is for. > > > > v2: > > Change return type to bool (Ville) > > Move the function drm_atomic.h (Daniel) > > > > Suggested-by: Daniel Vetter <daniel.vetter@xxxxxxxx> > > Cc: Daniel Vetter <daniel.vetter@xxxxxxxx> > > Cc: Ben Skeggs <bskeggs@xxxxxxxxxx> > > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@xxxxxxxxx> > > --- > > drivers/gpu/drm/drm_fb_helper.c | 6 +++--- > > drivers/gpu/drm/nouveau/nouveau_connector.c | 5 +++-- > > drivers/gpu/drm/nouveau/nouveau_display.c | 6 +++--- > > drivers/gpu/drm/nouveau/nouveau_fbcon.c | 3 ++- > > include/drm/drm_atomic.h | 11 +++++++++++ > > 5 files changed, 22 insertions(+), 9 deletions(-) > > > > ... > > > diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h > > index 8cc7ca2..43db162 100644 > > --- a/include/drm/drm_atomic.h > > +++ b/include/drm/drm_atomic.h > > @@ -419,5 +419,16 @@ drm_atomic_crtc_needs_modeset(const struct > > drm_crtc_state > > *state) > > state->connectors_changed; > > } > > > > +/* drm_drv_uses_atomic_modeset - check if the driver implements > > Shouldn't this be > > /** > * drm_drv_uses_atomic_modeset - ... > > so it is included in the generated documentation? Yup. I'm blind this week it seems. DK, please run $ make DOCBOOKS="" htmldocs and make sure your new documentation does get rendered correctly and shows up in the output. -Daniel > > Ander > > > > + * atomic_commit() > > + * @dev: DRM device > > + * > > + * This check is useful if drivers do not have DRIVER_ATOMIC set > > +but > > + * have atomic modesetting internally implemented. > > + */ > > +static inline bool drm_drv_uses_atomic_modeset(struct drm_device > > +*dev) { > > + return dev->mode_config.funcs->atomic_commit ? true : false; } > > > > #endif /* DRM_ATOMIC_H_ */ -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx