mbox series

[0/4,SRU,H/I/OEM-5.13/OEM-5.14] Fix Screen freeze after resume from suspend with iGPU [1002:6987]

Message ID 20211028080959.2125864-1-koba.ko@canonical.com
Headers show
Series Fix Screen freeze after resume from suspend with iGPU [1002:6987] | expand

Message

Koba Ko Oct. 28, 2021, 8:09 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1949050

[Impact]
Screen freeze after resume from suspend

[Fix]
Perform proper cleanups on UVD/VCE suspend: powergate enablement,
clockgating enablement and dpm disablement. This can fix some hangs
observed on suspending when UVD/VCE still using(e.g. issue
"pm-suspend" when video is still playing).

[Test]
1. Plug AMD RX640/Radeon 540 into the system
2. Connect with DP monitor to iGPU
3. Power on
4. Suspend the system
5. Resume from suspend
6. Do something for a while (terminal, nautilus, gnome-control-center, etc).
7. System could resume normally

[Regression Potential]
Low

Andrey Grodzovsky (1):
  drm/amdgpu: Fix crash on device remove/driver unload

Evan Quan (2):
  drm/amdgpu: reenable BACO support for 699F:C7 polaris12 SKU
  drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend

 drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 26 +++++++++++++++++++++++++
 drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 26 +++++++++++++++++++++++++
 drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 26 +++++++++++++++++++++++++
 drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 24 +++++++++++++++++++++++
 drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 26 +++++++++++++++++++++++++
 drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 28 +++++++++++++++++++++++++++
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 25 ++++++++++++++++++++++++
 drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 25 ++++++++++++++++++++++++
 drivers/gpu/drm/amd/amdgpu/vi.c       |  9 +--------
 9 files changed, 207 insertions(+), 8 deletions(-)

Comments

Timo Aaltonen Oct. 28, 2021, 11:30 a.m. UTC | #1
On 28.10.2021 11.09, Koba Ko wrote:
> BugLink: https://bugs.launchpad.net/bugs/1949050
> 
> [Impact]
> Screen freeze after resume from suspend
> 
> [Fix]
> Perform proper cleanups on UVD/VCE suspend: powergate enablement,
> clockgating enablement and dpm disablement. This can fix some hangs
> observed on suspending when UVD/VCE still using(e.g. issue
> "pm-suspend" when video is still playing).
> 
> [Test]
> 1. Plug AMD RX640/Radeon 540 into the system
> 2. Connect with DP monitor to iGPU
> 3. Power on
> 4. Suspend the system
> 5. Resume from suspend
> 6. Do something for a while (terminal, nautilus, gnome-control-center, etc).
> 7. System could resume normally
> 
> [Regression Potential]
> Low
> 
> Andrey Grodzovsky (1):
>    drm/amdgpu: Fix crash on device remove/driver unload
> 
> Evan Quan (2):
>    drm/amdgpu: reenable BACO support for 699F:C7 polaris12 SKU
>    drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend
> 
>   drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 26 +++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 26 +++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 26 +++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 24 +++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 26 +++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 28 +++++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 25 ++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 25 ++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/vi.c       |  9 +--------
>   9 files changed, 207 insertions(+), 8 deletions(-)
> 

applied to oem-5.13, thanks
Tim Gardner Oct. 28, 2021, 11:33 a.m. UTC | #2
Acked-by: Tim Gardner <tim.gardner@canonical.com>

patch 3/4 and 4/4 are now in linux-next.

On 10/28/21 2:09 AM, Koba Ko wrote:
> BugLink: https://bugs.launchpad.net/bugs/1949050
> 
> [Impact]
> Screen freeze after resume from suspend
> 
> [Fix]
> Perform proper cleanups on UVD/VCE suspend: powergate enablement,
> clockgating enablement and dpm disablement. This can fix some hangs
> observed on suspending when UVD/VCE still using(e.g. issue
> "pm-suspend" when video is still playing).
> 
> [Test]
> 1. Plug AMD RX640/Radeon 540 into the system
> 2. Connect with DP monitor to iGPU
> 3. Power on
> 4. Suspend the system
> 5. Resume from suspend
> 6. Do something for a while (terminal, nautilus, gnome-control-center, etc).
> 7. System could resume normally
> 
> [Regression Potential]
> Low
> 
> Andrey Grodzovsky (1):
>    drm/amdgpu: Fix crash on device remove/driver unload
> 
> Evan Quan (2):
>    drm/amdgpu: reenable BACO support for 699F:C7 polaris12 SKU
>    drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend
> 
>   drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 26 +++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 26 +++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 26 +++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 24 +++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 26 +++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 28 +++++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 25 ++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 25 ++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/vi.c       |  9 +--------
>   9 files changed, 207 insertions(+), 8 deletions(-)
>
Timo Aaltonen Nov. 1, 2021, 9:22 a.m. UTC | #3
On 28.10.2021 11.09, Koba Ko wrote:
> BugLink: https://bugs.launchpad.net/bugs/1949050
> 
> [Impact]
> Screen freeze after resume from suspend
> 
> [Fix]
> Perform proper cleanups on UVD/VCE suspend: powergate enablement,
> clockgating enablement and dpm disablement. This can fix some hangs
> observed on suspending when UVD/VCE still using(e.g. issue
> "pm-suspend" when video is still playing).
> 
> [Test]
> 1. Plug AMD RX640/Radeon 540 into the system
> 2. Connect with DP monitor to iGPU
> 3. Power on
> 4. Suspend the system
> 5. Resume from suspend
> 6. Do something for a while (terminal, nautilus, gnome-control-center, etc).
> 7. System could resume normally
> 
> [Regression Potential]
> Low
> 
> Andrey Grodzovsky (1):
>    drm/amdgpu: Fix crash on device remove/driver unload
> 
> Evan Quan (2):
>    drm/amdgpu: reenable BACO support for 699F:C7 polaris12 SKU
>    drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend
> 
>   drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 26 +++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 26 +++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 26 +++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 24 +++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 26 +++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 28 +++++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 25 ++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 25 ++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/vi.c       |  9 +--------
>   9 files changed, 207 insertions(+), 8 deletions(-)
> 

applied to oem-5.14, thanks
Kleber Sacilotto de Souza Nov. 2, 2021, 12:02 p.m. UTC | #4
On 28.10.21 10:09, Koba Ko wrote:
> BugLink: https://bugs.launchpad.net/bugs/1949050
> 
> [Impact]
> Screen freeze after resume from suspend
> 
> [Fix]
> Perform proper cleanups on UVD/VCE suspend: powergate enablement,
> clockgating enablement and dpm disablement. This can fix some hangs
> observed on suspending when UVD/VCE still using(e.g. issue
> "pm-suspend" when video is still playing).
> 
> [Test]
> 1. Plug AMD RX640/Radeon 540 into the system
> 2. Connect with DP monitor to iGPU
> 3. Power on
> 4. Suspend the system
> 5. Resume from suspend
> 6. Do something for a while (terminal, nautilus, gnome-control-center, etc).
> 7. System could resume normally
> 
> [Regression Potential]
> Low
> 
> Andrey Grodzovsky (1):
>    drm/amdgpu: Fix crash on device remove/driver unload
> 
> Evan Quan (2):
>    drm/amdgpu: reenable BACO support for 699F:C7 polaris12 SKU
>    drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend
> 
>   drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 26 +++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 26 +++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 26 +++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 24 +++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 26 +++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 28 +++++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 25 ++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 25 ++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/vi.c       |  9 +--------
>   9 files changed, 207 insertions(+), 8 deletions(-)
> 

With the provenance of patches 3/4 and 4/4 (which are actually the same)
adjusted:

Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>

Thanks
Kleber Sacilotto de Souza Nov. 4, 2021, 4:16 p.m. UTC | #5
On 28.10.21 10:09, Koba Ko wrote:
> BugLink: https://bugs.launchpad.net/bugs/1949050
> 
> [Impact]
> Screen freeze after resume from suspend
> 
> [Fix]
> Perform proper cleanups on UVD/VCE suspend: powergate enablement,
> clockgating enablement and dpm disablement. This can fix some hangs
> observed on suspending when UVD/VCE still using(e.g. issue
> "pm-suspend" when video is still playing).
> 
> [Test]
> 1. Plug AMD RX640/Radeon 540 into the system
> 2. Connect with DP monitor to iGPU
> 3. Power on
> 4. Suspend the system
> 5. Resume from suspend
> 6. Do something for a while (terminal, nautilus, gnome-control-center, etc).
> 7. System could resume normally
> 
> [Regression Potential]
> Low
> 
> Andrey Grodzovsky (1):
>    drm/amdgpu: Fix crash on device remove/driver unload
> 
> Evan Quan (2):
>    drm/amdgpu: reenable BACO support for 699F:C7 polaris12 SKU
>    drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend
> 
>   drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 26 +++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 26 +++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 26 +++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 24 +++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 26 +++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 28 +++++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 25 ++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 25 ++++++++++++++++++++++++
>   drivers/gpu/drm/amd/amdgpu/vi.c       |  9 +--------
>   9 files changed, 207 insertions(+), 8 deletions(-)
> 

Applied to [hirsute/impish]:linux with the "cherry picked from..." line fixed
on patch 3/4.

Thanks,
Kleber