summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
diff options
context:
space:
mode:
authorTom St Denis2017-08-31 15:31:01 +0200
committerAlex Deucher2017-08-31 21:01:03 +0200
commit7915c8fd7ec70f65c66c268d8d19f563b5a0162d (patch)
tree79b3a4a97bb3c7ff4055f9c08867695997918027 /drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
parentdrm/amd/amdgpu: Tidy up gfx_v9_0_enable_gfx_pipeline_powergating() (diff)
downloadkernel-qcow2-linux-7915c8fd7ec70f65c66c268d8d19f563b5a0162d.tar.gz
kernel-qcow2-linux-7915c8fd7ec70f65c66c268d8d19f563b5a0162d.tar.xz
kernel-qcow2-linux-7915c8fd7ec70f65c66c268d8d19f563b5a0162d.zip
drm/amd/amdgpu: Tidy up gfx_v9_0_enable_gfx_static_mg_power_gating()
Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index 1a928f6dc801..22346bbe9a4c 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -1913,10 +1913,9 @@ static void gfx_v9_0_enable_gfx_static_mg_power_gating(struct amdgpu_device *ade
uint32_t data, default_data;
default_data = data = RREG32(SOC15_REG_OFFSET(GC, 0, mmRLC_PG_CNTL));
- if (enable == true)
- data |= RLC_PG_CNTL__STATIC_PER_CU_PG_ENABLE_MASK;
- else
- data &= ~RLC_PG_CNTL__STATIC_PER_CU_PG_ENABLE_MASK;
+ data = REG_SET_FIELD(data, RLC_PG_CNTL,
+ STATIC_PER_CU_PG_ENABLE,
+ enable ? 1 : 0);
if(default_data != data)
WREG32(SOC15_REG_OFFSET(GC, 0, mmRLC_PG_CNTL), data);
}