Skip to contentSkip to conversation

drm/amdgpu/vcn:Fixed S3 hung issue

PATCH In review Zhu, James 2 participants 2 messages Dec 4, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Zhu, James

author
#0 lore raw

PATCH 1/1 drm/amdgpu/vcn:Fixed S3 hung issue

Replace vcn_v1_0_stop with vcn_v1_0_set_powergating_state during suspend, to keep adev->vcn.cur_state update. It will fix VCN S3 hung issue.

---
 drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +2 -1
index c1a0350..4f83520 100644
@@ -48,6 +48,7 @@ static void vcn_v1_0_set_enc_ring_funcs(struct amdgpu_device *adev);
 static void vcn_v1_0_set_jpeg_ring_funcs(struct amdgpu_device *adev);
 static void vcn_v1_0_set_irq_funcs(struct amdgpu_device *adev);
 static void vcn_v1_0_jpeg_ring_set_patch_ring(struct amdgpu_ring *ring, uint32_t ptr);
+static int vcn_v1_0_set_powergating_state(void *handle, enum amd_powergating_state state);
 
 /**
  * vcn_v1_0_early_init - set function pointers
@@ -214,7 +215,7 @@ static int vcn_v1_0_hw_fini(void *handle)
 	struct amdgpu_ring *ring = &adev->vcn.ring_dec;
 
 	if (RREG32_SOC15(VCN, 0, mmUVD_STATUS))
-		vcn_v1_0_stop(adev);
+		vcn_v1_0_set_powergating_state(adev, AMD_PG_STATE_GATE);
 
 	ring->sched.ready = false;
 
Signature · 6 lines
2.7.4

_______________________________________________
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): 1543937490-19179-1-git-send-email-James.Zhu-5C7GfCeVMHo@public.gmane.org

Reviewed-by Leo Liu
#2 lore raw

Please re-state the patch subject instead of "Fixed S3 hung issue"

With that fixed, the patch is

Quoted 21 lines · James

Replace vcn_v1_0_stop with vcn_v1_0_set_powergating_state during suspend, to keep adev->vcn.cur_state update. It will fix VCN S3 hung issue.

---
  drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +1 -0
index c1a0350..4f83520 100644
@@ -48,6 +48,7 @@ static void vcn_v1_0_set_enc_ring_funcs(struct amdgpu_device *adev);
  static void vcn_v1_0_set_jpeg_ring_funcs(struct amdgpu_device *adev);
  static void vcn_v1_0_set_irq_funcs(struct amdgpu_device *adev);
  static void vcn_v1_0_jpeg_ring_set_patch_ring(struct amdgpu_ring *ring, uint32_t ptr);
+static int vcn_v1_0_set_powergating_state(void *handle, enum amd_powergating_state state);
 
  /**
   * vcn_v1_0_early_init - set function pointers

drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c static int vcn_v1_0_hw_fini(void *handle) · line 221

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +1 -1
@@ -214,7 +215,7 @@ static int vcn_v1_0_hw_fini(void *handle)
  	struct amdgpu_ring *ring = &adev->vcn.ring_dec;
 
  	if (RREG32_SOC15(VCN, 0, mmUVD_STATUS))
-		vcn_v1_0_stop(adev);
+		vcn_v1_0_set_powergating_state(adev, AMD_PG_STATE_GATE);
 
  	ring->sched.ready = false;
 

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