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 <[email protected]> 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
Signed-off-by: Rex Zhu <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c 
b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
index d2c96f1..d686946 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
@@ -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

Reply via email to