You could also just reuse one of the tmp variables too.  Either way:
Reviewed-by: Alex Deucher <alexander.deuc...@amd.com>

From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of 
StDenis, Tom
Sent: Wednesday, November 09, 2016 5:24 AM
To: Zhu, Rex
Cc: amd-gfx@lists.freedesktop.org
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-boun...@lists.freedesktop.org<mailto:amd-gfx-boun...@lists.freedesktop.org>>
 on behalf of Rex Zhu <rex....@amd.com<mailto:rex....@amd.com>>
Sent: Wednesday, November 9, 2016 05:08
To: amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org>
Cc: Zhu, Rex
Subject: [PATCH 1/2] drm/amdgpu: always un-gate UVD REGS path.

Change-Id: I910a79b551a9b79b635161bb42ac123a23783225
Signed-off-by: Rex Zhu <rex....@amd.com<mailto:rex....@amd.com>>
---
 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
amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to