From: Maxime Ripard <mripard@kernel.org>
To: "Maíra Canal" <mcanal@igalia.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>,
dri-devel@lists.freedesktop.org, Chen-Yu Tsai <wens@kernel.org>,
Dave Stevenson <dave.stevenson@raspberrypi.com>,
Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com>,
Samuel Holland <samuel@sholland.org>,
linux-sunxi@lists.linux.dev
Subject: Re: [PATCH 56/75] drm/atomic-state-helper: Rename connector_tv_reset to state_init
Date: Fri, 16 Oct 2026 14:35:54 +0200 [thread overview]
Message-ID: <atIaBCZtyGIZHanm@houat> (raw)
In-Reply-To: <1ae560be-63a2-425e-bd47-ed279448eeec@igalia.com>
[-- Attachment #1: Type: text/plain, Size: 3367 bytes --]
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 <mripard@kernel.org>
> > ---
> > Cc: "Maíra Canal" <mcanal@igalia.com>
> > Cc: Chen-Yu Tsai <wens@kernel.org>
> > Cc: Dave Stevenson <dave.stevenson@raspberrypi.com>
> > Cc: Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com>
> > Cc: Samuel Holland <samuel@sholland.org>
> > Cc: linux-sunxi@lists.linux.dev
> > ---
> > 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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]
next prev parent reply other threads:[~2026-10-16 12:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 17:26 [PATCH 00/75] drm/connector: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
2026-10-14 17:27 ` [PATCH 38/75] drm/sun4i: Switch to drm_atomic_helper_connector_create_state Maxime Ripard
2026-10-14 17:27 ` [PATCH 56/75] drm/atomic-state-helper: Rename connector_tv_reset to state_init Maxime Ripard
2026-10-14 18:03 ` sashiko-bot
2026-10-15 10:56 ` Maíra Canal
2026-10-16 12:35 ` Maxime Ripard [this message]
2026-10-14 17:27 ` [PATCH 60/75] drm/sun4i: hdmi: Convert to atomic_create_state Maxime Ripard
2026-10-14 17:27 ` [PATCH 61/75] drm/sun4i: tv: " Maxime Ripard
2026-10-14 18:08 ` sashiko-bot
2026-10-16 15:06 ` (subset) [PATCH 00/75] drm/connector: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
2026-10-16 15:12 ` Maxime Ripard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=atIaBCZtyGIZHanm@houat \
--to=mripard@kernel.org \
--cc=airlied@gmail.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-list@raspberrypi.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mcanal@igalia.com \
--cc=samuel@sholland.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=wens@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox