Skip to content

Commit 65b65ff

Browse files
committed
drm/xe/gsc: Make GSC FW load optional for newer platforms
On newer platforms GSC FW is only required for content protection features, so the core driver features work perfectly fine without it (and we did in fact not enable it to start with on PTL). Therefore, we can selectively enable the GSC only if the FW is found on disk, without failing if it is not found. Note that this means that the FW can now be enabled (i.e., we're looking for it) but not available (i.e., we haven't found it), so checks on FW support should use the latter state to decide whether to go on or not. As part of the rework, the message for FW not found has been cleaned up to be more readable. While at it, drop the comment about xe_uc_fw_init() since the code has been reworked and the statement no longer applies. Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Julia Filipchuk <julia.filipchuk@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Julia Filipchuk <julia.filipchuk@intel.com> Link: https://patch.msgid.link/20260108011340.2562349-6-daniele.ceraolospurio@intel.com
1 parent d758c8d commit 65b65ff

3 files changed

Lines changed: 15 additions & 10 deletions

File tree

drivers/gpu/drm/xe/display/xe_hdcp_gsc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static bool intel_hdcp_gsc_check_status(struct drm_device *drm)
3939
struct xe_gt *gt = tile->media_gt;
4040
struct xe_gsc *gsc = &gt->uc.gsc;
4141

42-
if (!gsc || !xe_uc_fw_is_enabled(&gsc->fw)) {
42+
if (!gsc || !xe_uc_fw_is_available(&gsc->fw)) {
4343
drm_dbg_kms(&xe->drm,
4444
"GSC Components not ready for HDCP2.x\n");
4545
return false;

drivers/gpu/drm/xe/xe_gsc.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -414,15 +414,16 @@ int xe_gsc_init(struct xe_gsc *gsc)
414414
}
415415

416416
/*
417-
* Some platforms can have GuC but not GSC. That would cause
418-
* xe_uc_fw_init(gsc) to return a "not supported" failure code and abort
419-
* all firmware loading. So check for GSC being enabled before
420-
* propagating the failure back up. That way the higher level will keep
421-
* going and load GuC as appropriate.
417+
* Starting from BMG the GSC is no longer needed for MC6 entry, so the
418+
* only missing features if the FW is lacking would be the content
419+
* protection ones. This is acceptable, so we allow the driver load to
420+
* continue if the GSC FW is missing.
422421
*/
423422
ret = xe_uc_fw_init(&gsc->fw);
424423
if (!xe_uc_fw_is_enabled(&gsc->fw))
425424
return 0;
425+
else if (gt_to_xe(gt)->info.platform >= XE_BATTLEMAGE && !xe_uc_fw_is_available(&gsc->fw))
426+
return 0;
426427
else if (ret)
427428
goto out;
428429

@@ -614,7 +615,7 @@ void xe_gsc_print_info(struct xe_gsc *gsc, struct drm_printer *p)
614615

615616
drm_printf(p, "\tfound security version %u\n", gsc->security_version);
616617

617-
if (!xe_uc_fw_is_enabled(&gsc->fw))
618+
if (!xe_uc_fw_is_available(&gsc->fw))
618619
return;
619620

620621
CLASS(xe_force_wake, fw_ref)(gt_to_fw(gt), XE_FW_GSC);

drivers/gpu/drm/xe/xe_uc_fw.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ static int uc_fw_request(struct xe_uc_fw *uc_fw, const struct firmware **firmwar
739739
return 0;
740740
}
741741

742-
err = request_firmware(&fw, uc_fw->path, dev);
742+
err = firmware_request_nowarn(&fw, uc_fw->path, dev);
743743
if (err)
744744
goto fail;
745745

@@ -768,8 +768,12 @@ static int uc_fw_request(struct xe_uc_fw *uc_fw, const struct firmware **firmwar
768768
XE_UC_FIRMWARE_MISSING :
769769
XE_UC_FIRMWARE_ERROR);
770770

771-
xe_gt_notice(gt, "%s firmware %s: fetch failed with error %pe\n",
772-
xe_uc_fw_type_repr(uc_fw->type), uc_fw->path, ERR_PTR(err));
771+
if (err == -ENOENT)
772+
xe_gt_info(gt, "%s firmware %s not found\n",
773+
xe_uc_fw_type_repr(uc_fw->type), uc_fw->path);
774+
else
775+
xe_gt_notice(gt, "%s firmware %s: fetch failed with error %pe\n",
776+
xe_uc_fw_type_repr(uc_fw->type), uc_fw->path, ERR_PTR(err));
773777
xe_gt_info(gt, "%s firmware(s) can be downloaded from %s\n",
774778
xe_uc_fw_type_repr(uc_fw->type), XE_UC_FIRMWARE_URL);
775779

0 commit comments

Comments
 (0)