From: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
To: "Quan, Evan" <Evan.Quan@amd.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Cc: "ckoenig.leichtzumerken@gmail.com" <ckoenig.leichtzumerken@gmail.com>
Subject: Re: [PATCH 1/4] drm/amdgpu: Move flush VCE idle_work during HW fini
Date: Tue, 24 Aug 2021 23:20:11 -0400 [thread overview]
Message-ID: <f7a27b4b-6388-0b3a-bc01-30772b9dfe15@amd.com> (raw)
In-Reply-To: <DM6PR12MB26194A97EA61197582FF4742E4C69@DM6PR12MB2619.namprd12.prod.outlook.com>
Right, they will cover my use case, when are they landing ? I rebased
today and haven't seen them.
Andrey
On 2021-08-24 9:41 p.m., Quan, Evan wrote:
> [AMD Official Use Only]
>
> Hi Andrey,
>
> I sent out a similar patch set to address S3 issue. And I believe it should be able to address the issue here too.
> https://lists.freedesktop.org/archives/amd-gfx/2021-August/067972.html
> https://lists.freedesktop.org/archives/amd-gfx/2021-August/067967.html
>
> BR
> Evan
>> -----Original Message-----
>> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of
>> Andrey Grodzovsky
>> Sent: Wednesday, August 25, 2021 5:01 AM
>> To: dri-devel@lists.freedesktop.org; amd-gfx@lists.freedesktop.org
>> Cc: ckoenig.leichtzumerken@gmail.com; Grodzovsky, Andrey
>> <Andrey.Grodzovsky@amd.com>
>> Subject: [PATCH 1/4] drm/amdgpu: Move flush VCE idle_work during HW fini
>>
>> Attepmts to powergate after device is removed lead to crash.
>>
>> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 1 -
>> drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 4 ++++
>> drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 5 ++++-
>> drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 2 ++
>> 4 files changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>> index 1ae7f824adc7..8e8dee9fac9f 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>> @@ -218,7 +218,6 @@ int amdgpu_vce_sw_fini(struct amdgpu_device
>> *adev)
>> if (adev->vce.vcpu_bo == NULL)
>> return 0;
>>
>> - cancel_delayed_work_sync(&adev->vce.idle_work);
>> drm_sched_entity_destroy(&adev->vce.entity);
>>
>> amdgpu_bo_free_kernel(&adev->vce.vcpu_bo, &adev-
>>> vce.gpu_addr,
>> diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c
>> b/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c
>> index c7d28c169be5..716dfdd020b4 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c
>> @@ -477,6 +477,10 @@ static int vce_v2_0_hw_init(void *handle)
>>
>> static int vce_v2_0_hw_fini(void *handle)
>> {
>> + struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>> +
>> + cancel_delayed_work_sync(&adev->vce.idle_work);
>> +
>> return 0;
>> }
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
>> b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
>> index 3b82fb289ef6..49581c6e0cea 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
>> @@ -495,7 +495,10 @@ static int vce_v3_0_hw_fini(void *handle)
>> return r;
>>
>> vce_v3_0_stop(adev);
>> - return vce_v3_0_set_clockgating_state(adev,
>> AMD_CG_STATE_GATE);
>> + r = vce_v3_0_set_clockgating_state(adev, AMD_CG_STATE_GATE);
>> + cancel_delayed_work_sync(&adev->vce.idle_work);
>> +
>> + return r;
>> }
>>
>> static int vce_v3_0_suspend(void *handle)
>> diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
>> b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
>> index 90910d19db12..3297405fd32d 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
>> @@ -550,6 +550,8 @@ static int vce_v4_0_hw_fini(void *handle)
>> DRM_DEBUG("For SRIOV client, shouldn't do anything.\n");
>> }
>>
>> + cancel_delayed_work_sync(&adev->vce.idle_work);
>> +
>> return 0;
>> }
>>
>> --
>> 2.25.1
next prev parent reply other threads:[~2021-08-25 3:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-24 21:01 [PATCH 0/4] Various fixes to pass libdrm hotunplug tests Andrey Grodzovsky
2021-08-24 21:01 ` [PATCH 1/4] drm/amdgpu: Move flush VCE idle_work during HW fini Andrey Grodzovsky
2021-08-25 1:41 ` Quan, Evan
2021-08-25 3:20 ` Andrey Grodzovsky [this message]
2021-08-25 3:56 ` Quan, Evan
2021-08-24 21:01 ` [PATCH 2/4] drm/ttm: Create pinned list Andrey Grodzovsky
2021-08-25 6:40 ` Christian König
2021-08-24 21:01 ` [PATCH 3/4] drm/amdgpu: drm/amdgpu: Handle IOMMU enabled case Andrey Grodzovsky
2021-08-25 6:43 ` Christian König
2021-08-25 15:36 ` Andrey Grodzovsky
2021-08-26 13:43 ` Andrey Grodzovsky
2021-08-26 14:52 ` Christian König
2021-08-24 21:01 ` [PATCH 4/4] drm/amdgpu: Add a UAPI flag for hot plug/unplug Andrey Grodzovsky
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=f7a27b4b-6388-0b3a-bc01-30772b9dfe15@amd.com \
--to=andrey.grodzovsky@amd.com \
--cc=Evan.Quan@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=dri-devel@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