Re: [PATCH v2 2/8] drm/connector: Pass a drm_connector_state to ->atomic_commit()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2 Jul 2018 09:51:46 +0200
Daniel Vetter <daniel@xxxxxxxx> wrote:

> On Fri, Jun 29, 2018 at 12:37:10PM +0100, Liviu Dudau wrote:
> > On Fri, Jun 29, 2018 at 01:17:15PM +0200, Boris Brezillon wrote:  
> > > Other atomic hooks are passed state objects, let's change this one to
> > > be consistent.
> > > 
> > > Signed-off-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxx>
> > > ---
> > >  drivers/gpu/drm/drm_atomic_helper.c      | 2 +-
> > >  include/drm/drm_modeset_helper_vtables.h | 4 +++-
> > >  2 files changed, 4 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> > > index 17baf5057132..69063bcf2334 100644
> > > --- a/drivers/gpu/drm/drm_atomic_helper.c
> > > +++ b/drivers/gpu/drm/drm_atomic_helper.c
> > > @@ -1187,7 +1187,7 @@ static void drm_atomic_helper_commit_writebacks(struct drm_device *dev,
> > >  
> > >  		if (new_conn_state->writeback_job && new_conn_state->writeback_job->fb) {
> > >  			WARN_ON(connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK);
> > > -			funcs->atomic_commit(connector, new_conn_state->writeback_job);
> > > +			funcs->atomic_commit(connector, new_conn_state);  
> > 
> > Forgot to add: I think it is worth adding a check here that the hook has
> > been implemented by the driver, AFAIK it is not a mandatory hook, even
> > for writeback enabled drivers.  

I'm just curious, from where do you queue the writeback job if you don't
have a connector->atomic_commit() hook implemented? AFAICT, the
encoder->enable() method is only called when the encoder is being
enabled, and not every time you update the FB_ID prop of the writeback
connector. Am I missing something?

> 
> Either way this should be documented in the hook (atm it says nothing
> about whether it's mandatory/optional and for whom).

I'm fine making this hook optional. I'll update the code and the doc in
a separate commit.
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux