[PATCH] drm/amdgpu: Power down VCN and JPEG before disabling SMU features
Alex Deucher
alexdeucher at gmail.com
Fri Jun 18 14:05:51 UTC 2021
Acked-by: Alex Deucher <alexander.deucher at amd.com>
On Fri, Jun 18, 2021 at 5:17 AM Chengzhe Liu <ChengZhe.Liu at amd.com> wrote:
>
> When unloading driver, if VCN is powered on, sending message
> DisableAllSmuFeatures to SMU will cause SMU hang. We need to
> power down VCN and JPEG before clean up SMU.
>
> Signed-off-by: Chengzhe Liu <ChengZhe.Liu at amd.com>
> ---
> drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> index cb375f1beebd..ebe672142808 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> @@ -1453,10 +1453,14 @@ static int smu_hw_fini(void *handle)
>
> if (smu->is_apu) {
> smu_powergate_sdma(&adev->smu, true);
> - smu_dpm_set_vcn_enable(smu, false);
> - smu_dpm_set_jpeg_enable(smu, false);
> }
>
> + smu_dpm_set_vcn_enable(smu, false);
> + smu_dpm_set_jpeg_enable(smu, false);
> +
> + adev->vcn.cur_state = AMD_PG_STATE_GATE;
> + adev->jpeg.cur_state = AMD_PG_STATE_GATE;
> +
> if (!smu->pm_enabled)
> return 0;
>
> --
> 2.25.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list