> -----Original Message-----
> From: Kandpal, Suraj
> Sent: Friday, August 8, 2025 10:35 AM
> To: Louis Chauvet <[email protected]>; Dmitry Baryshkov
> <[email protected]>; Jani Nikula
> <[email protected]>; Harry Wentland <[email protected]>;
> Leo Li <[email protected]>; Rodrigo Siqueira <[email protected]>; Alex
> Deucher <[email protected]>; Christian König
> <[email protected]>; David Airlie <[email protected]>; Simona Vetter
> <[email protected]>; Liviu Dudau <[email protected]>; Maarten Lankhorst
> <[email protected]>; Maxime Ripard <[email protected]>;
> Thomas Zimmermann <[email protected]>; Rob Clark
> <[email protected]>; Dmitry Baryshkov <[email protected]>;
> Abhinav Kumar <[email protected]>; Jessica Zhang
> <[email protected]>; Sean Paul <[email protected]>; Marijn
> Suijten <[email protected]>; Laurent Pinchart
> <[email protected]>; Tomi Valkeinen
> <[email protected]>; Kieran Bingham
> <[email protected]>; Geert Uytterhoeven
> <[email protected]>; Magnus Damm <[email protected]>;
> Dave Stevenson <[email protected]>; Maíra Canal
> <[email protected]>; Raspberry Pi Kernel Maintenance <kernel-
> [email protected]>
> Cc: [email protected]; [email protected]; linux-
> [email protected]; [email protected];
> [email protected]; [email protected]
> Subject: RE: [PATCH 8/8] drm: writeback: rename
> drm_writeback_connector_init_with_encoder()
> 
> > > Signed-off-by: Dmitry Baryshkov <[email protected]>
> 
> LGTM,
> Reviewed-by: Suraj Kandpal <[email protected]>

One thing I noticed was after the Rename both drm_writeback_connector_init
And drmm_writeback_connector_init have identical comments both allowing custom 
encoders
To be used now is that what we were aiming for with the only difference being 
the 
ret = drmm_add_action_or_reset(dev, drm_writeback_connector_cleanup,
                                       wb_connector);
call ?

Regards,
Suraj Kandpal

> 
> > > ---
> > >   drivers/gpu/drm/drm_writeback.c | 14 +++++++-------
> > >   include/drm/drm_writeback.h     | 10 +++++-----
> > >   2 files changed, 12 insertions(+), 12 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/drm_writeback.c
> > > b/drivers/gpu/drm/drm_writeback.c index
> > >
> >
> 1a01df91b2c5868e158d489b782f4c57c61a272c..ec2575c4c21b7449707b05953
> > 22e
> > > 2202a0cf9865 100644
> > > --- a/drivers/gpu/drm/drm_writeback.c
> > > +++ b/drivers/gpu/drm/drm_writeback.c
> > > @@ -235,7 +235,7 @@ static int __drm_writeback_connector_init(struct
> > drm_device *dev,
> > >   }
> > >
> > >   /**
> > > - * drm_writeback_connector_init_with_encoder - Initialize a
> > > writeback connector with
> > > + * drm_writeback_connector_init - Initialize a writeback connector
> > > + with
> > >    * a custom encoder
> >
> > If I understood correctly your series you want to reduce the usage of
> > non- drmm writeback, so maybe we can add a comment to direct poeple to
> > drmm variant to avoid new usage of this API?
> >
> > With or without this:
> >
> > Reviewed-by: Louis Chauvet <[email protected]>
> >
> > >    *
> > >    * @dev: DRM device
> > > @@ -263,11 +263,11 @@ static int
> > > __drm_writeback_connector_init(struct
> > drm_device *dev,
> > >    *
> > >    * Returns: 0 on success, or a negative error code
> > >    */
> > > -int drm_writeback_connector_init_with_encoder(struct drm_device *dev,
> > > -                                       struct drm_writeback_connector
> > *wb_connector,
> > > -                                       struct drm_encoder *enc,
> > > -                                       const struct drm_connector_funcs
> > *con_funcs,
> > > -                                       const u32 *formats, int n_formats)
> > > +int drm_writeback_connector_init(struct drm_device *dev,
> > > +                          struct drm_writeback_connector
> > *wb_connector,
> > > +                          const struct drm_connector_funcs
> > *con_funcs,
> > > +                          struct drm_encoder *enc,
> > > +                          const u32 *formats, int n_formats)
> > >   {
> > >           struct drm_connector *connector = &wb_connector->base;
> > >           int ret;
> > > @@ -284,7 +284,7 @@ int
> > > drm_writeback_connector_init_with_encoder(struct drm_device *dev,
> > >
> > >           return ret;
> > >   }
> > > -EXPORT_SYMBOL(drm_writeback_connector_init_with_encoder);
> > > +EXPORT_SYMBOL(drm_writeback_connector_init);
> > >
> > >   /**
> > >    * drm_writeback_connector_cleanup - Cleanup the writeback
> > > connector diff --git a/include/drm/drm_writeback.h
> > > b/include/drm/drm_writeback.h index
> > >
> >
> 879ca103320cc225ffb3687419088361315535fc..958466a05e604b387722610fc1
> > 1f
> > > 9e841316d21b 100644
> > > --- a/include/drm/drm_writeback.h
> > > +++ b/include/drm/drm_writeback.h
> > > @@ -137,11 +137,11 @@ drm_connector_to_writeback(struct
> > drm_connector *connector)
> > >           return container_of(connector, struct drm_writeback_connector, 
> > > base);
> > >   }
> > >
> > > -int drm_writeback_connector_init_with_encoder(struct drm_device *dev,
> > > -                         struct drm_writeback_connector
> > *wb_connector,
> > > -                         struct drm_encoder *enc,
> > > -                         const struct drm_connector_funcs
> > *con_funcs, const u32 *formats,
> > > -                         int n_formats);
> > > +int drm_writeback_connector_init(struct drm_device *dev,
> > > +                          struct drm_writeback_connector
> > *wb_connector,
> > > +                          const struct drm_connector_funcs
> > *con_funcs,
> > > +                          struct drm_encoder *enc,
> > > +                          const u32 *formats, int n_formats);
> > >
> > >   int drmm_writeback_connector_init(struct drm_device *dev,
> > >                                     struct drm_writeback_connector
> > *wb_connector,
> > >
> >
> > --
> > Louis Chauvet, Bootlin
> > Embedded Linux and Kernel engineering
> > https://bootlin.com

Reply via email to