[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5271432.LvFx2qVVIh@workhorse>
Date: Wed, 26 Feb 2025 21:28:42 +0100
From: Nicolas Frattaroli <nicolas.frattaroli@...labora.com>
To: gregkh@...uxfoundation.org, heiko@...ech.de,
Heiko Stuebner <heiko@...ech.de>
Cc: rafael@...nel.org, dakr@...nel.org, hjc@...k-chips.com,
andy.yan@...k-chips.com, maarten.lankhorst@...ux.intel.com,
mripard@...nel.org, tzimmermann@...e.de, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, quentin.schulz@...rry.de
Subject:
Re: [PATCH 2/2] drm/rockchip: Fix shutdown when no drm-device is set up
On Friday, 21 February 2025 00:41:41 Central European Standard Time Heiko
Stuebner wrote:
> When the drm-driver probes, it mainly creates the component device, where
> all the sub-drivers (vops, hdmi, etc) hook into.
>
> This will cause the shutdown handler to get called on shutdown, even
> though the drm-device might not have been set up, or the component bind
> might have failed.
>
> So use the new component helper to check whether the drm-device is up
> and only then call the drm-atomic helper to release all the drm magic.
>
> This prevents failures when the drm-device is never set, or has been
> freed up already for example by a probe-defer during the component bind.
>
> Signed-off-by: Heiko Stuebner <heiko@...ech.de>
> ---
> drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
Reviewed-by: Nicolas Frattaroli <nicolas.frattaroli@...labora.com>
Tested-by: Nicolas Frattaroli <nicolas.frattaroli@...labora.com>
Tested on a RK3588 ROCK5B by adding a `return -EPROBE_DEFER` into the middle
of `rockchip_drm_bind` after `component_bind_all` already ran. Without the
patch, I get a stacktrace in `drm_atomic_helper_shutdown`. With the patch, I
don't get one.
Powered by blists - more mailing lists