[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dri-devel
Subject:    Re: [PATCH v2 3/3] drm: vmwgfx: Remove the legacy CRTC .prepare() helper operations
From:       Thomas Hellstrom <thellstrom () vmware ! com>
Date:       2017-06-30 13:41:33
Message-ID: 035f830e-bf38-45e0-14ee-04a62ed7bb21 () vmware ! com
[Download RAW message or body]

Hi, Daniel,

If possible, throw it into drm-misc. We have no changes for the next 
merge window at this time so it's a bit unnecessary to generate a 
separate pull request for this.

Thanks,
Thomas


On 06/30/2017 03:39 PM, Daniel Vetter wrote:
> Want me to throw this into drm-misc too, or will you pick this up in
> wmvgfx trees? Since it's not tree-wide there's no reason for it to go
> through drm-misc.
> -Daniel
> 
> On Fri, Jun 30, 2017 at 3:04 PM, Thomas Hellstrom <thellstrom@vmware.com> wrote:
> > Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
> > 
> > 
> > 
> > On 06/30/2017 11:36 AM, Laurent Pinchart wrote:
> > > The CRTC .prepare() helper operation is legacy code, drivers should
> > > use the .atomic_disable() operation instead.
> > > 
> > > When a CRTC is temporarily disabled prior to a mode set, the atomic
> > > helpers call the .prepare() operation if provided instead of the
> > > .atomic_disable() operation. In order to avoid modifying the driver's
> > > behaviour that has an empty .prepare() implementation, we need to return
> > > from the .atomic_disable() operation without performing any action if
> > > the CRTC will be reenabled.
> > > 
> > > Signed-off-by: Laurent Pinchart
> > > <laurent.pinchart+renesas@ideasonboard.com>
> > > ---
> > > drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 15 +++------------
> > > drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 10 +++-------
> > > 2 files changed, 6 insertions(+), 19 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
> > > b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
> > > index 854403509216..bdf6349de250 100644
> > > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
> > > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
> > > @@ -259,17 +259,6 @@ static void vmw_sou_crtc_mode_set_nofb(struct
> > > drm_crtc *crtc)
> > > }
> > > /**
> > > - * vmw_sou_crtc_helper_prepare - Noop
> > > - *
> > > - * @crtc: CRTC associated with the new screen
> > > - *
> > > - * Prepares the CRTC for a mode set, but we don't need to do anything
> > > here.
> > > - */
> > > -static void vmw_sou_crtc_helper_prepare(struct drm_crtc *crtc)
> > > -{
> > > -}
> > > -
> > > -/**
> > > * vmw_sou_crtc_atomic_enable - Noop
> > > *
> > > * @crtc: CRTC associated with the new screen
> > > @@ -299,6 +288,9 @@ static void vmw_sou_crtc_atomic_disable(struct
> > > drm_crtc *crtc,
> > > return;
> > > }
> > > +     if (crtc->state->enable)
> > > +               return;
> > > +
> > > sou = vmw_crtc_to_sou(crtc);
> > > dev_priv = vmw_priv(crtc->dev);
> > > @@ -574,7 +566,6 @@ 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,
> > > .mode_set_nofb = vmw_sou_crtc_mode_set_nofb,
> > > .atomic_check = vmw_du_crtc_atomic_check,
> > > .atomic_begin = vmw_du_crtc_atomic_begin,
> > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
> > > b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
> > > index ed9404a7f457..c3bd4a012b64 100644
> > > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
> > > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
> > > @@ -406,12 +406,6 @@ static void vmw_stdu_crtc_mode_set_nofb(struct
> > > drm_crtc *crtc)
> > > crtc->x, crtc->y);
> > > }
> > > -
> > > -static void vmw_stdu_crtc_helper_prepare(struct drm_crtc *crtc)
> > > -{
> > > -}
> > > -
> > > -
> > > static void vmw_stdu_crtc_atomic_enable(struct drm_crtc *crtc,
> > > struct drm_crtc_state *old_state)
> > > {
> > > @@ -446,6 +440,9 @@ static void vmw_stdu_crtc_atomic_disable(struct
> > > drm_crtc *crtc,
> > > return;
> > > }
> > > +     if (crtc->state->enable)
> > > +               return;
> > > +
> > > stdu     = vmw_crtc_to_stdu(crtc);
> > > dev_priv = vmw_priv(crtc->dev);
> > > @@ -1416,7 +1413,6 @@ 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,
> > > .mode_set_nofb = vmw_stdu_crtc_mode_set_nofb,
> > > .atomic_check = vmw_du_crtc_atomic_check,
> > > .atomic_begin = vmw_du_crtc_atomic_begin,
> > 
> > 
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman \
> > _listinfo_dri-2Ddevel&d=DwIBaQ&c=uilaK90D4TOVoH58JNXRgQ&r=wnSlgOCqfpNS4d02vP68_E9q \
> > 2BNMCwfD2OZ_6dCFVQQ&m=zvSnZOcctIomH3uHnUlUtGM3V2HQx8fRxI5e3gP1IWw&s=MsJ6mDVhjiu2b7IH0naLkx-srL98cgLZ5fXSilipnKI&e=
> > 
> 
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic