drm/amdgpu: Use dev_info if VFCT table not valid
authorFeifei Xu <Feifei.Xu@amd.com>
Fri, 12 Mar 2021 08:27:47 +0000 (16:27 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 Mar 2021 03:31:24 +0000 (23:31 -0400)
Some ASICs do not have GOP driver to copy vbios image into
VFCT table. And it will go to next check.

Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c

index f454a6bd0ed6e7daf3a49adb7863fb497beebd29..a5e98d0142d70e276ae4a49d3f62e49b5323fd3c 100644 (file)
@@ -320,7 +320,7 @@ static bool amdgpu_atrm_get_bios(struct amdgpu_device *adev)
 
        adev->bios = kmalloc(size, GFP_KERNEL);
        if (!adev->bios) {
-               DRM_ERROR("Unable to allocate bios\n");
+               dev_err(adev->dev, "Unable to allocate bios\n");
                return false;
        }
 
@@ -368,7 +368,7 @@ static bool amdgpu_acpi_vfct_bios(struct amdgpu_device *adev)
                return false;
        tbl_size = hdr->length;
        if (tbl_size < sizeof(UEFI_ACPI_VFCT)) {
-               DRM_ERROR("ACPI VFCT table present but broken (too short #1)\n");
+               dev_info(adev->dev, "ACPI VFCT table present but broken (too short #1),skipping\n");
                return false;
        }
 
@@ -381,13 +381,13 @@ static bool amdgpu_acpi_vfct_bios(struct amdgpu_device *adev)
 
                offset += sizeof(VFCT_IMAGE_HEADER);
                if (offset > tbl_size) {
-                       DRM_ERROR("ACPI VFCT image header truncated\n");
+                       dev_info(adev->dev, "ACPI VFCT image header truncated,skipping\n");
                        return false;
                }
 
                offset += vhdr->ImageLength;
                if (offset > tbl_size) {
-                       DRM_ERROR("ACPI VFCT image truncated\n");
+                       dev_info(adev->dev, "ACPI VFCT image truncated,skipping\n");
                        return false;
                }
 
@@ -410,7 +410,7 @@ static bool amdgpu_acpi_vfct_bios(struct amdgpu_device *adev)
                }
        }
 
-       DRM_ERROR("ACPI VFCT table present but broken (too short #2)\n");
+       dev_info(adev->dev, "ACPI VFCT table present but broken (too short #2),skipping\n");
        return false;
 }
 #else
@@ -457,7 +457,7 @@ bool amdgpu_get_bios(struct amdgpu_device *adev)
                goto success;
        }
 
-       DRM_ERROR("Unable to locate a BIOS ROM\n");
+       dev_err(adev->dev, "Unable to locate a BIOS ROM\n");
        return false;
 
 success: