aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2309-drm-amdgpu-vcn2-notify-SMU-power-up-down-VCN.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2309-drm-amdgpu-vcn2-notify-SMU-power-up-down-VCN.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2309-drm-amdgpu-vcn2-notify-SMU-power-up-down-VCN.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2309-drm-amdgpu-vcn2-notify-SMU-power-up-down-VCN.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2309-drm-amdgpu-vcn2-notify-SMU-power-up-down-VCN.patch
new file mode 100644
index 00000000..582c744f
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2309-drm-amdgpu-vcn2-notify-SMU-power-up-down-VCN.patch
@@ -0,0 +1,51 @@
+From 3b8ac3166f5678c6abc5fc4e8796306f806e6a89 Mon Sep 17 00:00:00 2001
+From: Jack Xiao <Jack.Xiao@amd.com>
+Date: Thu, 18 Apr 2019 16:20:10 +0800
+Subject: [PATCH 2309/2940] drm/amdgpu/vcn2: notify SMU power up/down VCN
+
+For sw control power gating, it needs notify SMU to power up/down VCN
+when enter/exit working state.
+
+Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Reviewed-by: Huang Rui <ray.huang@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
+index 1b9770cb650b..7609e63e59bc 100644
+--- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
+@@ -27,6 +27,7 @@
+ #include "amdgpu_vcn.h"
+ #include "soc15.h"
+ #include "soc15d.h"
++#include "amdgpu_pm.h"
+
+ #include "vcn/vcn_2_0_0_offset.h"
+ #include "vcn/vcn_2_0_0_sh_mask.h"
+@@ -779,6 +780,9 @@ static int vcn_v2_0_start(struct amdgpu_device *adev)
+ uint32_t lmi_swap_cntl;
+ int i, j, r;
+
++ if (adev->pm.dpm_enabled)
++ amdgpu_dpm_enable_uvd(adev, true);
++
+ vcn_v2_0_disable_static_power_gating(adev);
+
+ /* set uvd status busy */
+@@ -991,6 +995,9 @@ static int vcn_v2_0_stop(struct amdgpu_device *adev)
+ vcn_v2_0_enable_clock_gating(adev);
+ vcn_v2_0_enable_static_power_gating(adev);
+
++ if (adev->pm.dpm_enabled)
++ amdgpu_dpm_enable_uvd(adev, false);
++
+ return 0;
+ }
+
+--
+2.17.1
+