Re: [PATCH 2/5] drm/amd/pp: Allocate ucode bo in request_smu_load_fw

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 3, 2018 at 7:11 AM Rex Zhu <Rex.Zhu@xxxxxxx> wrote:
>
> ucode bo is needed by request_smu_load_fw,
> the request_smu_load_fw maybe called by gfx/sdma
> before smu hw init.
> so move amdgpu_ucode_bo_init to request_smu_lowd_fw
> from smu hw init.
>
> Reviewed-by: Evan Quan <evan.quan@xxxxxxx>
> Signed-off-by: Rex Zhu <Rex.Zhu@xxxxxxx>

Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx>


> ---
>  drivers/gpu/drm/amd/powerplay/amd_powerplay.c      | 3 ---
>  drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 2 ++
>  drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c | 2 ++
>  3 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> index e51d961..b2ebcb1 100644
> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> @@ -124,9 +124,6 @@ static int pp_hw_init(void *handle)
>         struct amdgpu_device *adev = handle;
>         struct pp_hwmgr *hwmgr = adev->powerplay.pp_handle;
>
> -       if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU)
> -               amdgpu_ucode_init_bo(adev);
> -
>         ret = hwmgr_hw_init(hwmgr);
>
>         if (ret)
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
> index 794a165..99b4e4f 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
> @@ -346,6 +346,8 @@ int smu7_request_smu_load_fw(struct pp_hwmgr *hwmgr)
>         if (!hwmgr->reload_fw)
>                 return 0;
>
> +       amdgpu_ucode_init_bo(hwmgr->adev);
> +
>         if (smu_data->soft_regs_start)
>                 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC,
>                                         smu_data->soft_regs_start + smum_get_offsetof(hwmgr,
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c
> index 7b3b66d..abbf2f2 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c
> @@ -664,6 +664,8 @@ static int smu8_request_smu_load_fw(struct pp_hwmgr *hwmgr)
>         if (!hwmgr->reload_fw)
>                 return 0;
>
> +       amdgpu_ucode_init_bo(hwmgr->adev);
> +
>         smu8_smu_populate_firmware_entries(hwmgr);
>
>         smu8_smu_construct_toc(hwmgr);
> --
> 1.9.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux