Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Laguna <lukasz.laguna@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: michal.wajdeczko@intel.com, lukasz.laguna@intel.com
Subject: [PATCH 1/3] drm/xe/uc: Add helpers to set firmware version
Date: Tue, 25 Feb 2025 14:23:35 +0100	[thread overview]
Message-ID: <20250225132337.6508-2-lukasz.laguna@intel.com> (raw)
In-Reply-To: <20250225132337.6508-1-lukasz.laguna@intel.com>

Introduce a helper functions to set the found and compatibility firmware
version, allowing reuse in different parts of the driver.

Signed-off-by: Lukasz Laguna <lukasz.laguna@intel.com>
---
 drivers/gpu/drm/xe/xe_uc_fw.h | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_uc_fw.h b/drivers/gpu/drm/xe/xe_uc_fw.h
index 6195e353f269..feffa06fb968 100644
--- a/drivers/gpu/drm/xe/xe_uc_fw.h
+++ b/drivers/gpu/drm/xe/xe_uc_fw.h
@@ -188,6 +188,34 @@ static inline u32 xe_uc_fw_get_upload_size(struct xe_uc_fw *uc_fw)
 	return __xe_uc_fw_get_upload_size(uc_fw);
 }
 
+/**
+ * xe_uc_fw_set_found_ver - Set FW found version.
+ * @uc_fw: uC firmware
+ * @type: firmware version type
+ * @ver: pointer storing version to be set
+ *
+ * Set uC FW found version of given type.
+ */
+static inline void xe_uc_fw_set_found_ver(struct xe_uc_fw *uc_fw,
+					  enum xe_uc_fw_version_types type,
+					  const struct xe_uc_fw_version *ver)
+{
+	uc_fw->versions.found[type] = *ver;
+}
+
+/**
+ * xe_uc_fw_set_compatibility_ver - Set FW compatibility version.
+ * @uc_fw: uC firmware
+ * @ver: pointer storing version to be set
+ *
+ * Set uC FW found compatibility version.
+ */
+static inline void xe_uc_fw_set_compatibility_ver(struct xe_uc_fw *uc_fw,
+						  const struct xe_uc_fw_version *ver)
+{
+	xe_uc_fw_set_found_ver(uc_fw, XE_UC_FW_VER_COMPATIBILITY, ver);
+}
+
 #define XE_UC_FIRMWARE_URL "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"
 
 #endif
-- 
2.40.0


  reply	other threads:[~2025-02-25 13:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-25 13:23 [PATCH 0/3] VF: Set submission version in xe_uc_fw struct Lukasz Laguna
2025-02-25 13:23 ` Lukasz Laguna [this message]
2025-02-25 13:23 ` [PATCH 2/3] drm/xe/vf: Add helper to get negotiated GuC ABI version Lukasz Laguna
2025-02-25 13:23 ` [PATCH 3/3] drm/xe/vf: Set submission version in xe_uc_fw struct Lukasz Laguna
2025-02-25 22:30   ` Daniele Ceraolo Spurio
2025-02-27 11:22     ` Laguna, Lukasz
2025-02-27 19:43       ` Daniele Ceraolo Spurio
2025-02-28  9:25         ` Laguna, Lukasz
2025-02-28 16:29           ` Daniele Ceraolo Spurio
2025-02-28 20:07             ` Daniele Ceraolo Spurio
2025-02-25 14:35 ` ✓ CI.Patch_applied: success for VF: " Patchwork
2025-02-25 14:35 ` ✓ CI.checkpatch: " Patchwork
2025-02-25 14:36 ` ✓ CI.KUnit: " Patchwork
2025-02-25 14:53 ` ✓ CI.Build: " Patchwork
2025-02-25 14:57 ` ✓ CI.Hooks: " Patchwork
2025-02-25 15:00 ` ✓ CI.checksparse: " Patchwork
2025-02-25 15:20 ` ✓ Xe.CI.BAT: " Patchwork
2025-02-25 21:18 ` ✗ Xe.CI.Full: failure " Patchwork

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=20250225132337.6508-2-lukasz.laguna@intel.com \
    --to=lukasz.laguna@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=michal.wajdeczko@intel.com \
    /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