diff options
author | Feifei Xu <Feifei.Xu@amd.com> | 2020-11-19 18:12:26 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-03-23 22:54:49 -0400 |
commit | 5c03e5843e6bd1e6f2271a54c9b30524ba78bb8f (patch) | |
tree | b82f270e2f490bdcc81dc3d98e146c13911dccb0 /drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | |
parent | 4c2e5f513e950038c594df04ae2cc511fa854ccb (diff) | |
download | linux-stable-5c03e5843e6bd1e6f2271a54c9b30524ba78bb8f.tar.gz linux-stable-5c03e5843e6bd1e6f2271a54c9b30524ba78bb8f.tar.bz2 linux-stable-5c03e5843e6bd1e6f2271a54c9b30524ba78bb8f.zip |
drm/amdgpu:add smu mode1/2 support for aldebaran
Use MSG_GfxDriverReset for mode reset and retire MSG_Mode1Reset.
Centralize soc15_asic_mode1_reset() and nv_asic_mode1_reset()functions.
Add mode2_reset_is_support() for smu->ppt_funcs.
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c')
-rw-r--r-- | drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c index ffddee897d05..4ffe74cdd287 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c @@ -1917,6 +1917,9 @@ int smu_set_mp1_state(void *handle, msg = SMU_MSG_PrepareMp1ForUnload; break; case PP_MP1_STATE_RESET: + /*TODO: since the SMU_MSG_PrepareMp1ForReset is retired in Aldebaran + * Add handling here forAldebaran. + */ msg = SMU_MSG_PrepareMp1ForReset; break; case PP_MP1_STATE_NONE: @@ -2788,6 +2791,23 @@ bool smu_mode1_reset_is_support(struct smu_context *smu) return ret; } +bool smu_mode2_reset_is_support(struct smu_context *smu) +{ + bool ret = false; + + if (!smu->pm_enabled) + return false; + + mutex_lock(&smu->mutex); + + if (smu->ppt_funcs && smu->ppt_funcs->mode2_reset_is_support) + ret = smu->ppt_funcs->mode2_reset_is_support(smu); + + mutex_unlock(&smu->mutex); + + return ret; +} + int smu_mode1_reset(struct smu_context *smu) { int ret = 0; |