All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu/vcn: improve vcn dpg stop procedure
@ 2022-03-23 16:01 Tianci Yin
  2022-03-23 18:41 ` Zhu, James
  0 siblings, 1 reply; 2+ messages in thread
From: Tianci Yin @ 2022-03-23 16:01 UTC (permalink / raw)
  To: amd-gfx; +Cc: Wang Yu, Zhu James, Tianci Yin, Guchun Chen

Prior to disabling dpg, VCN need unpausing dpg mode, or VCN will hang in
S3 resuming.

Signed-off-by: Tianci Yin <tianci.yin@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
index b16c56aa2d22..0d590183328f 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
@@ -1480,8 +1480,11 @@ static int vcn_v3_0_start_sriov(struct amdgpu_device *adev)
 
 static int vcn_v3_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
 {
+	struct dpg_pause_state state = {.fw_based = VCN_DPG_STATE__UNPAUSE};
 	uint32_t tmp;
 
+	vcn_v3_0_pause_dpg_mode(adev, 0, &state);
+
 	/* Wait for power status to be 1 */
 	SOC15_WAIT_ON_RREG(VCN, inst_idx, mmUVD_POWER_STATUS, 1,
 		UVD_POWER_STATUS__UVD_POWER_STATUS_MASK);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/amdgpu/vcn: improve vcn dpg stop procedure
  2022-03-23 16:01 [PATCH] drm/amdgpu/vcn: improve vcn dpg stop procedure Tianci Yin
@ 2022-03-23 18:41 ` Zhu, James
  0 siblings, 0 replies; 2+ messages in thread
From: Zhu, James @ 2022-03-23 18:41 UTC (permalink / raw)
  To: Yin, Tianci (Rico), amd-gfx; +Cc: Wang, Yu (Charlie), Chen, Guchun

[-- Attachment #1: Type: text/plain, Size: 1453 bytes --]

[AMD Official Use Only]

This patch is Reviewed-by: James Zhu <James.Zhu@amd.com>


________________________________
From: Tianci Yin <tianci.yin@amd.com>
Sent: Wednesday, March 23, 2022 12:01 PM
To: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Chen, Guchun <Guchun.Chen@amd.com>; Zhu, James <James.Zhu@amd.com>; Wang, Yu (Charlie) <Yu.Wang4@amd.com>; Yin, Tianci (Rico) <Tianci.Yin@amd.com>
Subject: [PATCH] drm/amdgpu/vcn: improve vcn dpg stop procedure

Prior to disabling dpg, VCN need unpausing dpg mode, or VCN will hang in
S3 resuming.

Signed-off-by: Tianci Yin <tianci.yin@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
index b16c56aa2d22..0d590183328f 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
@@ -1480,8 +1480,11 @@ static int vcn_v3_0_start_sriov(struct amdgpu_device *adev)

 static int vcn_v3_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
 {
+       struct dpg_pause_state state = {.fw_based = VCN_DPG_STATE__UNPAUSE};
         uint32_t tmp;

+       vcn_v3_0_pause_dpg_mode(adev, 0, &state);
+
         /* Wait for power status to be 1 */
         SOC15_WAIT_ON_RREG(VCN, inst_idx, mmUVD_POWER_STATUS, 1,
                 UVD_POWER_STATUS__UVD_POWER_STATUS_MASK);
--
2.25.1


[-- Attachment #2: Type: text/html, Size: 3149 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-23 18:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-23 16:01 [PATCH] drm/amdgpu/vcn: improve vcn dpg stop procedure Tianci Yin
2022-03-23 18:41 ` Zhu, James

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.