Commit c6a11133 authored by Hawking Zhang's avatar Hawking Zhang Committed by Alex Deucher

drm/amdgpu: query boot config cap before issue psp cmd

Only send boot_config cmd to ASICs that support dynamic
boot config. Otherwise, the boot_config cmd will fail.
Signed-off-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarJohn Clements <john.clements@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent cffd6f9d
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "amdgpu_ras.h" #include "amdgpu_ras.h"
#include "amdgpu_securedisplay.h" #include "amdgpu_securedisplay.h"
#include "amdgpu_atomfirmware.h"
static int psp_sysfs_init(struct amdgpu_device *adev); static int psp_sysfs_init(struct amdgpu_device *adev);
static void psp_sysfs_fini(struct amdgpu_device *adev); static void psp_sysfs_fini(struct amdgpu_device *adev);
...@@ -538,7 +539,7 @@ static int psp_boot_config_set(struct amdgpu_device *adev) ...@@ -538,7 +539,7 @@ static int psp_boot_config_set(struct amdgpu_device *adev)
struct psp_context *psp = &adev->psp; struct psp_context *psp = &adev->psp;
struct psp_gfx_cmd_resp *cmd = psp->cmd; struct psp_gfx_cmd_resp *cmd = psp->cmd;
if (adev->asic_type != CHIP_SIENNA_CICHLID || amdgpu_sriov_vf(adev)) if (amdgpu_sriov_vf(adev))
return 0; return 0;
memset(cmd, 0, sizeof(struct psp_gfx_cmd_resp)); memset(cmd, 0, sizeof(struct psp_gfx_cmd_resp));
...@@ -1931,9 +1932,10 @@ static int psp_hw_start(struct psp_context *psp) ...@@ -1931,9 +1932,10 @@ static int psp_hw_start(struct psp_context *psp)
return ret; return ret;
} }
if (amdgpu_atomfirmware_dynamic_boot_config_supported(adev)) {
ret = psp_boot_config_set(adev); ret = psp_boot_config_set(adev);
if (ret) { if (ret)
DRM_WARN("PSP set boot config@\n"); dev_warn(adev->dev, "PSP set boot config failed\n");
} }
ret = psp_tmr_init(psp); ret = psp_tmr_init(psp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment