Skip to contentSkip to conversation

drm/amdgpu: refine uvd gate logic for CI.

PATCH In review Rex Zhu 2 participants 2 messages Aug 24, 2016 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH 1/1 drm/amdgpu: refine uvd gate logic for CI.

uvd dpm will be controlled by uvd.
dpm just disable uvd dpm in case of suspend when play video. due to the new logic of uvd_begin_use/end_use,
if disable uvd dpm in late init, will have no chance to enable uvd dpm after resume until play video again.

Change-Id I14792383ed50c0465699cdda7f1bad2ea144b861
---
 drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/ci_dpm.c +2 -4
index a0d63a2..1d8c375 100644
@@ -5396,7 +5396,7 @@ static void ci_dpm_disable(struct amdgpu_device *adev)
 	amdgpu_irq_put(adev, &adev->pm.dpm.thermal.irq,
 		       AMDGPU_THERMAL_IRQ_HIGH_TO_LOW);
 
-	ci_dpm_powergate_uvd(adev, false);
+	ci_dpm_powergate_uvd(adev, true);
 
 	if (!amdgpu_ci_is_smc_running(adev))
 		return;
@@ -6036,7 +6036,7 @@ static int ci_dpm_init(struct amdgpu_device *adev)
 
 	pi->caps_dynamic_ac_timing = true;
 
-	pi->uvd_power_gated = false;
+	pi->uvd_power_gated = true;
 
 	/* make sure dc limits are valid */
 	if ((adev->pm.dpm.dyn_state.max_clock_voltage_on_dc.sclk == 0) ||
@@ -6179,8 +6179,6 @@ static int ci_dpm_late_init(void *handle)
 	if (ret)
 		return ret;
 
-	ci_dpm_powergate_uvd(adev, true);
-
 	return 0;
 }
 
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1472039748-29474-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

Reviewed-by Alex Deucher
#2 lore raw
Quoted 8 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Rex Zhu
Sent: Wednesday, August 24, 2016 7:56 AM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH] drm/amdgpu: refine uvd gate logic for CI.

Quoted 8 lines

uvd dpm will be controlled by uvd.
dpm just disable uvd dpm in case of suspend when play video. due to the new logic of uvd_begin_use/end_use,
if disable uvd dpm in late init, will have no chance to enable uvd dpm after resume until play video again.

Change-Id I14792383ed50c0465699cdda7f1bad2ea144b861
Quoted 41 lines
---
 drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/ci_dpm.c +1 -1
index a0d63a2..1d8c375 100644
@@ -5396,7 +5396,7 @@ static void ci_dpm_disable(struct amdgpu_device
 *adev)
 	amdgpu_irq_put(adev, &adev->pm.dpm.thermal.irq,
 		       AMDGPU_THERMAL_IRQ_HIGH_TO_LOW);
 
-	ci_dpm_powergate_uvd(adev, false);
+	ci_dpm_powergate_uvd(adev, true);
 
 	if (!amdgpu_ci_is_smc_running(adev))
drivers/gpu/drm/amd/amdgpu/ci_dpm.c +1 -1
 		return;
@@ -6036,7 +6036,7 @@ static int ci_dpm_init(struct amdgpu_device *adev)
 
 	pi->caps_dynamic_ac_timing = true;
 
-	pi->uvd_power_gated = false;
+	pi->uvd_power_gated = true;
 
 	/* make sure dc limits are valid */
 	if ((adev->pm.dpm.dyn_state.max_clock_voltage_on_dc.sclk == 0)

||

drivers/gpu/drm/amd/amdgpu/ci_dpm.c +0 -3
@@ -6179,8 +6179,6 @@ static int ci_dpm_late_init(void *handle)
 	if (ret)
 		return ret;
 
-	ci_dpm_powergate_uvd(adev, true);
-
 	return 0;
 }
 
--

1.9.1

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx