drm/amdgpu/sriov: fix Tonga load driver failed [Linux 5.3]

This Linux kernel change "drm/amdgpu/sriov: fix Tonga load driver failed" is included in the Linux 5.3 release. This change is authored by Jack Zhang <Jack.Zhang1 [at] amd.com> on Thu Jun 20 13:44:47 2019 +0800. The commit for this change in Linux stable tree is a95ecb6 (patch).

drm/amdgpu/sriov: fix Tonga load driver failed

Tonga sriov need to use smu to load firmware.
Remove sriov flag because the default return value is zero.

Signed-off-by: Jack Zhang <Jack.Zhang1@amd.com>
Reviewed-by: Trigger Huang <Trigger.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index 1705081..e0df2bc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -2755,8 +2755,6 @@ int amdgpu_pm_load_smu_firmware(struct amdgpu_device *adev, uint32_t *smu_versio
    int r;

-   if (amdgpu_sriov_vf(adev))
-       return 0;

    if (adev->powerplay.pp_funcs && adev->powerplay.pp_funcs->load_firmware) {
        r = adev->powerplay.pp_funcs->load_firmware(adev->powerplay.pp_handle);

Leave a Reply

Your email address will not be published. Required fields are marked *