Skip to content

Commit 6badfc4

Browse files
author
Lucas De Marchi
committed
drm/xe: Avoid cryptic message when there's no GuC definition
If there's no GuC firmware entry in the table and the user didn't pass an override path, the error message is very cryptic: xe will simply try to continue and then fail when submitting the default context: xe 0000:00:02.0: [drm:xe_pci_probe [xe]] XE_LUNARLAKE 64b0:0001 dgfx:0 gfx:Xe2_LPG (20.04) media:Xe2_LPM (20.00) display:no dma_m_s:46 tc:1 gscfi:0 ... xe: probe of 0000:00:02.0 failed with error -22 Add an explicit error message and bail out: xe 0000:00:02.0: [drm:xe_pci_probe [xe]] XE_LUNARLAKE 64b0:0001 dgfx:0 gfx:Xe2_LPG (20.04) media:Xe2_LPM (20.00) display:no dma_m_s:46 tc:1 gscfi:0 xe 0000:00:02.0: [drm] *ERROR* No GuC firmware defined for platform xe 0000:00:02.0: [drm] *ERROR* GuC init failed with -2 ... xe: probe of 0000:00:02.0 failed with error -2 Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Francois Dugast <francois.dugast@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240201224724.551130-3-lucas.demarchi@intel.com
1 parent 4588341 commit 6badfc4

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

drivers/gpu/drm/xe/xe_uc_fw.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,8 +663,13 @@ static int uc_fw_request(struct xe_uc_fw *uc_fw, const struct firmware **firmwar
663663
XE_UC_FIRMWARE_SELECTED :
664664
XE_UC_FIRMWARE_NOT_SUPPORTED);
665665

666-
if (!xe_uc_fw_is_supported(uc_fw))
666+
if (!xe_uc_fw_is_supported(uc_fw)) {
667+
if (uc_fw->type == XE_UC_FW_TYPE_GUC) {
668+
drm_err(&xe->drm, "No GuC firmware defined for platform\n");
669+
return -ENOENT;
670+
}
667671
return 0;
672+
}
668673

669674
/* an empty path means the firmware is disabled */
670675
if (!xe_device_uc_enabled(xe) || !(*uc_fw->path)) {

0 commit comments

Comments
 (0)