[PATCH 1/1] drm/amdgpu: drop the UCODE_MAX_PSP_PACKAGING checking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This checking is not suitable any more after introducing
psp aux firmware binary.

Signed-off-by: Le Ma <le.ma@xxxxxxx>
Suggested-by: Lijo Lazar <lijo.lazar@xxxxxxx>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c   | 11 -----------
 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h |  2 --
 2 files changed, 13 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 7452b2dd775b..7b8469da3e2e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -3484,12 +3484,6 @@ int psp_init_sos_microcode(struct psp_context *psp, const char *chip_name)
 
 		fw_bin_count = le32_to_cpu(sos_hdr_v2_0->psp_fw_bin_count);
 
-		if (fw_bin_count >= UCODE_MAX_PSP_PACKAGING) {
-			dev_err(adev->dev, "packed SOS count exceeds maximum limit\n");
-			err = -EINVAL;
-			goto out;
-		}
-
 		if (sos_hdr_v2_0->header.header_version_minor == 1) {
 			sos_hdr_v2_1 = (const struct psp_firmware_header_v2_1 *)adev->psp.sos_fw->data;
 
@@ -3653,11 +3647,6 @@ static int parse_ta_v2_microcode(struct psp_context *psp)
 	if (le16_to_cpu(ta_hdr->header.header_version_major) != 2)
 		return -EINVAL;
 
-	if (le32_to_cpu(ta_hdr->ta_fw_bin_count) >= UCODE_MAX_PSP_PACKAGING) {
-		dev_err(adev->dev, "packed TA count exceeds maximum limit\n");
-		return -EINVAL;
-	}
-
 	for (ta_index = 0; ta_index < le32_to_cpu(ta_hdr->ta_fw_bin_count); ta_index++) {
 		err = parse_ta_bin_descriptor(psp,
 					      &ta_hdr->ta_fw_bin[ta_index],
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h
index 4e23419b92d4..a06cc0a155fe 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h
@@ -456,8 +456,6 @@ union amdgpu_firmware_header {
 	uint8_t raw[0x100];
 };
 
-#define UCODE_MAX_PSP_PACKAGING (((sizeof(union amdgpu_firmware_header) - sizeof(struct common_firmware_header) - 4) / sizeof(struct psp_fw_bin_desc)) * 2)
-
 /*
  * fw loading support
  */
-- 
2.43.2




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux