diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/0890-drm-amd-amdgpu-Tidy-up-gfx_v9_0_enable_cp_power_gati.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.14.71/0890-drm-amd-amdgpu-Tidy-up-gfx_v9_0_enable_cp_power_gati.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/0890-drm-amd-amdgpu-Tidy-up-gfx_v9_0_enable_cp_power_gati.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/0890-drm-amd-amdgpu-Tidy-up-gfx_v9_0_enable_cp_power_gati.patch new file mode 100644 index 00000000..e07b4212 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/0890-drm-amd-amdgpu-Tidy-up-gfx_v9_0_enable_cp_power_gati.patch @@ -0,0 +1,41 @@ +From 4b47fce6b74ce3e065a3ae54d1a63741b8345981 Mon Sep 17 00:00:00 2001 +From: Tom St Denis <tom.stdenis@amd.com> +Date: Thu, 31 Aug 2017 09:12:47 -0400 +Subject: [PATCH 0890/4131] drm/amd/amdgpu: Tidy up + gfx_v9_0_enable_cp_power_gating() + +Signed-off-by: Tom St Denis <tom.stdenis@amd.com> +Reviewed-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +++++---------- + 1 file changed, 5 insertions(+), 10 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +index d256107..8f9c3d8 100644 +--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +@@ -1870,16 +1870,11 @@ static void gfx_v9_0_enable_cp_power_gating(struct amdgpu_device *adev, + uint32_t default_data = 0; + + default_data = data = RREG32(SOC15_REG_OFFSET(GC, 0, mmRLC_PG_CNTL)); +- +- if (enable == true) { +- data &= ~RLC_PG_CNTL__CP_PG_DISABLE_MASK; +- if(default_data != data) +- WREG32(SOC15_REG_OFFSET(GC, 0, mmRLC_PG_CNTL), data); +- } else { +- data |= RLC_PG_CNTL__CP_PG_DISABLE_MASK; +- if(default_data != data) +- WREG32(SOC15_REG_OFFSET(GC, 0, mmRLC_PG_CNTL), data); +- } ++ data = REG_SET_FIELD(data, RLC_PG_CNTL, ++ CP_PG_DISABLE, ++ enable ? 0 : 1); ++ if(default_data != data) ++ WREG32(SOC15_REG_OFFSET(GC, 0, mmRLC_PG_CNTL), data); + } + + static void gfx_v9_0_enable_gfx_cg_power_gating(struct amdgpu_device *adev, +-- +2.7.4 + |