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>
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user