diff options
author | Hawking Zhang <Hawking.Zhang@amd.com> | 2017-06-19 14:39:02 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-06-29 12:43:46 -0400 |
commit | f8386b3521f2d97bc782c545a9ab1a10ff260d25 (patch) | |
tree | 69ba242cb94d47f06ac9e99fbd8e2ac6db1aab7e /drivers/gpu/drm | |
parent | a95890b45fcf982b34a0357793499ed44f15ddd9 (diff) | |
download | op-kernel-dev-f8386b3521f2d97bc782c545a9ab1a10ff260d25.zip op-kernel-dev-f8386b3521f2d97bc782c545a9ab1a10ff260d25.tar.gz |
drm/amdgpu: add new flag AMD_PG_SUPPORT_MMHUB
Signed-off-by: Hawking Zhang <Hawking.Zhang@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')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/include/amd_shared.h | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index 3392bd4..175ba5f 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c @@ -698,6 +698,7 @@ static int gmc_v9_0_gart_enable(struct amdgpu_device *adev) switch (adev->asic_type) { case CHIP_RAVEN: mmhub_v1_0_initialize_power_gating(adev); + mmhub_v1_0_update_power_gating(adev, true); break; default: break; diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c index c885c0d..9804318 100644 --- a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c +++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c @@ -426,7 +426,7 @@ void mmhub_v1_0_update_power_gating(struct amdgpu_device *adev, pctl0_reng_execute = RREG32_SOC15(MMHUB, 0, mmPCTL0_RENG_EXECUTE); pctl1_reng_execute = RREG32_SOC15(MMHUB, 0, mmPCTL1_RENG_EXECUTE); - if (enable) { + if (enable && adev->pg_flags & AMD_PG_SUPPORT_MMHUB) { pctl0_reng_execute = REG_SET_FIELD(pctl0_reng_execute, PCTL0_RENG_EXECUTE, RENG_EXECUTE_ON_PWR_UP, 1); diff --git a/drivers/gpu/drm/amd/include/amd_shared.h b/drivers/gpu/drm/amd/include/amd_shared.h index beb2a81..70e8c20 100644 --- a/drivers/gpu/drm/amd/include/amd_shared.h +++ b/drivers/gpu/drm/amd/include/amd_shared.h @@ -184,6 +184,7 @@ enum amd_fan_ctrl_mode { #define AMD_PG_SUPPORT_SAMU (1 << 10) #define AMD_PG_SUPPORT_GFX_QUICK_MG (1 << 11) #define AMD_PG_SUPPORT_GFX_PIPELINE (1 << 12) +#define AMD_PG_SUPPORT_MMHUB (1 << 13) enum amd_pm_state_type { /* not used for dpm */ |