Linux Tegra architecture development
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@kernel.org>
To: Maxime Ripard <mripard@kernel.org>
Cc: David Airlie <airlied@gmail.com>,
	 Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Simona Vetter <simona@ffwll.ch>,
	 Thomas Zimmermann <tzimmermann@suse.de>,
	dri-devel@lists.freedesktop.org,
	 Jonathan Hunter <jonathanh@nvidia.com>,
	Mikko Perttunen <mperttunen@nvidia.com>,
	 linux-tegra@vger.kernel.org
Subject: Re: [PATCH RESEND 53/83] drm/tegra: Switch to drm_mode_config_create_initial_state
Date: Tue, 17 Nov 2026 12:24:49 +0100	[thread overview]
Message-ID: <avw5LNHICh6OHpqs@orome> (raw)
In-Reply-To: <avNBTIciv6QlEp9a@houat>

[-- Attachment #1: Type: text/plain, Size: 2116 bytes --]

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 <mripard@kernel.org>
> > > ---
> > > Cc: Jonathan Hunter <jonathanh@nvidia.com>
> > > Cc: Mikko Perttunen <mperttunen@nvidia.com>
> > > Cc: Thierry Reding <thierry.reding@kernel.org>
> > > Cc: linux-tegra@vger.kernel.org
> > > ---
> > >  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 <treding@nvidia.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2026-11-17 11:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 15:29 [PATCH RESEND 00/83] drm: Switch drivers to drm_mode_config_create_initial_state Maxime Ripard
2026-11-05 15:30 ` [PATCH RESEND 53/83] drm/tegra: Switch " Maxime Ripard
2026-11-05 15:51   ` Thierry Reding
2026-11-10 16:10     ` Maxime Ripard
2026-11-17 11:24       ` Thierry Reding [this message]
2026-11-12 13:32 ` (subset) [PATCH RESEND 00/83] drm: Switch drivers " Maxime Ripard
2026-11-16 10:20 ` 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=avw5LNHICh6OHpqs@orome \
    --to=thierry.reding@kernel.org \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jonathanh@nvidia.com \
    --cc=linux-tegra@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mperttunen@nvidia.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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