Hi Maíra,

On Thu, Oct 15, 2026 at 07:56:05AM -0300, Maíra Canal wrote:
> Hi Maxime,
> 
> On 14/10/26 14:27, Maxime Ripard wrote:
> > Recent commits renamed other reset helpers to use the state_init
> > suffix when they only initialize properties rather than allocate or
> > update the object state itself.
> > 
> > drm_atomic_helper_connector_tv_reset() falls in the same category:
> > it initializes the analog TV properties from the kernel command line
> > defaults without allocating any state. It also reads the connector
> > state through connector->state, coupling it to the reset path.
> > 
> > Rename it to drm_atomic_helper_connector_tv_state_init() and pass
> > the connector state explicitly as a parameter. This decouples it
> > from the reset hook and prepares for the conversion to
> > atomic_create_state where connector->state is not yet assigned.
> > 
> > Signed-off-by: Maxime Ripard <[email protected]>
> > ---
> > Cc: "Maíra Canal" <[email protected]>
> > Cc: Chen-Yu Tsai <[email protected]>
> > Cc: Dave Stevenson <[email protected]>
> > Cc: Raspberry Pi Kernel Maintenance <[email protected]>
> > Cc: Samuel Holland <[email protected]>
> > Cc: [email protected]
> > ---
> >   drivers/gpu/drm/drm_atomic_state_helper.c | 11 ++++++-----
> >   drivers/gpu/drm/sun4i/sun4i_tv.c          |  2 +-
> >   drivers/gpu/drm/vc4/vc4_vec.c             |  2 +-
> >   include/drm/drm_atomic_state_helper.h     |  3 ++-
> >   4 files changed, 10 insertions(+), 8 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_atomic_state_helper.c 
> > b/drivers/gpu/drm/drm_atomic_state_helper.c
> > index 6238066fd5d6..1424c4873251 100644
> > --- a/drivers/gpu/drm/drm_atomic_state_helper.c
> > +++ b/drivers/gpu/drm/drm_atomic_state_helper.c
> > @@ -499,20 +499,21 @@ void 
> > drm_atomic_helper_connector_tv_margins_state_init(struct drm_connector_stat
> >     state->tv.margins.bottom = cmdline->tv_margins.bottom;
> >   }
> >   EXPORT_SYMBOL(drm_atomic_helper_connector_tv_margins_state_init);
> >   /**
> > - * drm_atomic_helper_connector_tv_reset - Resets Analog TV connector 
> > properties
> > + * drm_atomic_helper_connector_tv_state_init - Initializes Analog TV 
> > connector properties
> > + * @state: the DRM State object
> >    * @connector: DRM connector
> >    *
> > - * Resets the analog TV properties attached to a connector
> > + * Initializes the analog TV properties attached to a connector
> >    */
> > -void drm_atomic_helper_connector_tv_reset(struct drm_connector *connector)
> > +void drm_atomic_helper_connector_tv_state_init(struct drm_connector_state 
> > *state,
> > +                                          struct drm_connector *connector)
> >   {
> >     struct drm_device *dev = connector->dev;
> >     struct drm_cmdline_mode *cmdline = &connector->cmdline_mode;
> > -   struct drm_connector_state *state = connector->state;
> >     struct drm_property *prop;
> >     uint64_t val;
> >     prop = dev->mode_config.tv_mode_property;
> >     if (prop)
> > @@ -572,11 +573,11 @@ void drm_atomic_helper_connector_tv_reset(struct 
> > drm_connector *connector)
> >                     state->tv.hue = val;
> >     drm_atomic_helper_connector_tv_margins_state_init(connector->state,
> 
> Shouldn't it be s/connector->state/state here?

Yes, it should be. It's going to be fixed in the next version, thanks!
Maxime

Attachment: signature.asc
Description: PGP signature

Reply via email to