drm/amdgpu/smu: skip SMC ucode loading on SR-IOV capable boards (v2)
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 1 Feb 2016 16:43:28 +0000 (11:43 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Feb 2016 19:17:13 +0000 (14:17 -0500)
VBIOS does this for us in asic_init.

v2: update iceland as well

Reviewed-by: Monk Liu <monk.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/fiji_smc.c
drivers/gpu/drm/amd/amdgpu/iceland_smc.c
drivers/gpu/drm/amd/amdgpu/tonga_smc.c

index e35340afd3db1afec984e4bfb4ca7e4ba04d666c..b336c918d6a7984fcb8bb6060bb2339ebb78e636 100644 (file)
@@ -272,6 +272,12 @@ static int fiji_smu_upload_firmware_image(struct amdgpu_device *adev)
        if (!adev->pm.fw)
                return -EINVAL;
 
+       /* Skip SMC ucode loading on SR-IOV capable boards.
+        * vbios does this for us in asic_init in that case.
+        */
+       if (adev->virtualization.supports_sr_iov)
+               return 0;
+
        hdr = (const struct smc_firmware_header_v1_0 *)adev->pm.fw->data;
        amdgpu_ucode_print_smc_hdr(&hdr->header);
 
index 090486c182497ba8de2aaa7840242be9cf4750aa..52ee08193295f434c46fb7f89e082b20df46abfd 100644 (file)
@@ -279,6 +279,12 @@ static int iceland_smu_upload_firmware_image(struct amdgpu_device *adev)
        if (!adev->pm.fw)
                return -EINVAL;
 
+       /* Skip SMC ucode loading on SR-IOV capable boards.
+        * vbios does this for us in asic_init in that case.
+        */
+       if (adev->virtualization.supports_sr_iov)
+               return 0;
+
        hdr = (const struct smc_firmware_header_v1_0 *)adev->pm.fw->data;
        amdgpu_ucode_print_smc_hdr(&hdr->header);
 
index 361c49a8232305194af12c1aaa9ec00971f92b30..083893dd68c063db6059fee335a8667247132b14 100644 (file)
@@ -272,6 +272,12 @@ static int tonga_smu_upload_firmware_image(struct amdgpu_device *adev)
        if (!adev->pm.fw)
                return -EINVAL;
 
+       /* Skip SMC ucode loading on SR-IOV capable boards.
+        * vbios does this for us in asic_init in that case.
+        */
+       if (adev->virtualization.supports_sr_iov)
+               return 0;
+
        hdr = (const struct smc_firmware_header_v1_0 *)adev->pm.fw->data;
        amdgpu_ucode_print_smc_hdr(&hdr->header);