Skip to contentSkip to conversation

VCE3 soft reset working

PATCH In review Chunming Zhou 2 participants 5 messages Aug 3, 2016 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover VCE3 soft reset working

VCE is always busy is since RB1_BUSY is always busy, now remove it. And enable VCE soft reset.

Chunming Zhou (2):
drm/amdgpu: fix harvest config checking in vce3 check_soft_reset drm/amdgpu: enable VCE soft reset

Rex Zhu (1):
drm/amdgpu: remove RB1_BUSY bit checking

 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |  1 -
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c      | 12 +++++-------
 2 files changed, 5 insertions(+), 8 deletions(-)
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): 1470210689-14022-1-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org

#2 lore raw

PATCH 1/3 drm/amdgpu: fix harvest config checking in vce3 check_soft_reset

Change-Id I83a1cd8b19cbffc09c4e9b679b88cd65147446d5
---
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +0 -3
index 1c1f1a1..88ca4df 100644
@@ -648,9 +648,6 @@ static int vce_v3_0_check_soft_reset(void *handle)
 	tmp = REG_SET_FIELD(tmp, GRBM_GFX_INDEX, INSTANCE_INDEX, 0);
 	WREG32(mmGRBM_GFX_INDEX, tmp);
 
-	if (adev->vce.harvest_config & (AMDGPU_VCE_HARVEST_VCE0 | AMDGPU_VCE_HARVEST_VCE1))
-		srbm_soft_reset = 0;
-
 	if (srbm_soft_reset) {
 		adev->ip_block_status[AMD_IP_BLOCK_TYPE_VCE].hang = true;
 		adev->vce.srbm_soft_reset = srbm_soft_reset;
Signature · 6 lines
1.9.1

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

PATCH 2/3 drm/amdgpu: remove RB1_BUSY bit checking

In reply to a message not in the archive

From: Rex Zhu <[email protected]>

This is a workaround to let VCE soft reset work. RB1_BUSY bit is always set, so remove its checking now, and we will depend on RB0_BUSY currently.
After we find the root cause of RB1_BUSY, we can add it back.

Change-Id I0a4b622d8bc50f75d1a4187324cd2e9079c95013
---
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +5 -1
index 88ca4df..a98fbe0 100644
@@ -606,7 +606,11 @@ static int vce_v3_0_wait_for_idle(void *handle)
 	return -ETIMEDOUT;
 }
 
-#define AMDGPU_VCE_STATUS_BUSY_MASK    0x78
+#define  VCE_STATUS_VCPU_REPORT_AUTO_BUSY_MASK  0x00000008L   /* AUTO_BUSY */
+#define  VCE_STATUS_VCPU_REPORT_RB0_BUSY_MASK   0x00000010L   /* RB0_BUSY */
+#define  VCE_STATUS_VCPU_REPORT_RB1_BUSY_MASK   0x00000020L   /* RB1_BUSY */
+#define  AMDGPU_VCE_STATUS_BUSY_MASK (VCE_STATUS_VCPU_REPORT_AUTO_BUSY_MASK | \
+				      VCE_STATUS_VCPU_REPORT_RB0_BUSY_MASK)
 
 static int vce_v3_0_check_soft_reset(void *handle)
 {
Signature · 6 lines
1.9.1

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

PATCH 3/3 drm/amdgpu: enable VCE soft reset

In reply to a message not in the archive
Change-Id Ia3f60107f7257f834be961128793af9b8a0389da
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 -
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c      | 3 ---
 2 files changed, 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -1
index 16ba37d..dff68ab 100644
@@ -2040,7 +2040,6 @@ static bool amdgpu_need_full_reset(struct amdgpu_device *adev)
 {
 	if (adev->ip_block_status[AMD_IP_BLOCK_TYPE_GMC].hang ||
 	    adev->ip_block_status[AMD_IP_BLOCK_TYPE_SMC].hang ||
-	    adev->ip_block_status[AMD_IP_BLOCK_TYPE_VCE].hang ||
 	    adev->ip_block_status[AMD_IP_BLOCK_TYPE_ACP].hang ||
 	    adev->ip_block_status[AMD_IP_BLOCK_TYPE_DCE].hang) {
 		DRM_INFO("Some block need full reset!\n");
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +0 -3
index a98fbe0..04ab693 100644
@@ -618,9 +618,6 @@ static int vce_v3_0_check_soft_reset(void *handle)
 	u32 srbm_soft_reset = 0;
 	u32 tmp;
 
-	/* VCE BUG: it is always busy, so skip its checking now */
-	return 0;
-
 	/* According to VCE team , we should use VCE_STATUS instead
 	 * SRBM_STATUS.VCE_BUSY bit for busy status checking.
 	 * GRBM_GFX_INDEX.INSTANCE_INDEX is used to specify which VCE
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by
#5 lore raw
In reply to a message not in the archive

Regards,
Christian.

Am 03.08.2016 um 09:51 schrieb Chunming Zhou:

Quoted 7 lines

VCE is always busy is since RB1_BUSY is always busy, now remove it. And enable VCE soft reset.

Chunming Zhou (2):
drm/amdgpu: fix harvest config checking in vce3 check_soft_reset drm/amdgpu: enable VCE soft reset

Quoted 7 lines

Rex Zhu (1):
drm/amdgpu: remove RB1_BUSY bit checking

  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |  1 -
  drivers/gpu/drm/amd/amdgpu/vce_v3_0.c      | 12 +++++-------
  2 files changed, 5 insertions(+), 8 deletions(-)

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