aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4549-drm-amdgpu-add-baco-support-to-runtime-suspend-resum.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4549-drm-amdgpu-add-baco-support-to-runtime-suspend-resum.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4549-drm-amdgpu-add-baco-support-to-runtime-suspend-resum.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4549-drm-amdgpu-add-baco-support-to-runtime-suspend-resum.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4549-drm-amdgpu-add-baco-support-to-runtime-suspend-resum.patch
new file mode 100644
index 00000000..8c3a8edd
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4549-drm-amdgpu-add-baco-support-to-runtime-suspend-resum.patch
@@ -0,0 +1,53 @@
+From 7c67e9f1b6ee307d0470a82e31b21936d3724e4f Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Fri, 4 Oct 2019 12:54:12 -0500
+Subject: [PATCH 4549/4736] drm/amdgpu: add baco support to runtime
+ suspend/resume
+
+BACO - Bus Active, Chip Off
+
+This adds the necessary support to the runtime suspend
+and resume functions to handle boards that support
+baco.
+
+Reviewed-by: Evan Quan <evan.quan@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+index db41bdba954e..036e253def85 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+@@ -1200,7 +1200,8 @@ static int amdgpu_pmops_resume(struct device *dev)
+ struct drm_device *drm_dev = dev_get_drvdata(dev);
+
+ /* GPU comes up enabled by the bios on resume */
+- if (amdgpu_device_supports_boco(drm_dev)) {
++ if (amdgpu_device_supports_boco(drm_dev) ||
++ amdgpu_device_supports_baco(drm_dev)) {
+ pm_runtime_disable(dev);
+ pm_runtime_set_active(dev);
+ pm_runtime_enable(dev);
+@@ -1267,6 +1268,8 @@ static int amdgpu_pmops_runtime_suspend(struct device *dev)
+ else if (!amdgpu_has_atpx_dgpu_power_cntl())
+ pci_set_power_state(pdev, PCI_D3hot);
+ drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF;
++ } else if (amdgpu_device_supports_baco(drm_dev)) {
++ amdgpu_device_baco_enter(drm_dev);
+ }
+
+ return 0;
+@@ -1292,6 +1295,8 @@ static int amdgpu_pmops_runtime_resume(struct device *dev)
+ if (ret)
+ return ret;
+ pci_set_master(pdev);
++ } else if (amdgpu_device_supports_baco(drm_dev)) {
++ amdgpu_device_baco_exit(drm_dev);
+ }
+ ret = amdgpu_device_resume(drm_dev, false, false);
+ drm_kms_helper_poll_enable(drm_dev);
+--
+2.17.1
+