From: "Nirujogi, Pratap" <pnirujog@amd.com>
To: Alex Deucher <alexdeucher@gmail.com>,
Pratap Nirujogi <pratap.nirujogi@amd.com>
Cc: amd-gfx@lists.freedesktop.org, alexander.deucher@amd.com,
mlimonci@amd.com, christian.koenig@amd.com,
rafael.j.wysocki@intel.com, benjamin.chan@amd.com,
bin.du@amd.com, king.li@amd.com
Subject: Re: [PATCH v1] drm/amdgpu: Fix ISP regression issue in kernel v7.0
Date: Mon, 9 Mar 2026 18:18:24 -0400 [thread overview]
Message-ID: <218c7cca-9eed-49aa-9d84-490f51575d31@amd.com> (raw)
In-Reply-To: <CADnq5_Ns2bh1nbPrbtBj1iajyp-5mtB7a_0yBv56vzsQRyRwmw@mail.gmail.com>
On 3/9/2026 6:05 PM, Alex Deucher wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
> On Mon, Mar 9, 2026 at 5:59 PM Pratap Nirujogi <pratap.nirujogi@amd.com> wrote:
>>
>> Add NULL pointer checks for dev->type before accessing
>> dev->type->name in ISP genpd add/remove functions to
>> prevent kernel crashes. Also add MODULE_SOFTDEP to ensure
>> ISP driver dependencies are loaded in correct order.
>>
>> The regression was introduced in kernel v7.0 where MFD ISP
>> device enumeration doesn't complete by the time it is added
>> to gendp. The timing of ISP device enumeration has changed
>> because of the changes in registering the device sources in
>> the device hierarchy.
>>
>> Co-developed-by: Bin Du <Bin.Du@amd.com>
>> Fixes: 02c057ddefef ("ACPI: video: Convert the driver to a platform one")
>
> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/5021
>
> I'm not too familiar with the underlying issue. Does this actually
> result in the driver loading properly or does it just prevent a
> segfault?
>
> Alex
>
yes, this fixes both segfaults and automatic modprobe issues with isp
device. Camera works along with suspend/resume when the system boots to
desktop without any manual steps involved. Please note that the below
ACPI driver fix also needs to be included when verifying this patch to
observe the stated results.
https://lore.kernel.org/all/5986516.DvuYhMxLoT@rafael.j.wysocki/
Thanks,
Pratap
>> Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
>> drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c | 4 ++--
>> 2 files changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
>> index 95d26f086d545..920595f0d22ca 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
>> @@ -3212,3 +3212,4 @@ module_exit(amdgpu_exit);
>> MODULE_AUTHOR(DRIVER_AUTHOR);
>> MODULE_DESCRIPTION(DRIVER_DESC);
>> MODULE_LICENSE("GPL and additional rights");
>> +MODULE_SOFTDEP("post: amd_isp4_capture i2c-designware-amdisp pinctrl-amdisp");
>> \ No newline at end of file
>> diff --git a/drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c b/drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c
>> index b3590b33cab9e..485ecdec96184 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c
>> @@ -129,7 +129,7 @@ static int isp_genpd_add_device(struct device *dev, void *data)
>> if (!pdev)
>> return -EINVAL;
>>
>> - if (!dev->type->name) {
>> + if (!dev->type || !dev->type->name) {
>> drm_dbg(&adev->ddev, "Invalid device type to add\n");
>> goto exit;
>> }
>> @@ -165,7 +165,7 @@ static int isp_genpd_remove_device(struct device *dev, void *data)
>> if (!pdev)
>> return -EINVAL;
>>
>> - if (!dev->type->name) {
>> + if (!dev->type || !dev->type->name) {
>> drm_dbg(&adev->ddev, "Invalid device type to remove\n");
>> goto exit;
>> }
>> --
>> 2.43.0
>>
prev parent reply other threads:[~2026-03-09 22:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 21:50 [PATCH v1] drm/amdgpu: Fix ISP regression issue in kernel v7.0 Pratap Nirujogi
2026-03-09 21:58 ` Mario Limonciello
2026-03-09 22:08 ` Nirujogi, Pratap
2026-03-10 22:52 ` Nirujogi, Pratap
2026-03-11 5:26 ` Mario Limonciello
2026-03-11 15:29 ` Nirujogi, Pratap
2026-03-13 11:49 ` Du, Bin
2026-03-18 4:03 ` Nirujogi, Pratap
2026-03-18 6:21 ` Du, Bin
2026-03-18 3:59 ` Nirujogi, Pratap
2026-03-09 22:05 ` Alex Deucher
2026-03-09 22:18 ` Nirujogi, Pratap [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=218c7cca-9eed-49aa-9d84-490f51575d31@amd.com \
--to=pnirujog@amd.com \
--cc=alexander.deucher@amd.com \
--cc=alexdeucher@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=benjamin.chan@amd.com \
--cc=bin.du@amd.com \
--cc=christian.koenig@amd.com \
--cc=king.li@amd.com \
--cc=mlimonci@amd.com \
--cc=pratap.nirujogi@amd.com \
--cc=rafael.j.wysocki@intel.com \
/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