aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/0048-drm-amdgpu-Cancel-gfx-off-delay-work-when-driver-fin.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0048-drm-amdgpu-Cancel-gfx-off-delay-work-when-driver-fin.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/0048-drm-amdgpu-Cancel-gfx-off-delay-work-when-driver-fin.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0048-drm-amdgpu-Cancel-gfx-off-delay-work-when-driver-fin.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0048-drm-amdgpu-Cancel-gfx-off-delay-work-when-driver-fin.patch
new file mode 100644
index 00000000..5c324577
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0048-drm-amdgpu-Cancel-gfx-off-delay-work-when-driver-fin.patch
@@ -0,0 +1,39 @@
+From f1e47e9e9a98006829e6285d41ab100c28175d8e Mon Sep 17 00:00:00 2001
+From: Rex Zhu <Rex.Zhu@amd.com>
+Date: Thu, 9 Aug 2018 15:26:06 +0800
+Subject: [PATCH 0048/2940] drm/amdgpu: Cancel gfx off delay work when driver
+ fini/suspend
+
+there may be gfx off delay work pending when suspend/driver
+unload, need to cancel them first.
+
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+index 61bc1bf88a49..4d72ba71ebe5 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+@@ -1829,6 +1829,7 @@ static int amdgpu_device_ip_fini(struct amdgpu_device *adev)
+ return r;
+ }
+ amdgpu_gfx_off_ctrl(adev, false);
++ cancel_delayed_work_sync(&adev->gfx.gfx_off_delay_work);
+ r = adev->ip_blocks[i].version->funcs->hw_fini((void *)adev);
+ /* XXX handle errors */
+ if (r) {
+@@ -2012,6 +2013,7 @@ static int amdgpu_device_ip_suspend_phase2(struct amdgpu_device *adev)
+
+ /* call smu to disable gfx off feature first when suspend */
+ amdgpu_gfx_off_ctrl(adev, false);
++ cancel_delayed_work_sync(&adev->gfx.gfx_off_delay_work);
+
+ for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
+ if (!adev->ip_blocks[i].status.valid)
+--
+2.17.1
+