Skip to contentSkip to conversation

drm/amdgpu: Use DRM_INFO if VFCT table not valid

PATCH Superseded Feifei Xu 2 participants 4 messages Mar 15, 2021

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Feifei Xu

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Use DRM_INFO if VFCT table not valid

Some ASICs has no GOP driver to copy vbios image to VFCT table. In this case, it will go to next check.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c +5 -5
index f454a6bd0ed6..dde27b26a735 100644
@@ -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");
+		DRM_INFO("Unable to allocate bios,skipping\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");
+		DRM_INFO("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");
+			DRM_INFO("ACPI VFCT image header truncated,skipping\n");
 			return false;
 		}
 
 		offset += vhdr->ImageLength;
 		if (offset > tbl_size) {
-			DRM_ERROR("ACPI VFCT image truncated\n");
+			DRM_INFO("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");
+	DRM_INFO("ACPI VFCT table present but broken (too short #2),skipping\n");
 	return false;
 }
 #else
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#1 lore raw

[AMD Official Use Only - Internal Distribution Only]

Sorry, please ignore this one. I will draft a V2 to remove this one:
if (!adev->bios) {
-DRM_ERROR("Unable to allocate bios\n"); +DRM_INFO("Unable to allocate bios,skipping\n");
return false;

Thanks,
Feifei

-----Original Message-----
From: Feifei Xu <[email protected]>
Sent: Monday, March 15, 2021 2:46 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Lazar, Lijo <[email protected]>; Zhang, Hawking <[email protected]>; Xu, Feifei <[email protected]>
Subject: [PATCH] drm/amdgpu: Use DRM_INFO if VFCT table not valid

Some ASICs has no GOP driver to copy vbios image to VFCT table. In this case, it will go to next check.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c +5 -5
index f454a6bd0ed6..dde27b26a735 100644
@@ -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");
+DRM_INFO("Unable to allocate bios,skipping\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");
+DRM_INFO("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");
+DRM_INFO("ACPI VFCT image header truncated,skipping\n");
 return false;
 }
 
 offset += vhdr->ImageLength;
 if (offset > tbl_size) {
-DRM_ERROR("ACPI VFCT image truncated\n");
+DRM_INFO("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");
+DRM_INFO("ACPI VFCT table present but broken (too short #2),skipping\n");
 return false;
 }
 #else

--
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#2 lore raw

[AMD Public Use]

Might be better switch to dev_err so in mGPU setup there is bdf along with the warning/

Regards,
Hawking

-----Original Message-----
From: Xu, Feifei <[email protected]>
Sent: Monday, March 15, 2021 15:11
To: Xu, Feifei <[email protected]>; [email protected]
Cc: Deucher, Alexander <[email protected]>; Lazar, Lijo <[email protected]>; Zhang, Hawking <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: Use DRM_INFO if VFCT table not valid

[AMD Official Use Only - Internal Distribution Only]

Sorry, please ignore this one. I will draft a V2 to remove this one:
if (!adev->bios) {
-DRM_ERROR("Unable to allocate bios\n"); +DRM_INFO("Unable to allocate bios,skipping\n");
return false;

Thanks,
Feifei

-----Original Message-----
From: Feifei Xu <[email protected]>
Sent: Monday, March 15, 2021 2:46 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Lazar, Lijo <[email protected]>; Zhang, Hawking <[email protected]>; Xu, Feifei <[email protected]>
Subject: [PATCH] drm/amdgpu: Use DRM_INFO if VFCT table not valid

Some ASICs has no GOP driver to copy vbios image to VFCT table. In this case, it will go to next check.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c +7 -4
index f454a6bd0ed6..dde27b26a735 100644
@@ -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");
+DRM_INFO("Unable to allocate bios,skipping\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");
+DRM_INFO("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");
+DRM_INFO("ACPI VFCT image header truncated,skipping\n");
 return false;
 }
 
 offset += vhdr->ImageLength;
 if (offset > tbl_size) {
-DRM_ERROR("ACPI VFCT image truncated\n");
+DRM_INFO("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");
+DRM_INFO("ACPI VFCT table present but broken (too short 
+#2),skipping\n");
 return false;
 }
 #else
--

2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

author
#3 lore raw

OK. Will add in V2

Thanks,
Feifei

-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Monday, March 15, 2021 3:28 PM
To: Xu, Feifei <[email protected]>; [email protected]
Cc: Deucher, Alexander <[email protected]>; Lazar, Lijo <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: Use DRM_INFO if VFCT table not valid

[AMD Public Use]

Might be better switch to dev_err so in mGPU setup there is bdf along with the warning/

Regards,
Hawking

-----Original Message-----
From: Xu, Feifei <[email protected]>
Sent: Monday, March 15, 2021 15:11
To: Xu, Feifei <[email protected]>; [email protected]
Cc: Deucher, Alexander <[email protected]>; Lazar, Lijo <[email protected]>; Zhang, Hawking <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: Use DRM_INFO if VFCT table not valid

[AMD Official Use Only - Internal Distribution Only]

Sorry, please ignore this one. I will draft a V2 to remove this one:
if (!adev->bios) {
-DRM_ERROR("Unable to allocate bios\n"); +DRM_INFO("Unable to allocate bios,skipping\n");
return false;

Thanks,
Feifei

-----Original Message-----
From: Feifei Xu <[email protected]>
Sent: Monday, March 15, 2021 2:46 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Lazar, Lijo <[email protected]>; Zhang, Hawking <[email protected]>; Xu, Feifei <[email protected]>
Subject: [PATCH] drm/amdgpu: Use DRM_INFO if VFCT table not valid

Some ASICs has no GOP driver to copy vbios image to VFCT table. In this case, it will go to next check.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c +7 -4
index f454a6bd0ed6..dde27b26a735 100644
@@ -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");
+DRM_INFO("Unable to allocate bios,skipping\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");
+DRM_INFO("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");
+DRM_INFO("ACPI VFCT image header truncated,skipping\n");
 return false;
 }
 
 offset += vhdr->ImageLength;
 if (offset > tbl_size) {
-DRM_ERROR("ACPI VFCT image truncated\n");
+DRM_INFO("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");
+DRM_INFO("ACPI VFCT table present but broken (too short 
+#2),skipping\n");
 return false;
 }
 #else
--

2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx