diff options
author | Tom St Denis | 2017-08-31 15:31:23 +0200 |
---|---|---|
committer | Alex Deucher | 2017-08-31 21:01:04 +0200 |
commit | e567fa69f2045b5484a232a51ebbfe92f7c65386 (patch) | |
tree | f55dff32c150caee99049cdd4c1f92be5e811c83 /drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | |
parent | drm/amd/amdgpu: Tidy up gfx_v9_0_enable_gfx_static_mg_power_gating() (diff) | |
download | kernel-qcow2-linux-e567fa69f2045b5484a232a51ebbfe92f7c65386.tar.gz kernel-qcow2-linux-e567fa69f2045b5484a232a51ebbfe92f7c65386.tar.xz kernel-qcow2-linux-e567fa69f2045b5484a232a51ebbfe92f7c65386.zip |
drm/amd/amdgpu: Tidy up gfx_v9_0_enable_gfx_dynamic_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.c | 7 |
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 22346bbe9a4c..16d1a429ec9f 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c @@ -1926,10 +1926,9 @@ static void gfx_v9_0_enable_gfx_dynamic_mg_power_gating(struct amdgpu_device *ad uint32_t data, default_data; default_data = data = RREG32(SOC15_REG_OFFSET(GC, 0, mmRLC_PG_CNTL)); - if (enable == true) - data |= RLC_PG_CNTL__DYN_PER_CU_PG_ENABLE_MASK; - else - data &= ~RLC_PG_CNTL__DYN_PER_CU_PG_ENABLE_MASK; + data = REG_SET_FIELD(data, RLC_PG_CNTL, + DYN_PER_CU_PG_ENABLE, + enable ? 1 : 0); if(default_data != data) WREG32(SOC15_REG_OFFSET(GC, 0, mmRLC_PG_CNTL), data); } |