]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/amdgpu/psp: Do not load asd for SRIOV
authorXiangliang Yu <Xiangliang.Yu@amd.com>
Thu, 4 May 2017 03:05:13 +0000 (11:05 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 May 2017 21:40:21 +0000 (17:40 -0400)
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 <Daniel.Wang2@amd.com>
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Reviewed-by: Monk Liu <Monk.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

index ac5e92e5d59d3c69c46b36992558d683ac56f7c5..5041073cc9dca4e8a45e8404a8aa198737227cef 100644 (file)
@@ -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;