Skip to contentSkip to conversation

drm/amdgpu: always un-gate UVD REGS path.

PATCH In review Rex Zhu 3 participants 5 messages Nov 9, 2016 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH 1/2 drm/amdgpu: always un-gate UVD REGS path.

Change-Id I910a79b551a9b79b635161bb42ac123a23783225
---
 drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c +3 -0
index d2c96f1..d686946 100644
@@ -596,7 +596,10 @@ static void uvd_v4_2_set_dcm(struct amdgpu_device *adev,
 			     bool sw_mode)
 {
 	u32 tmp, tmp2;
+	u32 data = RREG32(mmUVD_CGC_GATE);
 
+	data &= ~UVD_CGC_GATE__REGS_MASK;
+	WREG32(mmUVD_CGC_GATE, data);
 	tmp = RREG32(mmUVD_CGC_CTRL);
 	tmp &= ~(UVD_CGC_CTRL__CLK_OFF_DELAY_MASK | UVD_CGC_CTRL__CLK_GATE_DLY_TIMER_MASK);
 	tmp |= UVD_CGC_CTRL__DYN_CLOCK_MODE_MASK |
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): 1478686135-21055-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

author
#2 lore raw

PATCH 2/2 drm/amdgpu: change log level to KERN_INFO in ci_dpm.c

Change-Id I2ad8a66d4dfd089b2a64ffaed81daf5b1525810b
---
 drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/ci_dpm.c +1 -1
index fe42e2f..1027f92 100644
@@ -5991,7 +5991,7 @@ static int ci_dpm_init(struct amdgpu_device *adev)
 			tmp |= CNB_PWRMGT_CNTL__DPM_ENABLED_MASK;
 			break;
 		default:
-			DRM_ERROR("Invalid PCC GPIO: %u!\n", gpio.shift);
+			DRM_INFO("Invalid PCC GPIO: %u!\n", gpio.shift);
 			break;
 		}
 		WREG32_SMC(ixCNB_PWRMGT_CNTL, tmp);
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): 1478686135-21055-2-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

Reviewed-by Alex Deucher
#4 lore raw

RE: [PATCH 2/2] drm/amdgpu: change log level to KERN_INFO in ci_dpm.c

Quoted 11 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Rex Zhu
Sent: Wednesday, November 09, 2016 5:09 AM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH 2/2] drm/amdgpu: change log level to KERN_INFO in ci_dpm.c

Change-Id I2ad8a66d4dfd089b2a64ffaed81daf5b1525810b
Quoted 22 lines
---
 drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/ci_dpm.c +1 -1
index fe42e2f..1027f92 100644
@@ -5991,7 +5991,7 @@ static int ci_dpm_init(struct amdgpu_device *adev)
 			tmp |=
 CNB_PWRMGT_CNTL__DPM_ENABLED_MASK;
 			break;
 		default:
-			DRM_ERROR("Invalid PCC GPIO: %u!\n", gpio.shift);
+			DRM_INFO("Invalid PCC GPIO: %u!\n", gpio.shift);
 			break;
 		}

WREG32_SMC(ixCNB_PWRMGT_CNTL, tmp);
--
1.9.1

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

#5 lore raw
In reply to a message not in the archive

You could do that as

WREG32_FIELD(UVD_CGC_GATE, REGS, 0);

Unless you need 'data' somewhere else in the function.

Tom

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Rex Zhu <[email protected]>
Sent: Wednesday, November 9, 2016 05:08
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH 1/2] drm/amdgpu: always un-gate UVD REGS path.

Change-Id I910a79b551a9b79b635161bb42ac123a23783225
---
 drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c +3 -0
index d2c96f1..d686946 100644
@@ -596,7 +596,10 @@ static void uvd_v4_2_set_dcm(struct amdgpu_device *adev,
                              bool sw_mode)
 {
         u32 tmp, tmp2;
+       u32 data = RREG32(mmUVD_CGC_GATE);
 
+       data &= ~UVD_CGC_GATE__REGS_MASK;
+       WREG32(mmUVD_CGC_GATE, data);
         tmp = RREG32(mmUVD_CGC_CTRL);
         tmp &= ~(UVD_CGC_CTRL__CLK_OFF_DELAY_MASK | UVD_CGC_CTRL__CLK_GATE_DLY_TIMER_MASK);
         tmp |= UVD_CGC_CTRL__DYN_CLOCK_MODE_MASK |

--
1.9.1

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

Reviewed-by
#7 lore raw

You could also just reuse one of the tmp variables too. Either way:

From: amd-gfx [mailto:amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org] On Behalf Of StDenis, Tom
Sent: Wednesday, November 09, 2016 5:24 AM
To: Zhu, Rex
Cc: [email protected]
Subject: Re: [PATCH 1/2] drm/amdgpu: always un-gate UVD REGS path.

You could do that as

WREG32_FIELD(UVD_CGC_GATE, REGS, 0);

Unless you need 'data' somewhere else in the function.

Tom

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org<mailto:[email protected]>> on behalf of Rex Zhu <[email protected]<mailto:[email protected]>>
Sent: Wednesday, November 9, 2016 05:08
To: [email protected]<mailto:[email protected]>
Cc: Zhu, Rex
Subject: [PATCH 1/2] drm/amdgpu: always un-gate UVD REGS path.

Change-Id I910a79b551a9b79b635161bb42ac123a23783225
---
 drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c +3 -0
index d2c96f1..d686946 100644
@@ -596,7 +596,10 @@ static void uvd_v4_2_set_dcm(struct amdgpu_device *adev,
                              bool sw_mode)
 {
         u32 tmp, tmp2;
+       u32 data = RREG32(mmUVD_CGC_GATE);
 
+       data &= ~UVD_CGC_GATE__REGS_MASK;
+       WREG32(mmUVD_CGC_GATE, data);
         tmp = RREG32(mmUVD_CGC_CTRL);
         tmp &= ~(UVD_CGC_CTRL__CLK_OFF_DELAY_MASK | UVD_CGC_CTRL__CLK_GATE_DLY_TIMER_MASK);
         tmp |= UVD_CGC_CTRL__DYN_CLOCK_MODE_MASK |

--
1.9.1

_______________________________________________
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