Skip to contentSkip to conversation

drm/amdgpu: refine function name for consistency

PATCH In review root 2 participants 5 messages Aug 22, 2016 – Sep 23, 2016 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

root

author
#0 lore raw

PATCH 1/3 drm/amdgpu: refine function name for consistency

From: Rex Zhu <[email protected]>

Change-Id I4e5589050bec48a7a6d8bc707bcafbeabf3f5ce1
---
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +2 -2
index 615b8b1..df66abe 100644
@@ -685,7 +685,7 @@ static int vce_v3_0_process_interrupt(struct amdgpu_device *adev,
 	return 0;
 }
 
-static void vce_v3_set_bypass_mode(struct amdgpu_device *adev, bool enable)
+static void vce_v3_0_set_bypass_mode(struct amdgpu_device *adev, bool enable)
 {
 	u32 tmp = RREG32_SMC(ixGCK_DFS_BYPASS_CNTL);
 
@@ -705,7 +705,7 @@ static int vce_v3_0_set_clockgating_state(void *handle,
 	int i;
 
 	if (adev->asic_type == CHIP_POLARIS10)
-		vce_v3_set_bypass_mode(adev, enable);
+		vce_v3_0_set_bypass_mode(adev, enable);
 
 	if (!(adev->cg_flags & AMD_CG_SUPPORT_VCE_MGCG))
 		return 0;
Signature · 6 lines
1.9.1

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

PATCH 2/3 drm/amd/powerplay: add bypass mode for vce 2.0.

From: Rex Zhu <[email protected]>

fix issue after vce encode, the eclk stay high.

Change-Id I329d0cbc6342b2d6a7e3968bc211ddc533bf33b5
---
 drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/vce_v2_0.c +19 -2
index 5fa55b5..ee8a0cd 100644
@@ -30,10 +30,10 @@
 #include "amdgpu.h"
 #include "amdgpu_vce.h"
 #include "cikd.h"
-
 #include "vce/vce_2_0_d.h"
 #include "vce/vce_2_0_sh_mask.h"
-
+#include "smu/smu_7_0_1_d.h"
+#include "smu/smu_7_0_1_sh_mask.h"
 #include "oss/oss_2_0_d.h"
 #include "oss/oss_2_0_sh_mask.h"
 
@@ -548,11 +548,28 @@ static int vce_v2_0_process_interrupt(struct amdgpu_device *adev,
 	return 0;
 }
 
+static void vce_v2_0_set_bypass_mode(struct amdgpu_device *adev, bool enable)
+{
+	u32 tmp = RREG32_SMC(ixGCK_DFS_BYPASS_CNTL);
+
+	if (enable)
+		tmp |= GCK_DFS_BYPASS_CNTL__BYPASSECLK_MASK;
+	else
+		tmp &= ~GCK_DFS_BYPASS_CNTL__BYPASSECLK_MASK;
+
+	WREG32_SMC(ixGCK_DFS_BYPASS_CNTL, tmp);
+}
+
+
 static int vce_v2_0_set_clockgating_state(void *handle,
 					  enum amd_clockgating_state state)
 {
 	bool gate = false;
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+	bool enable = (state == AMD_CG_STATE_GATE) ? true : false;
+
+
+	vce_v2_0_set_bypass_mode(adev, enable);
 
 	if (state == AMD_CG_STATE_GATE)
 		gate = true;
Signature · 6 lines
1.9.1

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

PATCH 3/3 drm/amdgpu: add vce bypass mode for tonga.

In reply to root

From: Rex Zhu <[email protected]>

fix issue that encode test failed on the second time when vce dpm enabled on tonga.

Change-Id I9c77b631b977ab5cc14dc553b6e6beb502e4bd0e
---
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +2 -1
index df66abe..168b0db 100644
@@ -704,7 +704,8 @@ static int vce_v3_0_set_clockgating_state(void *handle,
 	bool enable = (state == AMD_CG_STATE_GATE) ? true : false;
 	int i;
 
-	if (adev->asic_type == CHIP_POLARIS10)
+	if ((adev->asic_type == CHIP_POLARIS10) ||
+	    (adev->asic_type == CHIP_TONGA))
 		vce_v3_0_set_bypass_mode(adev, enable);
 
 	if (!(adev->cg_flags & AMD_CG_SUPPORT_VCE_MGCG))
Signature · 6 lines
1.9.1

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

Re: [PATCH 3/3] drm/amdgpu: add vce bypass mode for tonga.

This regresses vce perf badly on tonga

https://bugs.freedesktop.org/show_bug.cgi?id=97494

Maybe I need a better test case or faster cpu or something, but vce powerplay encode issues disappeared for me with the latest firmware.

Quoted 19 lines · root

From: Rex Zhu <[email protected]>

fix issue that encode test failed on the second time when vce dpm enabled on tonga.

Change-Id I9c77b631b977ab5cc14dc553b6e6beb502e4bd0e
---
  drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +0 -0
index df66abe..168b0db 100644

drivers/gpu/drm/amd/amdgpu/vce_v3_0.c static int vce_v3_0_set_clockgating_state(void *handle, · line 711

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +2 -1
@@ -704,7 +704,8 @@ static int vce_v3_0_set_clockgating_state(void *handle,
  	bool enable = (state == AMD_CG_STATE_GATE) ? true : false;
  	int i;
 
-	if (adev->asic_type == CHIP_POLARIS10)
+	if ((adev->asic_type == CHIP_POLARIS10) ||
+	    (adev->asic_type == CHIP_TONGA))
  		vce_v3_0_set_bypass_mode(adev, enable);
 
  	if (!(adev->cg_flags & AMD_CG_SUPPORT_VCE_MGCG))

_______________________________________________
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): [email protected]

#5 lore raw

Re: [PATCH 3/3] drm/amdgpu: add vce bypass mode for tonga.

Quoted 7 lines · Andy Furniss

This regresses vce perf badly on tonga

https://bugs.freedesktop.org/show_bug.cgi?id=97494

Maybe I need a better test case or faster cpu or something, but vce powerplay encode issues disappeared for me with the latest firmware.

I did eventually find an issue - but I don't know if it's what the comment below referred to.

vaapi cbr since the mesa commit that enabled dual instance can sometimes produce different md5sums, though the vid is visually OK. Maybe gstreamer timing based as it can be reduced by changing cpufreq from on_demand to perf or adding ! queue !. Higher bitrates seem to not have the issue, cqp doesn't seem affected.

Quoted 25 lines
Quoted 23 lines · root

From: Rex Zhu <[email protected]>

fix issue that encode test failed on the second time when vce dpm enabled on tonga.

Change-Id I9c77b631b977ab5cc14dc553b6e6beb502e4bd0e
---
  drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +0 -0
index df66abe..168b0db 100644
@@ -704,7 +704,8 @@ static int vce_v3_0_set_clockgating_state(void
 *handle,
      bool enable = (state == AMD_CG_STATE_GATE) ? true : false;
      int i;
 
Quoted 8 lines
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +2 -1
-    if (adev->asic_type == CHIP_POLARIS10)
+    if ((adev->asic_type == CHIP_POLARIS10) ||
+        (adev->asic_type == CHIP_TONGA))
          vce_v3_0_set_bypass_mode(adev, enable);
 
      if (!(adev->cg_flags & AMD_CG_SUPPORT_VCE_MGCG))

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