From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
To: Andy Yan <andyshrk@163.com>
Cc: "Sandy Huang" <hjc@rock-chips.com>,
"Heiko Stübner" <heiko@sntech.de>,
"Andy Yan" <andy.yan@rock-chips.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Sean Paul" <seanpaul@chromium.org>,
"Jeffy Chen" <jeffy.chen@rock-chips.com>,
"Andrzej Hajda" <andrzej.hajda@intel.com>,
"Mark Yao" <markyao0591@gmail.com>,
kernel@collabora.com, dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] drm/rockchip: Unregister platform drivers in reverse order
Date: Mon, 12 Aug 2024 23:04:12 +0300 [thread overview]
Message-ID: <31cb347a-1d14-4114-bad3-5e9e4e87bf08@collabora.com> (raw)
In-Reply-To: <3649004a.1f69.191445d79dc.Coremail.andyshrk@163.com>
Hi Andy,
On 8/12/24 5:14 AM, Andy Yan wrote:
>
> Hi Cristian,
>
> At 2024-08-08 19:58:02, "Cristian Ciocaltea" <cristian.ciocaltea@collabora.com> wrote:
>> Move rockchip_drm_platform_driver unregistration after its sub-drivers,
>> which ensures all drivers are unregistered in the reverse order used
>> when they were registered.
>
> Would you please provied some detail information about how to reproduce this
> issue this patch try to fix?Or some kernel log when this issue triggered。
I submitted this patch while investigating a couple of issues
encountered when tried to reload the rockchipdrm module.
One was a system freeze, which eventually proved to have a different
root cause and got fixed via [1]. The other one was a lockdep splat
which seems to be caused by the switch to maple tree register cache in
vop2 - I have a regmap workaround, not yet sure that's a proper fix.
As of v6.11-rc1, reloading the module works fine, w/ or w/o this patch
applied (ignoring the above mentioned splat). But I could only verify
on Rock 3A, hence unregistering the drivers in the correct order should,
at least, eliminate a potential source of unexpected behavior on the
other boards.
Regards,
Cristian
[1]: 9d42c3ee3ce3 ("arm64: dts: rockchip: Add missing power-domains for rk356x vop_mmu")
>> Fixes: 8820b68bd378 ("drm/rockchip: Refactor the component match logic.")
>> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
>> ---
>> drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>> index 44d769d9234d..ca7b07503fbe 100644
>> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>> @@ -528,10 +528,9 @@ static int __init rockchip_drm_init(void)
>>
>> static void __exit rockchip_drm_fini(void)
>> {
>> - platform_driver_unregister(&rockchip_drm_platform_driver);
>> -
>> platform_unregister_drivers(rockchip_sub_drivers,
>> num_rockchip_sub_drivers);
>> + platform_driver_unregister(&rockchip_drm_platform_driver);
>> }
>>
>> module_init(rockchip_drm_init);
>>
>> ---
>> base-commit: 1eb586a9782cde8e5091b9de74603e0a8386b09e
>> change-id: 20240702-rk-drm-fix-unreg-9f3f29996a00
>> --
>> Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
WARNING: multiple messages have this Message-ID (diff)
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
To: Andy Yan <andyshrk@163.com>
Cc: "Sandy Huang" <hjc@rock-chips.com>,
"Heiko Stübner" <heiko@sntech.de>,
"Andy Yan" <andy.yan@rock-chips.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Sean Paul" <seanpaul@chromium.org>,
"Jeffy Chen" <jeffy.chen@rock-chips.com>,
"Andrzej Hajda" <andrzej.hajda@intel.com>,
"Mark Yao" <markyao0591@gmail.com>,
kernel@collabora.com, dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] drm/rockchip: Unregister platform drivers in reverse order
Date: Mon, 12 Aug 2024 23:04:12 +0300 [thread overview]
Message-ID: <31cb347a-1d14-4114-bad3-5e9e4e87bf08@collabora.com> (raw)
In-Reply-To: <3649004a.1f69.191445d79dc.Coremail.andyshrk@163.com>
Hi Andy,
On 8/12/24 5:14 AM, Andy Yan wrote:
>
> Hi Cristian,
>
> At 2024-08-08 19:58:02, "Cristian Ciocaltea" <cristian.ciocaltea@collabora.com> wrote:
>> Move rockchip_drm_platform_driver unregistration after its sub-drivers,
>> which ensures all drivers are unregistered in the reverse order used
>> when they were registered.
>
> Would you please provied some detail information about how to reproduce this
> issue this patch try to fix?Or some kernel log when this issue triggered。
I submitted this patch while investigating a couple of issues
encountered when tried to reload the rockchipdrm module.
One was a system freeze, which eventually proved to have a different
root cause and got fixed via [1]. The other one was a lockdep splat
which seems to be caused by the switch to maple tree register cache in
vop2 - I have a regmap workaround, not yet sure that's a proper fix.
As of v6.11-rc1, reloading the module works fine, w/ or w/o this patch
applied (ignoring the above mentioned splat). But I could only verify
on Rock 3A, hence unregistering the drivers in the correct order should,
at least, eliminate a potential source of unexpected behavior on the
other boards.
Regards,
Cristian
[1]: 9d42c3ee3ce3 ("arm64: dts: rockchip: Add missing power-domains for rk356x vop_mmu")
>> Fixes: 8820b68bd378 ("drm/rockchip: Refactor the component match logic.")
>> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
>> ---
>> drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>> index 44d769d9234d..ca7b07503fbe 100644
>> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>> @@ -528,10 +528,9 @@ static int __init rockchip_drm_init(void)
>>
>> static void __exit rockchip_drm_fini(void)
>> {
>> - platform_driver_unregister(&rockchip_drm_platform_driver);
>> -
>> platform_unregister_drivers(rockchip_sub_drivers,
>> num_rockchip_sub_drivers);
>> + platform_driver_unregister(&rockchip_drm_platform_driver);
>> }
>>
>> module_init(rockchip_drm_init);
>>
>> ---
>> base-commit: 1eb586a9782cde8e5091b9de74603e0a8386b09e
>> change-id: 20240702-rk-drm-fix-unreg-9f3f29996a00
>> --
>> Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
next prev parent reply other threads:[~2024-08-12 20:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-08 11:58 [PATCH RESEND] drm/rockchip: Unregister platform drivers in reverse order Cristian Ciocaltea
2024-08-08 11:58 ` Cristian Ciocaltea
2024-08-12 2:14 ` Andy Yan
2024-08-12 2:14 ` Andy Yan
2024-08-12 20:04 ` Cristian Ciocaltea [this message]
2024-08-12 20:04 ` [PATCH " Cristian Ciocaltea
2024-08-15 14:21 ` Heiko Stübner
2024-08-15 14:21 ` Heiko Stübner
2024-08-15 17:26 ` Cristian Ciocaltea
2024-08-15 17:26 ` Cristian Ciocaltea
2024-08-15 17:52 ` Heiko Stübner
2024-08-15 17:52 ` Heiko Stübner
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=31cb347a-1d14-4114-bad3-5e9e4e87bf08@collabora.com \
--to=cristian.ciocaltea@collabora.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=andy.yan@rock-chips.com \
--cc=andyshrk@163.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=jeffy.chen@rock-chips.com \
--cc=kernel@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=markyao0591@gmail.com \
--cc=mripard@kernel.org \
--cc=seanpaul@chromium.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.