From: "Christian König" <christian.koenig@amd.com>
To: "Liang, Prike" <Prike.Liang@amd.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>,
"Lazar, Lijo" <Lijo.Lazar@amd.com>,
"Prosyak, Vitaly" <Vitaly.Prosyak@amd.com>
Subject: Re: [PATCH 2/9] drm/amdgpu: skip VKMS mode-config helpers during GPU reset
Date: Thu, 15 Oct 2026 10:32:57 +0200 [thread overview]
Message-ID: <43e70032-cfa2-4202-a8b2-6472fca5552a@amd.com> (raw)
In-Reply-To: <PH7PR12MB6000696BA9F3E5C409CC2ED7FB9C2@PH7PR12MB6000.namprd12.prod.outlook.com>
On 10/15/26 05:45, Liang, Prike wrote:
> AMD General
>
> Regards,
> Prike
>
>> -----Original Message-----
>> From: Koenig, Christian <Christian.Koenig@amd.com>
>> Sent: Tuesday, October 13, 2026 5:28 PM
>> To: Liang, Prike <Prike.Liang@amd.com>; amd-gfx@lists.freedesktop.org
>> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Lazar, Lijo
>> <Lijo.Lazar@amd.com>; Prosyak, Vitaly <Vitaly.Prosyak@amd.com>
>> Subject: Re: [PATCH 2/9] drm/amdgpu: skip VKMS mode-config helpers during GPU
>> reset
>>
>> On 10/13/26 10:24, Prike Liang wrote:
>>> GPU recovery already notifies DRM clients. Skip the VKMS mode-config
>>> suspend/resume helpers during that internal reset to avoid duplicate
>>> client notification and atomic-state handling under the reset lock.
>>> Keep ordinary system suspend and resume unchanged.
>>
>> Clear NAK to that as well.
>>
>> The amdgpu_in_reset() function can only be called from inside the GPU reset itself!
>>
>> It is *NOT* allowed to skip any operation outside the reset depending on this.
>
> How about moving the drm_mode_config_helper_suspend()/resume() calls for
> VKMS into the system suspend/resume path (amdgpu_device_suspend/resume())?
> VKMS has no hardware state a reset can lose, so recovery doesn't need them,
> and that can drop the amdgpu_in_reset() check entirely.
I'm not an expert for the VKMS stuff but that sounds like it makes sense to me.
Regards,
Christian.
>
> Regards,
> Prike
>> Regards,
>> Christian.
>>
>>>
>>> Signed-off-by: Prike Liang <Prike.Liang@amd.com>
>>> ---
>>> drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 6 ++++++
>>> 1 file changed, 6 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
>>> index d6b51b3f216b..a49c7dda4c4e 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
>>> @@ -491,6 +491,9 @@ static int amdgpu_vkms_suspend(struct
>> amdgpu_ip_block *ip_block)
>>> struct amdgpu_device *adev = ip_block->adev;
>>> int r;
>>>
>>> + if (amdgpu_in_reset(adev))
>>> + return 0;
>>> +
>>> r = drm_mode_config_helper_suspend(adev_to_drm(adev));
>>> if (r)
>>> return r;
>>> @@ -505,6 +508,9 @@ static int amdgpu_vkms_resume(struct amdgpu_ip_block
>> *ip_block)
>>> r = amdgpu_vkms_hw_init(ip_block);
>>> if (r)
>>> return r;
>>> + if (amdgpu_in_reset(ip_block->adev))
>>> + return 0;
>>> +
>>> return drm_mode_config_helper_resume(adev_to_drm(ip_block->adev));
>>> }
>>>
>
next prev parent reply other threads:[~2026-10-15 8:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 8:24 [PATCH 1/9] drm/amdgpu: defer GPU recovery after userq eviction failure Prike Liang
2026-10-13 8:24 ` [PATCH 2/9] drm/amdgpu: skip VKMS mode-config helpers during GPU reset Prike Liang
2026-10-13 9:27 ` Christian König
2026-10-15 3:45 ` Liang, Prike
2026-10-15 8:32 ` Christian König [this message]
2026-10-13 8:24 ` [PATCH 3/9] drm/amdgpu: skip VMHUB fault handling while the device is inaccessible Prike Liang
2026-10-13 8:24 ` [PATCH 4/9] drm/amdgpu/userq: complete hung queue fences after successful removal Prike Liang
2026-10-13 8:24 ` [PATCH 5/9] drm/amdgpu: finish GPU recovery callbacks before restarting schedulers Prike Liang
2026-10-13 8:24 ` [PATCH 6/9] drm/amdgpu: serialize JPEG and VCN idle work with GPU reset Prike Liang
2026-10-13 9:28 ` Christian König
2026-10-13 8:24 ` [PATCH 7/9] drm/amdgpu/userq: take reset_domain->sem before userq_mutex in destroy Prike Liang
2026-10-13 9:30 ` Christian König
2026-10-15 6:38 ` Liang, Prike
2026-10-13 8:24 ` [PATCH 8/9] drm/amdgpu/userq: take reset_domain->sem before userq_mutex in create Prike Liang
2026-10-13 8:24 ` [PATCH 9/9] drm/amdgpu/mes: skip unmap queue notification during GPU reset Prike Liang
2026-10-13 9:26 ` [PATCH 1/9] drm/amdgpu: defer GPU recovery after userq eviction failure Christian König
2026-10-14 9:02 ` Liang, Prike
2026-10-14 10:56 ` Christian König
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=43e70032-cfa2-4202-a8b2-6472fca5552a@amd.com \
--to=christian.koenig@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Lijo.Lazar@amd.com \
--cc=Prike.Liang@amd.com \
--cc=Vitaly.Prosyak@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/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