mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexandru Dadu <alexandru.dadu@imgtec.com>
To: Alessio Belle <alessio.belle@imgtec.com>,
	Luigi Santivetti <luigi.santivetti@imgtec.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Paul Walmsley <pjw@kernel.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	"Alexandre Ghiti" <alex@ghiti.fr>, Kees Cook <kees@kernel.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: <imagination@lists.freedesktop.org>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
	<linux-riscv@lists.infradead.org>,
	<linux-hardening@vger.kernel.org>,
	Alexandru Dadu <alexandru.dadu@imgtec.com>,
	Matt Coster <opensource@mtcoster.net>
Subject: [PATCH 2/6] drm/imagination: Fix size of FW header members
Date: Wed, 25 Nov 2026 13:48:30 +0200	[thread overview]
Message-ID: <20261125-b4-commonize-fw-segment-loading-v1-2-69657fa52ac3@imgtec.com> (raw)
In-Reply-To: <20261125-b4-commonize-fw-segment-loading-v1-0-69657fa52ac3@imgtec.com>

From: Matt Coster <matt.coster@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@imgtec.com>
Signed-off-by: Alexandru Dadu <alexandru.dadu@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


  parent reply	other threads:[~2026-11-25 11:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 11:48 [PATCH 0/6] drm/imagination: Commonize firmware segment loading Alexandru Dadu
2026-11-25 11:48 ` [PATCH 1/6] drm/imagination: Remove get_fw_obj_gpu_addr() Alexandru Dadu
2026-11-25 11:48 ` Alexandru Dadu [this message]
2026-11-25 11:48 ` [PATCH 3/6] drm/imagination: Save metadata from firmware Alexandru Dadu
2026-11-25 11:48 ` [PATCH 4/6] drm/imagination: Release firmware after init Alexandru Dadu
2026-11-25 11:48 ` [PATCH 5/6] drm/imagination: Generalize FW segment loading Alexandru Dadu
2026-11-25 11:48 ` [PATCH 6/6] drm/imagination: Avoid loop in configure_seg_mmu() Alexandru Dadu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261125-b4-commonize-fw-segment-loading-v1-2-69657fa52ac3@imgtec.com \
    --to=alexandru.dadu@imgtec.com \
    --cc=airlied@gmail.com \
    --cc=alessio.belle@imgtec.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavoars@kernel.org \
    --cc=imagination@lists.freedesktop.org \
    --cc=kees@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=luigi.santivetti@imgtec.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=opensource@mtcoster.net \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®