[PATCH 1/2] drm/amd/dpm: Add PG support for UVD on Carrizo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Tom St Denis <tom.stdenis at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/cz_dpm.c b/drivers/gpu/drm/amd/amdgpu/cz_dpm.c
index 8ba07e79d4cb..a48d23a30a65 100644
--- a/drivers/gpu/drm/amd/amdgpu/cz_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/cz_dpm.c
@@ -41,6 +41,8 @@
 #include "gmc/gmc_8_1_d.h"
 #include "bif/bif_5_1_d.h"
 #include "gfx_v8_0.h"
+#include "uvd/uvd_6_0_d.h"
+#include "uvd/uvd_6_0_sh_mask.h"
 
 static void cz_dpm_powergate_uvd(struct amdgpu_device *adev, bool gate);
 static void cz_dpm_powergate_vce(struct amdgpu_device *adev, bool gate);
@@ -2098,6 +2100,17 @@ static void cz_dpm_powergate_uvd(struct amdgpu_device *adev, bool gate)
 	struct cz_power_info *pi = cz_get_pi(adev);
 	int ret;
 
+	if (pi->caps_uvd_pg) {
+		if (pi->uvd_dynamic_pg)
+			WREG32(mmUVD_POWER_STATUS,
+				UVD_POWER_STATUS__UVD_PG_EN_MASK |
+				UVD_POWER_STATUS__UVD_PG_MODE_MASK |
+				1);
+		else
+			WREG32(mmUVD_POWER_STATUS,
+				UVD_POWER_STATUS__UVD_PG_EN_MASK |
+				1);
+	}
 	if (pi->uvd_power_gated == gate)
 		return;
 
-- 
2.9.0



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux