From: Xiangliang Yu Date: Thu, 4 May 2017 03:05:13 +0000 (+0800) Subject: drm/amdgpu/psp: Do not load asd for SRIOV X-Git-Tag: Ubuntu-5.2.0-15.16~6468^2~20^2~297 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=943cafb825736fdbc7e9c7a8eb1cf92a0772e7e7;p=mirror_ubuntu-eoan-kernel.git drm/amdgpu/psp: Do not load asd for SRIOV If psp version doesn't match asd version, asd loading will be failed. Add workaround to bypass it for sriov. Signed-off-by: Daniel Wang Signed-off-by: Xiangliang Yu Reviewed-by: Monk Liu Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index ac5e92e5d59d..5041073cc9dc 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -230,6 +230,13 @@ static int psp_asd_load(struct psp_context *psp) int ret; struct psp_gfx_cmd_resp *cmd; + /* If PSP version doesn't match ASD version, asd loading will be failed. + * add workaround to bypass it for sriov now. + * TODO: add version check to make it common + */ + if (amdgpu_sriov_vf(psp->adev)) + return 0; + cmd = kzalloc(sizeof(struct psp_gfx_cmd_resp), GFP_KERNEL); if (!cmd) return -ENOMEM;