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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

From: amd-gfx [mailto:amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of StDenis, Tom
Sent: Wednesday, November 09, 2016 5:24 AM
To: Zhu, Rex
Cc: amd-gfx at 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-bounces@xxxxxxxxxxxxxxxxxxxxx<mailto:amd-gfx-bounces at lists.freedesktop.org>> on behalf of Rex Zhu <Rex.Zhu at amd.com<mailto:Rex.Zhu at amd.com>>
Sent: Wednesday, November 9, 2016 05:08
To: amd-gfx at lists.freedesktop.org<mailto:amd-gfx at 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.Zhu at amd.com<mailto:Rex.Zhu at 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 at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20161109/b5e524fb/attachment.html>


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux