[PATCH 2/6] drm/imagination: Fix size of FW header members

Alexandru Dadu alexandru.dadu at imgtec.com
Wed Nov 25 03:48:30 PST 2026


From: Matt Coster <matt.coster at imgtec.com>

Don't use enum types directly in the FW header structures, since these
are not guaranteed to be the required 32-bits.

Signed-off-by: Matt Coster <matt.coster at imgtec.com>
Signed-off-by: Alexandru Dadu <alexandru.dadu at imgtec.com>
---
 drivers/gpu/drm/imagination/pvr_fw_info.h | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/imagination/pvr_fw_info.h b/drivers/gpu/drm/imagination/pvr_fw_info.h
index c3639440610e..3ad79c59d5b1 100644
--- a/drivers/gpu/drm/imagination/pvr_fw_info.h
+++ b/drivers/gpu/drm/imagination/pvr_fw_info.h
@@ -104,10 +104,18 @@ struct pvr_fw_info_header {
  *                              section of the firmware image
  */
 struct pvr_fw_layout_entry {
-	/** @id: Section ID. */
-	enum pvr_fw_section_id id;
-	/** @type: Section type. */
-	enum pvr_fw_section_type type;
+	/**
+	 * @id: Section ID.
+	 *
+	 * Values are given by enum pvr_fw_section_id.
+	 */
+	u32 id;
+	/**
+	 * @type: Section type.
+	 *
+	 * Values are given by enum pvr_fw_section_type.
+	 */
+	u32 type;
 	/** @base_addr: Base address of section in FW address space. */
 	u32 base_addr;
 	/** @max_size: Maximum size of section, in bytes. */

-- 
2.43.0




More information about the linux-riscv mailing list