From: Thomas Zimmermann <tzimmermann@suse.de>
To: Shenghao Yang <me@shenghaoyang.info>,
Ruben Wauters <rubenru09@aol.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
kernel test robot <lkp@intel.com>,
Dan Carpenter <dan.carpenter@linaro.org>
Subject: Re: [PATCH v3] drm/gud: fix NULL crtc dereference on display disable
Date: Wed, 18 Feb 2026 15:46:28 +0100 [thread overview]
Message-ID: <8c7e3be1-bba8-4c2f-84e5-75cdc24f2e18@suse.de> (raw)
In-Reply-To: <6b763e11-447a-4db7-9c73-1dc941425d71@shenghaoyang.info>
Hi
Am 18.02.26 um 15:29 schrieb Shenghao Yang:
> Hi,
>
> On 18/2/26 16:04, Thomas Zimmermann wrote:
>
>> Hi
>>
>> Am 18.02.26 um 05:22 schrieb Shenghao Yang:
>>> Hi,
>>>
>>> Thanks for taking a look!
>>>
>>> On 6/2/26 15:52, Thomas Zimmermann wrote:
>>>
>>>>> +void gud_crtc_atomic_enable(struct drm_crtc *crtc,
>>>>> + struct drm_atomic_state *state)
>>>>> +{
>>>>> + struct drm_device *drm = crtc->dev;
>>>>> + struct gud_device *gdrm = to_gud_device(drm);
>>>>> + int idx;
>>>>> +
>>>>> + if (!drm_dev_enter(drm, &idx))
>>>>> + return;
>>>>> +
>>>>> + if (crtc->state->mode_changed || crtc->state->connectors_changed) {
>>>> I think you can do this unconditionally. Atomic_enable is supposed to be a full modeset and take some time. For simple pageflips, this function doesn't run at all.
>>>>
>>> I was trying this with proptest and toggling DPMS - the atomic_disable() and
>>> atomic_enable() functions get called in that path even if the mode doesn't
>>> change.
>>>
>>> The driver in 6.12 LTS (before the atomic changes) didn't send
>>> SET_CONTROLLER_ENABLE commands on DPMS changes either, so I thought it'd be
>>> safer to do the same here.
>> Leave it as it is if you like. But in DRM, we don't have real DPMS support for atomic modesetting. The DPMS on state is a full atomic_enable and the off and blanking states are atomic_disable IIRC. Doing that would be the correct handling.
> Ah - gotcha. I'll do some testing with the conditional removed.
> The worry about changing command sequences was a bit pedantic anyway -
> DPMS would have caused an instant oops in the current tree and nobody else
> has reported anything yet.
>
> Would y'all be happy to take a v5 afterwards? Apologies for all the
> iterations here :/
I'm OK with that. No worries.
Best regards
Thomas
>
> Thanks,
>
> Shenghao
>
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
prev parent reply other threads:[~2026-02-18 14:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-03 17:26 Shenghao Yang
2026-02-06 7:52 ` Thomas Zimmermann
2026-02-18 4:22 ` Shenghao Yang
2026-02-18 8:04 ` Thomas Zimmermann
2026-02-18 14:29 ` Shenghao Yang
2026-02-18 14:46 ` Thomas Zimmermann [this message]
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=8c7e3be1-bba8-4c2f-84e5-75cdc24f2e18@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=me@shenghaoyang.info \
--cc=mripard@kernel.org \
--cc=rubenru09@aol.com \
--cc=simona@ffwll.ch \
/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
all inboxes | Powered by JetHome®