[PATCH 6/8] drm: vmwgfx: Replace CRTC .commit() helper operation with .enable()
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Jun 28 08:25:43 UTC 2017
Hi Daniel,
On Wednesday 28 Jun 2017 09:39:28 Daniel Vetter wrote:
> On Tue, Jun 27, 2017 at 11:38:41PM +0300, Laurent Pinchart wrote:
> > The CRTC helper .commit() operation is legacy code, the atomic helpers
> > prefer the .enable() operation. Replace the .commit() helper operation
> > with .enable() in the driver.
> >
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas at ideasonboard.com>
>
> I think it'd be great to outright nuke the nop functions, they're all
> optional, and with newly-merged drivers I ask for them to get removed. But
> that's an aside, feel free to ignore.
I agree with you, but then we need to first merge "[PATCH] drm: atomic-helper:
make CRTC .atomic_enable() operation truly optional" :-)
> -Daniel
>
> > ---
> >
> > drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 6 +++---
> > drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 6 +++---
> > drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 4 ++--
> > 3 files changed, 8 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
> > b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c index 639e16703b80..f8acd3a15523
> > 100644
> > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
> > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
> > @@ -203,7 +203,7 @@ static void vmw_ldu_crtc_mode_set_nofb(struct drm_crtc
> > *crtc)
> > }
> >
> > /**
> > - * vmw_ldu_crtc_helper_commit - Noop
> > + * vmw_ldu_crtc_helper_enable - Noop
> > *
> > * @crtc: CRTC associated with the new screen
> > *
> > @@ -212,7 +212,7 @@ static void vmw_ldu_crtc_mode_set_nofb(struct drm_crtc
> > *crtc)>
> > * but since for LDU the display plane is closely tied to the
> > * CRTC, it makes more sense to do those at plane update time.
> > */
> > -static void vmw_ldu_crtc_helper_commit(struct drm_crtc *crtc)
> > +static void vmw_ldu_crtc_helper_enable(struct drm_crtc *crtc)
> > {
> > }
> >
> > @@ -376,7 +376,7 @@ drm_plane_helper_funcs
> > vmw_ldu_primary_plane_helper_funcs = {
> > };
> >
> > static const struct drm_crtc_helper_funcs vmw_ldu_crtc_helper_funcs = {
> > - .commit = vmw_ldu_crtc_helper_commit,
> > + .enable = vmw_ldu_crtc_helper_enable,
> > .disable = vmw_ldu_crtc_helper_disable,
> > .mode_set_nofb = vmw_ldu_crtc_mode_set_nofb,
> > .atomic_check = vmw_du_crtc_atomic_check,
> > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
> > b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c index 3b917c9b0c21..1cb826c503bf
> > 100644
> > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
> > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
> > @@ -270,13 +270,13 @@ static void vmw_sou_crtc_helper_prepare(struct
> > drm_crtc *crtc)
> > }
> >
> > /**
> > - * vmw_sou_crtc_helper_commit - Noop
> > + * vmw_sou_crtc_helper_enable - Noop
> > *
> > * @crtc: CRTC associated with the new screen
> > *
> > * This is called after a mode set has been completed.
> > */
> > -static void vmw_sou_crtc_helper_commit(struct drm_crtc *crtc)
> > +static void vmw_sou_crtc_helper_enable(struct drm_crtc *crtc)
> > {
> > }
> >
> > @@ -573,7 +573,7 @@ drm_plane_helper_funcs
> > vmw_sou_primary_plane_helper_funcs = {
> > static const struct drm_crtc_helper_funcs vmw_sou_crtc_helper_funcs = {
> > .prepare = vmw_sou_crtc_helper_prepare,
> > - .commit = vmw_sou_crtc_helper_commit,
> > + .enable = vmw_sou_crtc_helper_enable,
> > .disable = vmw_sou_crtc_helper_disable,
> > .mode_set_nofb = vmw_sou_crtc_mode_set_nofb,
> > .atomic_check = vmw_du_crtc_atomic_check,
> > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
> > b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c index 6aecba6cd5e2..4eb93b47d6db
> > 100644
> > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
> > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
> > @@ -412,7 +412,7 @@ static void vmw_stdu_crtc_helper_prepare(struct
> > drm_crtc *crtc)
> > }
> >
> > -static void vmw_stdu_crtc_helper_commit(struct drm_crtc *crtc)
> > +static void vmw_stdu_crtc_helper_enable(struct drm_crtc *crtc)
> > {
> > struct vmw_private *dev_priv;
> > struct vmw_screen_target_display_unit *stdu;
> > @@ -1415,7 +1415,7 @@ drm_plane_helper_funcs
> > vmw_stdu_primary_plane_helper_funcs = {>
> > static const struct drm_crtc_helper_funcs vmw_stdu_crtc_helper_funcs = {
> > .prepare = vmw_stdu_crtc_helper_prepare,
> > - .commit = vmw_stdu_crtc_helper_commit,
> > + .enable = vmw_stdu_crtc_helper_enable,
> > .disable = vmw_stdu_crtc_helper_disable,
> > .mode_set_nofb = vmw_stdu_crtc_mode_set_nofb,
> > .atomic_check = vmw_du_crtc_atomic_check,
--
Regards,
Laurent Pinchart
More information about the dri-devel
mailing list