RE: bf756fb833cb ("drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend")

2021-11-07 Thread Quan, Evan
[AMD Official Use Only]

Thanks Boris.

BR
Evan
> -Original Message-
> From: Borislav Petkov 
> Sent: Friday, November 5, 2021 7:24 PM
> To: Quan, Evan 
> Cc: amd-gfx list ; Lazar, Lijo
> ; Deucher, Alexander
> 
> Subject: Re: bf756fb833cb ("drm/amdgpu: add missing cleanups for Polaris12
> UVD/VCE on suspend")
> 
> On Fri, Nov 05, 2021 at 08:05:41AM +, Quan, Evan wrote:
> > I'm wondering are you able to give the attached patch(alone) a try.
> 
> Yap, looks good.
> 
> Tested-by: Borislav Petkov 
> 
> --
> Regards/Gruss,
> Boris.
> 
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpeo
> ple.kernel.org%2Ftglx%2Fnotes-about-
> netiquettedata=04%7C01%7CEvan.Quan%40amd.com%7Cbd84356a29
> d5445f98b208d9a04ecbdb%7C3dd8961fe4884e608e11a82d994e183d%7C0%7
> C0%7C637717083006632366%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w
> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0s
> data=pkaeF4lIGyQY2Ss0Oq7VOKZ4PaIPDZwltJiqyqRco0c%3Dreserved
> =0


Re: bf756fb833cb ("drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend")

2021-11-05 Thread Borislav Petkov
On Fri, Nov 05, 2021 at 08:05:41AM +, Quan, Evan wrote:
> I'm wondering are you able to give the attached patch(alone) a try.

Yap, looks good.

Tested-by: Borislav Petkov 

-- 
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette


RE: bf756fb833cb ("drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend")

2021-10-15 Thread Quan, Evan
[AMD Official Use Only]



> -Original Message-
> From: Borislav Petkov 
> Sent: Thursday, October 14, 2021 5:01 PM
> To: Quan, Evan 
> Cc: Alex Deucher ; amd-gfx list  g...@lists.freedesktop.org>; LKML ; Deucher,
> Alexander ; Pan, Xinhui
> ; Chen, Guchun 
> Subject: Re: bf756fb833cb ("drm/amdgpu: add missing cleanups for Polaris12
> UVD/VCE on suspend")
> 
> On Thu, Oct 14, 2021 at 02:02:48AM +, Quan, Evan wrote:
> > [Quan, Evan] Yes, but not(apply them) at the same time. One by one as
> you did before.
> > - try the patch1 first
> 
> Ok, first patch worked fine.
> 
> > - undo the changes of patch1 and try patch2
> 
> Did that, worked fine too except after the first resume cycle, the video 
> didn't
> continue playing.
> 
> Then I restarted the video and did a couple more suspend cycles to see if it
> would not continue again. In the subsequent tries it would resume fine and
> the video would continue playing too.
> 
> So I'm going to chalk that single case of halted video with the second patch 
> to
> a resume glitch or so.
> 
> Btw, I don't have pm-suspend on that box but I did suspend to RAM
> assuming this is what you wanted, which is done as root with two
> commands:
> 
> # echo "suspend" > /sys/power/disk
> # echo "mem" > /sys/power/state
[Quan, Evan] Yes, that also works.
> 
> If you want me to do more extensive testing, just shoot.
[Quan, Evan] Thanks! That's enough for now. I will prepare an official solution 
for the issue.

BR
Evan
> 
> HTH.
> 
> --
> Regards/Gruss,
> Boris.
> 
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpeo
> ple.kernel.org%2Ftglx%2Fnotes-about-
> netiquettedata=04%7C01%7CEvan.Quan%40amd.com%7C08df3d5453
> d64ad40dfa08d98ef119ec%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C
> 0%7C637697988457790715%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLj
> AwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000
> sdata=zmFVlmUBv6byoDYyUhSgk9J9Zmvexz5IqG7xBxwiR3M%3Drese
> rved=0


Re: bf756fb833cb ("drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend")

2021-10-14 Thread Borislav Petkov
On Thu, Oct 14, 2021 at 02:02:48AM +, Quan, Evan wrote:
> [Quan, Evan] Yes, but not(apply them) at the same time. One by one as you did 
> before.
> - try the patch1 first

Ok, first patch worked fine.

> - undo the changes of patch1 and try patch2

Did that, worked fine too except after the first resume cycle, the video
didn't continue playing.

Then I restarted the video and did a couple more suspend cycles to see
if it would not continue again. In the subsequent tries it would resume
fine and the video would continue playing too.

So I'm going to chalk that single case of halted video with the second
patch to a resume glitch or so.

Btw, I don't have pm-suspend on that box but I did suspend to RAM
assuming this is what you wanted, which is done as root with two
commands:

# echo "suspend" > /sys/power/disk
# echo "mem" > /sys/power/state

If you want me to do more extensive testing, just shoot.

HTH.

-- 
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette


RE: bf756fb833cb ("drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend")

2021-10-13 Thread Quan, Evan
[AMD Official Use Only]



> -Original Message-
> From: Borislav Petkov 
> Sent: Wednesday, October 13, 2021 5:26 PM
> To: Quan, Evan 
> Cc: Alex Deucher ; amd-gfx list  g...@lists.freedesktop.org>; LKML ; Deucher,
> Alexander ; Pan, Xinhui
> ; Chen, Guchun 
> Subject: Re: bf756fb833cb ("drm/amdgpu: add missing cleanups for Polaris12
> UVD/VCE on suspend")
> 
> On Wed, Oct 13, 2021 at 09:19:45AM +, Quan, Evan wrote:
> > So, I need your help to confirm the last two patches(I sent you) do not
> affect the fix for the bug above.
> > Please follow the steps below to verify it:
> > 1. Launch a video playing
> > 2. open another terminal and issue "sudo pm-suspend" command to force
> > suspending 3. verify the system can suspend and resume back correctly
> > without errors or hangs
> 
> Just to confirm: you want me to do that with the last two patches applied?
[Quan, Evan] Yes, but not(apply them) at the same time. One by one as you did 
before.
- try the patch1 first
- undo the changes of patch1 and try patch2

BR
Evan
> 
> --
> Regards/Gruss,
> Boris.
> 
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpeo
> ple.kernel.org%2Ftglx%2Fnotes-about-
> netiquettedata=04%7C01%7CEvan.Quan%40amd.com%7Cbcabc6c3a5
> 07426172a308d98e2b8235%7C3dd8961fe4884e608e11a82d994e183d%7C0%7
> C0%7C637697139813202149%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w
> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000
> p;sdata=7%2F3TXqlIld%2BdSocRyLsgZBeaFcsEDiI5GEwJ5AHaLSk%3Dre
> served=0


Re: bf756fb833cb ("drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend")

2021-10-13 Thread Borislav Petkov
On Wed, Oct 13, 2021 at 09:19:45AM +, Quan, Evan wrote:
> So, I need your help to confirm the last two patches(I sent you) do not 
> affect the fix for the bug above.
> Please follow the steps below to verify it:
> 1. Launch a video playing
> 2. open another terminal and issue "sudo pm-suspend" command to force 
> suspending
> 3. verify the system can suspend and resume back correctly without errors or 
> hangs

Just to confirm: you want me to do that with the last two patches
applied?

-- 
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette


RE: bf756fb833cb ("drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend")

2021-10-13 Thread Quan, Evan
[AMD Official Use Only]

Thanks Boris.
There is another thing which needs your help.
The change of bf756fb833cb was introduced to fix the bug below:
"some hangs observed on suspending when UVD/VCE still using".

So, I need your help to confirm the last two patches(I sent you) do not affect 
the fix for the bug above.
Please follow the steps below to verify it:
1. Launch a video playing
2. open another terminal and issue "sudo pm-suspend" command to force suspending
3. verify the system can suspend and resume back correctly without errors or 
hangs

BR
Evan
> -Original Message-
> From: Borislav Petkov 
> Sent: Tuesday, October 12, 2021 1:09 AM
> To: Quan, Evan 
> Cc: Alex Deucher ; amd-gfx list  g...@lists.freedesktop.org>; LKML ; Deucher,
> Alexander ; Pan, Xinhui
> ; Chen, Guchun 
> Subject: Re: bf756fb833cb ("drm/amdgpu: add missing cleanups for Polaris12
> UVD/VCE on suspend")
> 
> On Mon, Oct 11, 2021 at 08:03:51AM +, Quan, Evan wrote:
> > OK... Then forget about previous patches. Let's try to narrow down the
> > issue first. Please try the attached patch1 first. If it works,
> 
> It does.
> 
> > please undo the changes of patch1 and try patch2 to narrow down further.
> 
> It does too.
> 
> :-)
> 
> Thx.
> 
> --
> Regards/Gruss,
> Boris.
> 
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpeo
> ple.kernel.org%2Ftglx%2Fnotes-about-
> netiquettedata=04%7C01%7CEvan.Quan%40amd.com%7C7d523770cb
> a84f8d23a108d98cd9c5c0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C
> 0%7C637695689245101874%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLj
> AwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000
> sdata=TVYDHI74dYSJl68Z3ZjypBhr6jDYAIUgsMQcoreQrhk%3Dreserve
> d=0


Re: bf756fb833cb ("drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend")

2021-10-11 Thread Borislav Petkov
On Mon, Oct 11, 2021 at 08:03:51AM +, Quan, Evan wrote:
> OK... Then forget about previous patches. Let's try to narrow down the
> issue first. Please try the attached patch1 first. If it works,

It does.

> please undo the changes of patch1 and try patch2 to narrow down further.

It does too.

:-)

Thx.

-- 
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette


RE: bf756fb833cb ("drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend")

2021-10-11 Thread Quan, Evan
[AMD Official Use Only]

OK... Then forget about previous patches. Let's try to narrow down the issue 
first.
Please try the attached patch1 first. If it works, please undo the changes of 
patch1 and try patch2 to narrow down further.

BR
Evan
> -Original Message-
> From: Borislav Petkov 
> Sent: Saturday, October 9, 2021 6:07 PM
> To: Quan, Evan 
> Cc: Alex Deucher ; amd-gfx list  g...@lists.freedesktop.org>; LKML ; Deucher,
> Alexander ; Pan, Xinhui
> ; Chen, Guchun 
> Subject: Re: bf756fb833cb ("drm/amdgpu: add missing cleanups for Polaris12
> UVD/VCE on suspend")
> 
> On Sat, Oct 09, 2021 at 09:54:13AM +, Quan, Evan wrote:
> > Oops, I just found some necessary changes are missing from the patch of
> the link below.
> >
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.
> freedesktop.org%2Farchives%2Famd-gfx%2F2021-
> September%2F069006.htmldata=04%7C01%7CEvan.Quan%40amd.co
> m%7Ce528679b6b6e4da74ec408d98b0c98df%7C3dd8961fe4884e608e11a82d
> 994e183d%7C0%7C0%7C637693708504533267%7CUnknown%7CTWFpbGZsb3
> d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0
> %3D%7C1000sdata=HAmBuuX%2BvMex3Rxw%2FZrV8d21ygSMS3xrW
> HWeTMzLObg%3Dreserved=0
> >
> > Could you try the patch from the link above + the attached patch?
> 
> Nope, still no joy. ;-\
> 
> --
> Regards/Gruss,
> Boris.
> 
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpeo
> ple.kernel.org%2Ftglx%2Fnotes-about-
> netiquettedata=04%7C01%7CEvan.Quan%40amd.com%7Ce528679b6b
> 6e4da74ec408d98b0c98df%7C3dd8961fe4884e608e11a82d994e183d%7C0%7
> C0%7C637693708504543261%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w
> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000
> p;sdata=QVTW41SGsMuwq0qeZ9LtQs%2BQ2zw6gxhW5Ttt1iM%2Fu0M%3D
> reserved=0


0001-drm-amdgpu-no-UVD-VCE-dpm-disablment-on-suspend-for-.patch
Description: 0001-drm-amdgpu-no-UVD-VCE-dpm-disablment-on-suspend-for-.patch


0002-drm-amd-pm-no-UVD-VCE-power-off-during-early-phase-o.patch
Description: 0002-drm-amd-pm-no-UVD-VCE-power-off-during-early-phase-o.patch


Re: bf756fb833cb ("drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend")

2021-10-11 Thread Borislav Petkov
On Sat, Oct 09, 2021 at 09:54:13AM +, Quan, Evan wrote:
> Oops, I just found some necessary changes are missing from the patch of the 
> link below.
> https://lists.freedesktop.org/archives/amd-gfx/2021-September/069006.html
> 
> Could you try the patch from the link above + the attached patch?

Nope, still no joy. ;-\

-- 
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette


Re: bf756fb833cb ("drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend")

2021-10-11 Thread Borislav Petkov
On Sat, Oct 09, 2021 at 01:20:39AM +, Quan, Evan wrote:
> Maybe the change below can address your issue.
> https://lists.freedesktop.org/archives/amd-gfx/2021-September/069006.html

Nope, that one doesn't change anything.

Thx.

-- 
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette


RE: bf756fb833cb ("drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend")

2021-10-09 Thread Quan, Evan
[AMD Official Use Only]

Oops, I just found some necessary changes are missing from the patch of the 
link below.
https://lists.freedesktop.org/archives/amd-gfx/2021-September/069006.html

Could you try the patch from the link above + the attached patch?

BR
Evan
> -Original Message-
> From: Borislav Petkov 
> Sent: Saturday, October 9, 2021 5:01 PM
> To: Quan, Evan 
> Cc: Alex Deucher ; amd-gfx list  g...@lists.freedesktop.org>; LKML ; Deucher,
> Alexander ; Pan, Xinhui
> ; Chen, Guchun 
> Subject: Re: bf756fb833cb ("drm/amdgpu: add missing cleanups for Polaris12
> UVD/VCE on suspend")
> 
> On Sat, Oct 09, 2021 at 01:20:39AM +, Quan, Evan wrote:
> > Maybe the change below can address your issue.
> >
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.
> freedesktop.org%2Farchives%2Famd-gfx%2F2021-
> September%2F069006.htmldata=04%7C01%7CEvan.Quan%40amd.co
> m%7Cd06cae38046c476c6cf808d98b0357c6%7C3dd8961fe4884e608e11a82d9
> 94e183d%7C0%7C0%7C637693668756530302%7CUnknown%7CTWFpbGZsb3d
> 8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%
> 3D%7C1000sdata=5PR5eUKLrK1FONfNwgXNTw7WNgcu%2F13HOmOc
> oOsEkTI%3Dreserved=0
> 
> Nope, that one doesn't change anything.
> 
> Thx.
> 
> --
> Regards/Gruss,
> Boris.
> 
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpeo
> ple.kernel.org%2Ftglx%2Fnotes-about-
> netiquettedata=04%7C01%7CEvan.Quan%40amd.com%7Cd06cae3804
> 6c476c6cf808d98b0357c6%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C
> 0%7C637693668756530302%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLj
> AwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000
> sdata=dOzz4cZC0VyM92jwofZ4K0MN4i%2FM%2B9F%2F3vCUj%2Bd%2Bwdw
> %3Dreserved=0


0001-drm-amdgpu-fix-Carrizo-uvd-crash-on-driver-unload.patch
Description: 0001-drm-amdgpu-fix-Carrizo-uvd-crash-on-driver-unload.patch


RE: bf756fb833cb ("drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend")

2021-10-08 Thread Quan, Evan
[AMD Official Use Only]

Maybe the change below can address your issue.
https://lists.freedesktop.org/archives/amd-gfx/2021-September/069006.html

BR
Evan
> -Original Message-
> From: Borislav Petkov 
> Sent: Friday, October 8, 2021 11:36 PM
> To: Alex Deucher 
> Cc: Quan, Evan ; amd-gfx list  g...@lists.freedesktop.org>; LKML ; Deucher,
> Alexander ; Pan, Xinhui
> ; Chen, Guchun 
> Subject: Re: bf756fb833cb ("drm/amdgpu: add missing cleanups for Polaris12
> UVD/VCE on suspend")
> 
> On Fri, Oct 08, 2021 at 11:12:35AM -0400, Alex Deucher wrote:
> > Can you try swapping the order of
> > amdgpu_device_ip_set_powergating_state() and
> > amdgpu_device_ip_set_clockgating_state() in the patch?
> 
> Nope, the diff below didn't change things.
> 
> Should I comment them out one by one and see whether the clockgating or
> the powergating causes it?
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
> b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
> index bc571833632e..99e3d697cc24 100644
> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
> @@ -561,10 +561,10 @@ static int uvd_v6_0_hw_fini(void *handle)
>   } else {
>   amdgpu_asic_set_uvd_clocks(adev, 0, 0);
>   /* shutdown the UVD block */
> - amdgpu_device_ip_set_powergating_state(adev,
> AMD_IP_BLOCK_TYPE_UVD,
> -AMD_PG_STATE_GATE);
>   amdgpu_device_ip_set_clockgating_state(adev,
> AMD_IP_BLOCK_TYPE_UVD,
>  AMD_CG_STATE_GATE);
> + amdgpu_device_ip_set_powergating_state(adev,
> AMD_IP_BLOCK_TYPE_UVD,
> +AMD_PG_STATE_GATE);
>   }
> 
>   if (RREG32(mmUVD_STATUS) != 0)
> diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
> b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
> index 9de66893ccd6..a36612357d0f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
> @@ -507,10 +507,10 @@ static int vce_v3_0_hw_fini(void *handle)
>   amdgpu_dpm_enable_vce(adev, false);
>   } else {
>   amdgpu_asic_set_vce_clocks(adev, 0, 0);
> - amdgpu_device_ip_set_powergating_state(adev,
> AMD_IP_BLOCK_TYPE_VCE,
> -AMD_PG_STATE_GATE);
>   amdgpu_device_ip_set_clockgating_state(adev,
> AMD_IP_BLOCK_TYPE_VCE,
>  AMD_CG_STATE_GATE);
> + amdgpu_device_ip_set_powergating_state(adev,
> AMD_IP_BLOCK_TYPE_VCE,
> +AMD_PG_STATE_GATE);
>   }
> 
>   r = vce_v3_0_wait_for_idle(handle);
> 
> --
> Regards/Gruss,
> Boris.
> 
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpeo
> ple.kernel.org%2Ftglx%2Fnotes-about-
> netiquettedata=04%7C01%7CEvan.Quan%40amd.com%7C2389690487
> 7248b6368708d98a715267%7C3dd8961fe4884e608e11a82d994e183d%7C0%7
> C0%7C637693041605567349%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w
> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000
> p;sdata=BZ9lDD4SnWzTYPdCRPFIAsjlncoQAetHWCo%2FqIjalE0%3Dres
> erved=0


Re: bf756fb833cb ("drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend")

2021-10-08 Thread Borislav Petkov
On Fri, Oct 08, 2021 at 11:12:35AM -0400, Alex Deucher wrote:
> Can you try swapping the order of
> amdgpu_device_ip_set_powergating_state() and
> amdgpu_device_ip_set_clockgating_state() in the patch?

Nope, the diff below didn't change things.

Should I comment them out one by one and see whether the clockgating or
the powergating causes it?

diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c 
b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
index bc571833632e..99e3d697cc24 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
@@ -561,10 +561,10 @@ static int uvd_v6_0_hw_fini(void *handle)
} else {
amdgpu_asic_set_uvd_clocks(adev, 0, 0);
/* shutdown the UVD block */
-   amdgpu_device_ip_set_powergating_state(adev, 
AMD_IP_BLOCK_TYPE_UVD,
-  AMD_PG_STATE_GATE);
amdgpu_device_ip_set_clockgating_state(adev, 
AMD_IP_BLOCK_TYPE_UVD,
   AMD_CG_STATE_GATE);
+   amdgpu_device_ip_set_powergating_state(adev, 
AMD_IP_BLOCK_TYPE_UVD,
+  AMD_PG_STATE_GATE);
}
 
if (RREG32(mmUVD_STATUS) != 0)
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c 
b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
index 9de66893ccd6..a36612357d0f 100644
--- a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
@@ -507,10 +507,10 @@ static int vce_v3_0_hw_fini(void *handle)
amdgpu_dpm_enable_vce(adev, false);
} else {
amdgpu_asic_set_vce_clocks(adev, 0, 0);
-   amdgpu_device_ip_set_powergating_state(adev, 
AMD_IP_BLOCK_TYPE_VCE,
-  AMD_PG_STATE_GATE);
amdgpu_device_ip_set_clockgating_state(adev, 
AMD_IP_BLOCK_TYPE_VCE,
   AMD_CG_STATE_GATE);
+   amdgpu_device_ip_set_powergating_state(adev, 
AMD_IP_BLOCK_TYPE_VCE,
+  AMD_PG_STATE_GATE);
}
 
r = vce_v3_0_wait_for_idle(handle);

-- 
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette