Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: <intel-xe@lists.freedesktop.org>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
	Thomas Hellstrom <thomas.hellstrom@linux.intel.com>,
	John.C.Harrison@Intel.com,
	Ashutosh Dixit <ashutosh.dixit@intel.com>,
	tejas.upadhyay@intel.com,
	Lucas De Marchi <lucas.demarchi@intel.com>
Subject: [PATCH 1/2] drm/xe: Always allow to override firmware
Date: Thu,  1 Feb 2024 14:47:23 -0800	[thread overview]
Message-ID: <20240201224724.551130-2-lucas.demarchi@intel.com> (raw)
In-Reply-To: <20240201224724.551130-1-lucas.demarchi@intel.com>

The current logic for firmware selection is reminiscent from i915 where
there are 2 backends and several platforms support only 1: execlist or
GuC. The xe driver has only the GuC backend and it simply doesn't work
without it. Allow developers to override the firmware path even if there
isn't a firmware entry in the table yet: this allows developers to more
easily test the very first firmware before adding it there.

The justification above is only true for GuC, however those override
paths should really be viewed as developer aid param. Simply make the
same logic for all firmwares and allow the override path to be used
for all of them.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 drivers/gpu/drm/xe/xe_uc_fw.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_uc_fw.c b/drivers/gpu/drm/xe/xe_uc_fw.c
index 8debea47a5b4..c7541f1a5c0b 100644
--- a/drivers/gpu/drm/xe/xe_uc_fw.c
+++ b/drivers/gpu/drm/xe/xe_uc_fw.c
@@ -660,6 +660,7 @@ static int uc_fw_request(struct xe_uc_fw *uc_fw, const struct firmware **firmwar
 	xe_assert(xe, !uc_fw->path);
 
 	uc_fw_auto_select(xe, uc_fw);
+	uc_fw_override(uc_fw);
 	xe_uc_fw_change_status(uc_fw, uc_fw->path ?
 			       XE_UC_FIRMWARE_SELECTED :
 			       XE_UC_FIRMWARE_NOT_SUPPORTED);
@@ -667,8 +668,6 @@ static int uc_fw_request(struct xe_uc_fw *uc_fw, const struct firmware **firmwar
 	if (!xe_uc_fw_is_supported(uc_fw))
 		return 0;
 
-	uc_fw_override(uc_fw);
-
 	/* an empty path means the firmware is disabled */
 	if (!xe_device_uc_enabled(xe) || !(*uc_fw->path)) {
 		xe_uc_fw_change_status(uc_fw, XE_UC_FIRMWARE_DISABLED);
-- 
2.43.0


  reply	other threads:[~2024-02-01 22:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-01 22:47 [PATCH 0/2] Improve error path handling for firmware loading Lucas De Marchi
2024-02-01 22:47 ` Lucas De Marchi [this message]
2024-02-02 11:50   ` [PATCH 1/2] drm/xe: Always allow to override firmware Francois Dugast
2024-02-01 22:47 ` [PATCH 2/2] drm/xe: Avoid crypt message when there's no GuC definition Lucas De Marchi
2024-02-02 11:52   ` Francois Dugast
2024-02-08  0:17     ` Lucas De Marchi
2024-02-01 23:21 ` ✓ CI.Patch_applied: success for Improve error path handling for firmware loading Patchwork
2024-02-01 23:22 ` ✗ CI.checkpatch: warning " Patchwork
2024-02-01 23:22 ` ✓ CI.KUnit: success " Patchwork
2024-02-01 23:30 ` ✓ CI.Build: " Patchwork
2024-02-01 23:30 ` ✓ CI.Hooks: " Patchwork
2024-02-01 23:31 ` ✓ CI.checksparse: " Patchwork
2024-02-01 23:54 ` ✓ CI.BAT: " 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=20240201224724.551130-2-lucas.demarchi@intel.com \
    --to=lucas.demarchi@intel.com \
    --cc=John.C.Harrison@Intel.com \
    --cc=ashutosh.dixit@intel.com \
    --cc=daniele.ceraolospurio@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=tejas.upadhyay@intel.com \
    --cc=thomas.hellstrom@linux.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