Skip to contentSkip to conversation

VCE3 MGCG for Stoney/Carrizo

PATCH In review Tom St Denis 4 participants 15 messages Aug 3, 2016 8 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

PATCH 1/6 drm/amd/amdgpu: fix indentation in vce3 CG

---
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +7 -6
index e5b18ad42721..26fb606e2d3e 100644
@@ -126,6 +126,7 @@ static void vce_v3_0_set_vce_sw_clock_gating(struct amdgpu_device *adev,
 					     bool gated)
 {
 	u32 tmp, data;
+
 	/* Set Override to disable Clock Gating */
 	vce_v3_0_override_vce_clock_gating(adev, true);
 
@@ -165,9 +166,9 @@ static void vce_v3_0_set_vce_sw_clock_gating(struct amdgpu_device *adev,
 		/* Force VCE_UENC_DMA_DCLK_CTRL Clock ON */
 		tmp = data = RREG32(mmVCE_UENC_DMA_DCLK_CTRL);
 		data |= VCE_UENC_DMA_DCLK_CTRL__WRDMCLK_FORCEON_MASK |
-				VCE_UENC_DMA_DCLK_CTRL__RDDMCLK_FORCEON_MASK |
-				VCE_UENC_DMA_DCLK_CTRL__REGCLK_FORCEON_MASK  |
-				0x8;
+			VCE_UENC_DMA_DCLK_CTRL__RDDMCLK_FORCEON_MASK |
+			VCE_UENC_DMA_DCLK_CTRL__REGCLK_FORCEON_MASK  |
+			0x8;
 		if (tmp != data)
 			WREG32(mmVCE_UENC_DMA_DCLK_CTRL, data);
 	} else {
@@ -201,9 +202,9 @@ static void vce_v3_0_set_vce_sw_clock_gating(struct amdgpu_device *adev,
 		/* Set VCE_UENC_DMA_DCLK_CTRL CG always in dynamic mode */
 		tmp = data = RREG32(mmVCE_UENC_DMA_DCLK_CTRL);
 		data &= ~(VCE_UENC_DMA_DCLK_CTRL__WRDMCLK_FORCEON_MASK |
-				VCE_UENC_DMA_DCLK_CTRL__RDDMCLK_FORCEON_MASK |
-				VCE_UENC_DMA_DCLK_CTRL__REGCLK_FORCEON_MASK  |
-				0x8);
+			  VCE_UENC_DMA_DCLK_CTRL__RDDMCLK_FORCEON_MASK |
+			  VCE_UENC_DMA_DCLK_CTRL__REGCLK_FORCEON_MASK  |
+			  0x8);
 		if (tmp != data)
 			WREG32(mmVCE_UENC_DMA_DCLK_CTRL, data);
 	}
Signature · 6 lines
2.9.2

_______________________________________________
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]

#4 lore raw

Re: [PATCH 1/6] drm/amd/amdgpu: fix indentation in vce3 CG

Am 03.08.2016 um 17:51 schrieb Tom St Denis:

Quoted 1 line

This one is Reviewed-by: Christian König <[email protected]>.

For the rest I'm not deep enough into the topic to judge.

Regards,
Christian.

Quoted 32 lines
---
  drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 13 +++++++------
  1 file changed, 7 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +4 -3
index e5b18ad42721..26fb606e2d3e 100644
@@ -126,6 +126,7 @@ static void vce_v3_0_set_vce_sw_clock_gating(struct amdgpu_device *adev,
  					     bool gated)
  {
  	u32 tmp, data;
+
  	/* Set Override to disable Clock Gating */
  	vce_v3_0_override_vce_clock_gating(adev, true);
 
@@ -165,9 +166,9 @@ static void vce_v3_0_set_vce_sw_clock_gating(struct amdgpu_device *adev,
  		/* Force VCE_UENC_DMA_DCLK_CTRL Clock ON */
  		tmp = data = RREG32(mmVCE_UENC_DMA_DCLK_CTRL);
  		data |= VCE_UENC_DMA_DCLK_CTRL__WRDMCLK_FORCEON_MASK |
-				VCE_UENC_DMA_DCLK_CTRL__RDDMCLK_FORCEON_MASK |
-				VCE_UENC_DMA_DCLK_CTRL__REGCLK_FORCEON_MASK  |
-				0x8;
+			VCE_UENC_DMA_DCLK_CTRL__RDDMCLK_FORCEON_MASK |
+			VCE_UENC_DMA_DCLK_CTRL__REGCLK_FORCEON_MASK  |
+			0x8;
  		if (tmp != data)
  			WREG32(mmVCE_UENC_DMA_DCLK_CTRL, data);
  	} else {
@@ -201,9 +202,9 @@ static void vce_v3_0_set_vce_sw_clock_gating(struct amdgpu_device *adev,
  		/* Set VCE_UENC_DMA_DCLK_CTRL CG always in dynamic mode */
  		tmp = data = RREG32(mmVCE_UENC_DMA_DCLK_CTRL);

drivers/gpu/drm/amd/amdgpu/vce_v3_0.c static void vce_v3_0_set_vce_sw_clock_gating(struct amdgpu_device *adev, · line 210

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +3 -3
  		data &= ~(VCE_UENC_DMA_DCLK_CTRL__WRDMCLK_FORCEON_MASK |
-				VCE_UENC_DMA_DCLK_CTRL__RDDMCLK_FORCEON_MASK |
-				VCE_UENC_DMA_DCLK_CTRL__REGCLK_FORCEON_MASK  |
-				0x8);
+			  VCE_UENC_DMA_DCLK_CTRL__RDDMCLK_FORCEON_MASK |
+			  VCE_UENC_DMA_DCLK_CTRL__REGCLK_FORCEON_MASK  |
+			  0x8);
  		if (tmp != data)
  			WREG32(mmVCE_UENC_DMA_DCLK_CTRL, data);
  	}

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

#5 lore raw

PATCH 2/6 drm/amd/amdgpu: Fix VCE CG order and resume defaults

In reply to a message not in the archive

CG was being enabled in reverse sense from dpm/powerplay. Also fix the default CLK_EN signal to enable all of the blocks.

---
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +3 -3
index 26fb606e2d3e..93604bb78257 100644
@@ -130,7 +130,7 @@ static void vce_v3_0_set_vce_sw_clock_gating(struct amdgpu_device *adev,
 	/* Set Override to disable Clock Gating */
 	vce_v3_0_override_vce_clock_gating(adev, true);
 
-	if (!gated) {
+	if (gated) {
 		/* Force CLOCK ON for VCE_CLOCK_GATING_B,
 		 * {*_FORCE_ON, *_FORCE_OFF} = {1, 0}
 		 * VREG can be FORCE ON or set to Dynamic, but can't be OFF
@@ -153,7 +153,7 @@ static void vce_v3_0_set_vce_sw_clock_gating(struct amdgpu_device *adev,
 		/* set VCE_UENC_CLOCK_GATING_2 */
 		tmp = data = RREG32(mmVCE_UENC_CLOCK_GATING_2);
 		data |= 0x2;
-		data &= ~0x2;
+		data &= ~0x00010000;
 		if (tmp != data)
 			WREG32(mmVCE_UENC_CLOCK_GATING_2, data);
 
@@ -538,7 +538,7 @@ static void vce_v3_0_mc_resume(struct amdgpu_device *adev, int idx)
 	WREG32_P(mmVCE_CLOCK_GATING_A, 0, ~(1 << 16));
 	WREG32_P(mmVCE_UENC_CLOCK_GATING, 0x1FF000, ~0xFF9FF000);
 	WREG32_P(mmVCE_UENC_REG_CLOCK_GATING, 0x3F, ~0x3F);
-	WREG32(mmVCE_CLOCK_GATING_B, 0xf7);
+	WREG32(mmVCE_CLOCK_GATING_B, 0x1FF);
 
 	WREG32(mmVCE_LMI_CTRL, 0x00398000);
 	WREG32_P(mmVCE_LMI_CACHE_CTRL, 0x0, ~0x1);
Signature · 6 lines
2.9.2

_______________________________________________
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]

#7 lore raw

RE: [PATCH 2/6] drm/amd/amdgpu: Fix VCE CG order and resume defaults

Quoted 23 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Tom St Denis
Sent: Wednesday, August 03, 2016 11:52 AM
To: [email protected]
Cc: StDenis, Tom
Subject: [PATCH 2/6] drm/amd/amdgpu: Fix VCE CG order and resume defaults

CG was being enabled in reverse sense from dpm/powerplay. Also fix the default CLK_EN signal to enable all of the blocks.

---
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +0 -0
index 26fb606e2d3e..93604bb78257 100644

drivers/gpu/drm/amd/amdgpu/vce_v3_0.c static void vce_v3_0_set_vce_sw_clock_gating(struct · line 136

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +1 -1
@@ -130,7 +130,7 @@ static void vce_v3_0_set_vce_sw_clock_gating(struct
 amdgpu_device *adev,
 	/* Set Override to disable Clock Gating */
 	vce_v3_0_override_vce_clock_gating(adev, true);
 
-	if (!gated) {
+	if (gated) {
 		/* Force CLOCK ON for VCE_CLOCK_GATING_B,
 		 * {*_FORCE_ON, *_FORCE_OFF} = {1, 0}

This doesn't make sense to me unless I'm mis-understanding the specific CG feature. Forcing the clocks on, implies ungating, not gating. In this case if forcing the clocks on part of the fw controlled clockgating configuration? If so, please add a comment to that effect in the function.

Alex

Quoted 25 lines
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +2 -2
 		 * VREG can be FORCE ON or set to Dynamic, but can't be OFF
@@ -153,7 +153,7 @@ static void vce_v3_0_set_vce_sw_clock_gating(struct
 amdgpu_device *adev,
 		/* set VCE_UENC_CLOCK_GATING_2 */
 		tmp = data = RREG32(mmVCE_UENC_CLOCK_GATING_2);
 		data |= 0x2;
-		data &= ~0x2;
+		data &= ~0x00010000;
 		if (tmp != data)
 			WREG32(mmVCE_UENC_CLOCK_GATING_2, data);
@@ -538,7 +538,7 @@ static void vce_v3_0_mc_resume(struct
 amdgpu_device *adev, int idx)
 	WREG32_P(mmVCE_CLOCK_GATING_A, 0, ~(1 << 16));
 	WREG32_P(mmVCE_UENC_CLOCK_GATING, 0x1FF000,
 ~0xFF9FF000);
 	WREG32_P(mmVCE_UENC_REG_CLOCK_GATING, 0x3F, ~0x3F);
-	WREG32(mmVCE_CLOCK_GATING_B, 0xf7);
+	WREG32(mmVCE_CLOCK_GATING_B, 0x1FF);
 
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +0 -1
 	WREG32(mmVCE_LMI_CTRL, 0x00398000);
 	WREG32_P(mmVCE_LMI_CACHE_CTRL, 0x0, ~0x1);
--

2.9.2

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

A message that is not in the archive (sent off-list or not yet received): CY4PR12MB13012C4621A36F9729CABCABF7060-rpdhrqHFk05CiBuckNFh9wdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#9 lore raw

Re: [PATCH 2/6] drm/amd/amdgpu: Fix VCE CG order and resume defaults

The logic is a bit confusing at first. "gated" means that SW CG is enabled not that the clocks are turned off. When I sampled the registers in the original configuration the clocks were reading 100% when the core was active. It would read 0% when idle but only because power was gated.

With the logic the way it is when the core is active I see many of the clocks throttle as they should.

Tom

________________________________
From: Deucher, Alexander
Sent: Wednesday, August 3, 2016 12:28
To: 'Tom St Denis'; [email protected]
Cc: StDenis, Tom
Subject: RE: [PATCH 2/6] drm/amd/amdgpu: Fix VCE CG order and resume defaults

Quoted 23 lines

-----Original Message-----
From: amd-gfx [mailto:amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org] On Behalf Of Tom St Denis
Sent: Wednesday, August 03, 2016 11:52 AM
To: [email protected]
Cc: StDenis, Tom
Subject: [PATCH 2/6] drm/amd/amdgpu: Fix VCE CG order and resume
defaults

CG was being enabled in reverse sense from dpm/powerplay. Also fix the default CLK_EN signal to enable all of the blocks.

---
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +0 -0
index 26fb606e2d3e..93604bb78257 100644

drivers/gpu/drm/amd/amdgpu/vce_v3_0.c static void vce_v3_0_set_vce_sw_clock_gating(struct · line 136

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +1 -1
@@ -130,7 +130,7 @@ static void vce_v3_0_set_vce_sw_clock_gating(struct
 amdgpu_device *adev,
       /* Set Override to disable Clock Gating */
       vce_v3_0_override_vce_clock_gating(adev, true);
 
-     if (!gated) {
+     if (gated) {
               /* Force CLOCK ON for VCE_CLOCK_GATING_B,
                * {*_FORCE_ON, *_FORCE_OFF} = {1, 0}

This doesn't make sense to me unless I'm mis-understanding the specific CG feature. Forcing the clocks on, implies ungating, not gating. In this case if forcing the clocks on part of the fw controlled clockgating configuration? If so, please add a comment to that effect in the function.

Alex

Quoted 22 lines

* VREG can be FORCE ON or set to Dynamic, but can't be OFF

drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +2 -2
@@ -153,7 +153,7 @@ static void vce_v3_0_set_vce_sw_clock_gating(struct
 amdgpu_device *adev,
               /* set VCE_UENC_CLOCK_GATING_2 */
               tmp = data = RREG32(mmVCE_UENC_CLOCK_GATING_2);
               data |= 0x2;
-             data &= ~0x2;
+             data &= ~0x00010000;
               if (tmp != data)
                       WREG32(mmVCE_UENC_CLOCK_GATING_2, data);
@@ -538,7 +538,7 @@ static void vce_v3_0_mc_resume(struct
 amdgpu_device *adev, int idx)
       WREG32_P(mmVCE_CLOCK_GATING_A, 0, ~(1 << 16));
       WREG32_P(mmVCE_UENC_CLOCK_GATING, 0x1FF000,
 ~0xFF9FF000);
       WREG32_P(mmVCE_UENC_REG_CLOCK_GATING, 0x3F, ~0x3F);
-     WREG32(mmVCE_CLOCK_GATING_B, 0xf7);
+     WREG32(mmVCE_CLOCK_GATING_B, 0x1FF);
 
       WREG32(mmVCE_LMI_CTRL, 0x00398000);
       WREG32_P(mmVCE_LMI_CACHE_CTRL, 0x0, ~0x1);
Quoted 7 lines

--
2.9.2

_______________________________________________
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

A message that is not in the archive (sent off-list or not yet received): DM5PR12MB1132B576B670B06A46671827F7060-2J9CzHegvk+UzrhdoDeimQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

Reviewed-by
#11 lore raw

RE: [PATCH 2/6] drm/amd/amdgpu: Fix VCE CG order and resume defaults

Maybe add a comment to that effect. With that added, this patch is:

From: StDenis, Tom
Sent: Wednesday, August 03, 2016 12:31 PM
To: Deucher, Alexander; [email protected]
Subject: Re: [PATCH 2/6] drm/amd/amdgpu: Fix VCE CG order and resume defaults

The logic is a bit confusing at first. "gated" means that SW CG is enabled not that the clocks are turned off. When I sampled the registers in the original configuration the clocks were reading 100% when the core was active. It would read 0% when idle but only because power was gated.

With the logic the way it is when the core is active I see many of the clocks throttle as they should.

Tom

________________________________
From: Deucher, Alexander
Sent: Wednesday, August 3, 2016 12:28
To: 'Tom St Denis'; [email protected]<mailto:[email protected]>
Cc: StDenis, Tom
Subject: RE: [PATCH 2/6] drm/amd/amdgpu: Fix VCE CG order and resume defaults

Quoted 23 lines

-----Original Message-----
From: amd-gfx [mailto:amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org] On Behalf
Of Tom St Denis
Sent: Wednesday, August 03, 2016 11:52 AM
To: [email protected]<mailto:[email protected]>
Cc: StDenis, Tom
Subject: [PATCH 2/6] drm/amd/amdgpu: Fix VCE CG order and resume
defaults

CG was being enabled in reverse sense from dpm/powerplay. Also fix the default CLK_EN signal to enable all of the blocks.

---
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +0 -0
index 26fb606e2d3e..93604bb78257 100644

drivers/gpu/drm/amd/amdgpu/vce_v3_0.c static void vce_v3_0_set_vce_sw_clock_gating(struct · line 136

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +1 -1
@@ -130,7 +130,7 @@ static void vce_v3_0_set_vce_sw_clock_gating(struct
 amdgpu_device *adev,
       /* Set Override to disable Clock Gating */
       vce_v3_0_override_vce_clock_gating(adev, true);
 
-     if (!gated) {
+     if (gated) {
               /* Force CLOCK ON for VCE_CLOCK_GATING_B,
                * {*_FORCE_ON, *_FORCE_OFF} = {1, 0}

This doesn't make sense to me unless I'm mis-understanding the specific CG feature. Forcing the clocks on, implies ungating, not gating. In this case if forcing the clocks on part of the fw controlled clockgating configuration? If so, please add a comment to that effect in the function.

Alex

Quoted 22 lines

* VREG can be FORCE ON or set to Dynamic, but can't be OFF

drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +2 -2
@@ -153,7 +153,7 @@ static void vce_v3_0_set_vce_sw_clock_gating(struct
 amdgpu_device *adev,
               /* set VCE_UENC_CLOCK_GATING_2 */
               tmp = data = RREG32(mmVCE_UENC_CLOCK_GATING_2);
               data |= 0x2;
-             data &= ~0x2;
+             data &= ~0x00010000;
               if (tmp != data)
                       WREG32(mmVCE_UENC_CLOCK_GATING_2, data);
@@ -538,7 +538,7 @@ static void vce_v3_0_mc_resume(struct
 amdgpu_device *adev, int idx)
       WREG32_P(mmVCE_CLOCK_GATING_A, 0, ~(1 << 16));
       WREG32_P(mmVCE_UENC_CLOCK_GATING, 0x1FF000,
 ~0xFF9FF000);
       WREG32_P(mmVCE_UENC_REG_CLOCK_GATING, 0x3F, ~0x3F);
-     WREG32(mmVCE_CLOCK_GATING_B, 0xf7);
+     WREG32(mmVCE_CLOCK_GATING_B, 0x1FF);
 
       WREG32(mmVCE_LMI_CTRL, 0x00398000);
       WREG32_P(mmVCE_LMI_CACHE_CTRL, 0x0, ~0x1);
Quoted 7 lines

--
2.9.2

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

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

#12 lore raw

PATCH 3/6 drm/amd/amdgpu: Don't set VCE CG in startup

In reply to a message not in the archive

It's handled by DPM/PP properly.

---
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +0 -4
index 93604bb78257..9d1924e4e2bc 100644
@@ -297,10 +297,6 @@ static int vce_v3_0_start(struct amdgpu_device *adev)
 		/* clear BUSY flag */
 		WREG32_P(mmVCE_STATUS, 0, ~VCE_STATUS__JOB_BUSY_MASK);
 
-		/* Set Clock-Gating off */
-		if (adev->cg_flags & AMD_CG_SUPPORT_VCE_MGCG)
-			vce_v3_0_set_vce_sw_clock_gating(adev, false);
-
 		if (r) {
 			DRM_ERROR("VCE not responding, giving up!!!\n");
 			mutex_unlock(&adev->grbm_idx_mutex);
Signature · 6 lines
2.9.2

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

PATCH 4/6 drm/amd/amdgpu: Move VCE bypass after MGCG test

In reply to a message not in the archive

Only issue bypass if MGCG enabled

---
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +3 -3
index 9d1924e4e2bc..63c9efefa583 100644
@@ -769,12 +769,12 @@ 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)
-		vce_v3_set_bypass_mode(adev, enable);
-
 	if (!(adev->cg_flags & AMD_CG_SUPPORT_VCE_MGCG))
 		return 0;
 
+	if (adev->asic_type == CHIP_POLARIS10)
+		vce_v3_set_bypass_mode(adev, enable);
+
 	mutex_lock(&adev->grbm_idx_mutex);
 	for (i = 0; i < 2; i++) {
 		/* Program VCE Instance 0 or 1 if not harvested */
Signature · 6 lines
2.9.2

_______________________________________________
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]

#15 lore raw

RE: [PATCH 4/6] drm/amd/amdgpu: Move VCE bypass after MGCG test

Quoted 9 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Tom St Denis
Sent: Wednesday, August 03, 2016 11:52 AM
To: [email protected]
Cc: StDenis, Tom
Subject: [PATCH 4/6] drm/amd/amdgpu: Move VCE bypass after MGCG test

Only issue bypass if MGCG enabled

NACK. We need this for Polaris right now since we don't enable CG yet and setting bypass mode saves power.

Alex

Quoted 31 lines
---
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +3 -3
index 9d1924e4e2bc..63c9efefa583 100644
@@ -769,12 +769,12 @@ 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)
-		vce_v3_set_bypass_mode(adev, enable);
-
 	if (!(adev->cg_flags & AMD_CG_SUPPORT_VCE_MGCG))
 		return 0;
 
+	if (adev->asic_type == CHIP_POLARIS10)
+		vce_v3_set_bypass_mode(adev, enable);
+
 	mutex_lock(&adev->grbm_idx_mutex);
 	for (i = 0; i < 2; i++) {

/* Program VCE Instance 0 or 1 if not harvested */
--
2.9.2

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

A message that is not in the archive (sent off-list or not yet received): CY4PR12MB1301BE2DF53DAA18161A20E5F7060-rpdhrqHFk05CiBuckNFh9wdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#17 lore raw

Re: [PATCH 4/6] drm/amd/amdgpu: Move VCE bypass after MGCG test

Hi Alex,

Ok, a similar change was introduced for UVD in 7a6526488b60283cec91852196a5423b1dfb14d8, should that be reverted in part too?

Tom

________________________________
From: Deucher, Alexander
Sent: Wednesday, August 3, 2016 12:27
To: 'Tom St Denis'; [email protected]
Cc: StDenis, Tom
Subject: RE: [PATCH 4/6] drm/amd/amdgpu: Move VCE bypass after MGCG test

Quoted 9 lines

-----Original Message-----
From: amd-gfx [mailto:amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org] On Behalf Of Tom St Denis
Sent: Wednesday, August 03, 2016 11:52 AM
To: [email protected]
Cc: StDenis, Tom
Subject: [PATCH 4/6] drm/amd/amdgpu: Move VCE bypass after MGCG test

Only issue bypass if MGCG enabled

NACK. We need this for Polaris right now since we don't enable CG yet and setting bypass mode saves power.

Alex

Quoted 28 lines
---
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +3 -3
index 9d1924e4e2bc..63c9efefa583 100644
@@ -769,12 +769,12 @@ 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)
-             vce_v3_set_bypass_mode(adev, enable);
-
       if (!(adev->cg_flags & AMD_CG_SUPPORT_VCE_MGCG))
               return 0;
 
+     if (adev->asic_type == CHIP_POLARIS10)
+             vce_v3_set_bypass_mode(adev, enable);
+
       mutex_lock(&adev->grbm_idx_mutex);
       for (i = 0; i < 2; i++) {
               /* Program VCE Instance 0 or 1 if not harvested */
Quoted 7 lines

--
2.9.2

_______________________________________________
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

A message that is not in the archive (sent off-list or not yet received): DM5PR12MB1132D6FD80F1B27AC6321A24F7060-2J9CzHegvk+UzrhdoDeimQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#19 lore raw

RE: [PATCH 4/6] drm/amd/amdgpu: Move VCE bypass after MGCG test

Yes, please.

Thanks,

Alex

From: StDenis, Tom
Sent: Wednesday, August 03, 2016 12:29 PM
To: Deucher, Alexander; [email protected]
Subject: Re: [PATCH 4/6] drm/amd/amdgpu: Move VCE bypass after MGCG test

Hi Alex,

Ok, a similar change was introduced for UVD in 7a6526488b60283cec91852196a5423b1dfb14d8, should that be reverted in part too?

Tom

________________________________
From: Deucher, Alexander
Sent: Wednesday, August 3, 2016 12:27
To: 'Tom St Denis'; [email protected]<mailto:[email protected]>
Cc: StDenis, Tom
Subject: RE: [PATCH 4/6] drm/amd/amdgpu: Move VCE bypass after MGCG test

Quoted 9 lines

-----Original Message-----
From: amd-gfx [mailto:amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org] On Behalf
Of Tom St Denis
Sent: Wednesday, August 03, 2016 11:52 AM
To: [email protected]<mailto:[email protected]>
Cc: StDenis, Tom
Subject: [PATCH 4/6] drm/amd/amdgpu: Move VCE bypass after MGCG test

Only issue bypass if MGCG enabled

NACK. We need this for Polaris right now since we don't enable CG yet and setting bypass mode saves power.

Alex

Quoted 28 lines
---
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +3 -3
index 9d1924e4e2bc..63c9efefa583 100644
@@ -769,12 +769,12 @@ 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)
-             vce_v3_set_bypass_mode(adev, enable);
-
       if (!(adev->cg_flags & AMD_CG_SUPPORT_VCE_MGCG))
               return 0;
 
+     if (adev->asic_type == CHIP_POLARIS10)
+             vce_v3_set_bypass_mode(adev, enable);
+
       mutex_lock(&adev->grbm_idx_mutex);
       for (i = 0; i < 2; i++) {
               /* Program VCE Instance 0 or 1 if not harvested */
Quoted 7 lines

--
2.9.2

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

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

#20 lore raw

PATCH 5/6 drm/amd/amdgpu: Enable VCE MGCG for Carrizo

In reply to a message not in the archive
---
 drivers/gpu/drm/amd/amdgpu/vi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vi.c +2 -1
index 33bad99176fe..5449a3c8c9eb 100644
@@ -1577,7 +1577,8 @@ static int vi_common_early_init(void *handle)
 			AMD_CG_SUPPORT_HDP_MGCG |
 			AMD_CG_SUPPORT_HDP_LS |
 			AMD_CG_SUPPORT_SDMA_MGCG |
-			AMD_CG_SUPPORT_SDMA_LS;
+			AMD_CG_SUPPORT_SDMA_LS |
+			AMD_CG_SUPPORT_VCE_MGCG;
 		/* rev0 hardware requires workarounds to support PG */
 		adev->pg_flags = 0;
 		if (adev->rev_id != 0x00) {
Signature · 6 lines
2.9.2

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

PATCH 6/6 drm/amd/amdgpu: Enable VCE MGCG for Stoney

In reply to a message not in the archive
---
 drivers/gpu/drm/amd/amdgpu/vi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vi.c +2 -1
index 5449a3c8c9eb..07ea150f85f4 100644
@@ -1605,7 +1605,8 @@ static int vi_common_early_init(void *handle)
 			AMD_CG_SUPPORT_HDP_MGCG |
 			AMD_CG_SUPPORT_HDP_LS |
 			AMD_CG_SUPPORT_SDMA_MGCG |
-			AMD_CG_SUPPORT_SDMA_LS;
+			AMD_CG_SUPPORT_SDMA_LS |
+			AMD_CG_SUPPORT_VCE_MGCG;
 		adev->pg_flags |= AMD_PG_SUPPORT_GFX_PG |
 			AMD_PG_SUPPORT_GFX_SMG |
 			AMD_PG_SUPPORT_GFX_PIPELINE |
Signature · 6 lines
2.9.2

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

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Tom St Denis
Sent: Wednesday, August 03, 2016 11:52 AM
To: [email protected]
Subject: VCE3 MGCG for Stoney/Carrizo

These patches fix the MGCG initialization as well enable the feature for Stoney and Carrizo. Tested by inspection of the clock status registers and with consultation with the HW team.

Comments on 2, 4. The rest are:

Quoted 6 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