On Tue, Nov 10, 2026 at 05:10:01PM +0100, Maxime Ripard wrote:
> Hi Thierry,
> 
> On Thu, Nov 05, 2026 at 04:51:46PM +0100, Thierry Reding wrote:
> > On Thu, Nov 05, 2026 at 04:30:02PM +0100, Maxime Ripard wrote:
> > > drm_mode_config_reset() has a dual role: it creates the initial KMS
> > > state at probe time, and resets hardware and software state during
> > > suspend/resume cycles.
> > > 
> > > Since the two roles need different behaviors (notably for objects like
> > > drm_private_obj that must persist across suspend/resume),
> > > drm_mode_config_create_initial_state() was introduced to handle only
> > > the initial state creation at probe time.
> > > 
> > > Switch to drm_mode_config_create_initial_state().
> > > 
> > > Signed-off-by: Maxime Ripard <[email protected]>
> > > ---
> > > Cc: Jonathan Hunter <[email protected]>
> > > Cc: Mikko Perttunen <[email protected]>
> > > Cc: Thierry Reding <[email protected]>
> > > Cc: [email protected]
> > > ---
> > >  drivers/gpu/drm/tegra/drm.c | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > I'd have to check more closely since it's been a while, but I think we
> > might depend on the reset hooks getting called during probe.
> > 
> > Looking at the implementation of drm_mode_config_create_initial_state(),
> > it ends up calling drm_mode_config_connector_create_state(), which
> > silently exists if the connector doesn't implement atomic_create_state,
> > which none of the Tegra connectors do, so wouldn't that lead to a NULL
> > pointer dereference at some point?
> 
> AFAIK, all tegra connectors have now been converted to
> atomic_create_state instead of reset (commits c5c0e4821938 and
> f808d9f8e5a3 in drm-misc-next) so it shouldn't have any reset specific
> behaviour at all and the transition to
> drm_mode_config_create_initial_state().
> 
> Am I missing something?

Ah, I don't think they were in linux-next (which is what I was looking
at) yet when I replied. Looks like it should be fine now:

Acked-by: Thierry Reding <[email protected]>

Attachment: signature.asc
Description: PGP signature

Reply via email to