[PATCH] drm/amdgpu/vcn: fix gfxoff issue

Deucher, Alexander Alexander.Deucher at amd.com
Wed Apr 15 12:25:18 UTC 2020


[AMD Official Use Only - Internal Distribution Only]

Do we know if whatever issue was actually fixed on renoir?  If not, I'd say just leave it for now.

Alex

________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Zhu, Changfeng <Changfeng.Zhu at amd.com>
Sent: Wednesday, April 15, 2020 7:27 AM
To: Zhang, Hawking <Hawking.Zhang at amd.com>; Zhu, James <James.Zhu at amd.com>; Alex Deucher <alexdeucher at gmail.com>; amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Huang, Shimmer <Xinmei.Huang at amd.com>; Huang, Ray <Ray.Huang at amd.com>
Subject: RE: [PATCH] drm/amdgpu/vcn: fix gfxoff issue

[AMD Official Use Only - Internal Distribution Only]

After drop this WA,
It can't enter GFXOFF on raven2.
And it can't run S3 successfully on Picasso and raven1.

I suggest that it can add chip type and drop this WA only on renoir.

BR,
Changfeng

-----Original Message-----
From: Zhang, Hawking <Hawking.Zhang at amd.com>
Sent: Wednesday, April 15, 2020 11:05 AM
To: Zhu, James <James.Zhu at amd.com>; Alex Deucher <alexdeucher at gmail.com>; Zhu, Changfeng <Changfeng.Zhu at amd.com>; amd-gfx at lists.freedesktop.org
Cc: Zhang, Hawking <Hawking.Zhang at amd.com>
Subject: RE: [PATCH] drm/amdgpu/vcn: fix gfxoff issue

[AMD Official Use Only - Internal Distribution Only]

This actually introduced at very early stage we enabled GFXOFF for the first time on Raven platform. At that time gfxoff can't work with Video play back (this is general issue across all OSes). So we disabled gfxoff when there is workload on VCN.

For most ASICs, it shall be removed. The only concern is some old Raven platform where the rlc fw fixes are not available.

I had a quick chat with @Zhu, Changfeng who will have a quick validation on his old Raven platform so that we can safely remove this workaround finally.

Regards,
Hawking
-----Original Message-----
From: Zhu, James <James.Zhu at amd.com>
Sent: Tuesday, April 14, 2020 23:00
To: Alex Deucher <alexdeucher at gmail.com>; Zhu, James <James.Zhu at amd.com>; Zhang, Hawking <Hawking.Zhang at amd.com>
Cc: amd-gfx list <amd-gfx at lists.freedesktop.org>; Zhu, Changfeng <Changfeng.Zhu at amd.com>
Subject: Re: [PATCH] drm/amdgpu/vcn: fix gfxoff issue

+Hawking

Hi Hawking,

can we drop this WA?

Thanks!

James

On 2020-04-14 10:52 a.m., James Zhu wrote:
> +Rex
>
> This is introduce by below patch.
>
> commit 3fded222f4bf7f4c56ef4854872a39a4de08f7a8
> Author: Rex Zhu <Rex.Zhu at amd.com>
> Date:   Fri Jul 27 17:00:02 2018 +0800
>
>     drm/amdgpu: Disable gfx off if VCN is busy
>
>     this patch is a workaround for the gpu hang
>     at video begin/end time if gfx off is enabled.
>
>     Reviewed-by: Hawking Zhang <Hawking.Zhang at amd.com>
>     Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
>     Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
>
>
> On 2020-04-14 10:22 a.m., Alex Deucher wrote:
>> On Tue, Apr 14, 2020 at 8:05 AM James Zhu <James.Zhu at amd.com> wrote:
>>> Turn off gfxoff control when vcn is gated.
>>>
>>> Signed-off-by: James Zhu <James.Zhu at amd.com>
>>> ---
>>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 8 +++++---
>>>   1 file changed, 5 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>>> index dab34f6..aa9a7a5 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>>> @@ -369,9 +369,11 @@ void amdgpu_vcn_ring_begin_use(struct
>>> amdgpu_ring *ring) cancel_delayed_work_sync(&adev->vcn.idle_work);
>>>
>>>          mutex_lock(&adev->vcn.vcn_pg_lock);
>>> -       amdgpu_gfx_off_ctrl(adev, false);
>>> -       amdgpu_device_ip_set_powergating_state(adev,
>>> AMD_IP_BLOCK_TYPE_VCN,
>>> -              AMD_PG_STATE_UNGATE);
>>> +       if (adev->vcn.cur_state == AMD_PG_STATE_GATE) {
>>> +               amdgpu_gfx_off_ctrl(adev, false);
>>> +               amdgpu_device_ip_set_powergating_state(adev,
>>> AMD_IP_BLOCK_TYPE_VCN,
>>> +                      AMD_PG_STATE_UNGATE);
>>> +       }
>>>
>> Why are we touching gfxoff with VCN?  Was this a leftover from bring
>> up?  Can we just drop all of this gfxoff stuff from VCN handling?  I
>> don't see why there would be a dependency.
>>
>> Alex
>>
>>>          if (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG)    {
>>>                  struct dpg_pause_state new_state;
>>> --
>>> 2.7.4
>>>
>>> _______________________________________________
>>> amd-gfx mailing list
>>> amd-gfx at lists.freedesktop.org
>>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fli
>>> sts.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%
>>> 7CJames.Zhu%40amd.com%7C3dd9135c717a4b3011e308d7e07f52b6%7C3dd8961fe
>>> 4884e608e11a82d994e183d%7C0%7C0%7C637224709763391845&sdata=Y%2Bt
>>> sJQNB1TXCQ9v86DW%2F0FC63gOSHsfzzZFu0MDvCHw%3D&reserved=0
>>>
_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Calexander.deucher%40amd.com%7C9c7d297e1bae4b559e2c08d7e12ff6b7%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637225469199881257&sdata=l%2BQiZNOq%2F%2FazFg2wmPAt6ZmNSQfJsniMA4W%2BQUBzTxE%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20200415/25dec3d0/attachment.htm>


More information about the amd-gfx mailing list