]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/gsc: Make GSC FW load optional for newer platforms
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Thu, 8 Jan 2026 01:13:42 +0000 (17:13 -0800)
committerDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Mon, 12 Jan 2026 18:06:28 +0000 (10:06 -0800)
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
drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
drivers/gpu/drm/xe/xe_gsc.c
drivers/gpu/drm/xe/xe_uc_fw.c

index 07acae121aa746f6ecd81fa16579c125ec485c7b..ed1f65f5ef4d7066494cb79138b550bfd01e50ae 100644 (file)
@@ -39,7 +39,7 @@ static bool intel_hdcp_gsc_check_status(struct drm_device *drm)
        struct xe_gt *gt = tile->media_gt;
        struct xe_gsc *gsc = &gt->uc.gsc;
 
-       if (!gsc || !xe_uc_fw_is_enabled(&gsc->fw)) {
+       if (!gsc || !xe_uc_fw_is_available(&gsc->fw)) {
                drm_dbg_kms(&xe->drm,
                            "GSC Components not ready for HDCP2.x\n");
                return false;
index a3157b0fe791d033d0e40a9c61f53329249d2c73..e5c234f3d795ee14e0b50522987f3404cb515379 100644 (file)
@@ -414,15 +414,16 @@ int xe_gsc_init(struct xe_gsc *gsc)
        }
 
        /*
-        * Some platforms can have GuC but not GSC. That would cause
-        * xe_uc_fw_init(gsc) to return a "not supported" failure code and abort
-        * all firmware loading. So check for GSC being enabled before
-        * propagating the failure back up. That way the higher level will keep
-        * going and load GuC as appropriate.
+        * Starting from BMG the GSC is no longer needed for MC6 entry, so the
+        * only missing features if the FW is lacking would be the content
+        * protection ones. This is acceptable, so we allow the driver load to
+        * continue if the GSC FW is missing.
         */
        ret = xe_uc_fw_init(&gsc->fw);
        if (!xe_uc_fw_is_enabled(&gsc->fw))
                return 0;
+       else if (gt_to_xe(gt)->info.platform >= XE_BATTLEMAGE && !xe_uc_fw_is_available(&gsc->fw))
+               return 0;
        else if (ret)
                goto out;
 
@@ -614,7 +615,7 @@ void xe_gsc_print_info(struct xe_gsc *gsc, struct drm_printer *p)
 
        drm_printf(p, "\tfound security version %u\n", gsc->security_version);
 
-       if (!xe_uc_fw_is_enabled(&gsc->fw))
+       if (!xe_uc_fw_is_available(&gsc->fw))
                return;
 
        CLASS(xe_force_wake, fw_ref)(gt_to_fw(gt), XE_FW_GSC);
index 85544c2142742d4af5be54b14da0af54ca9450e1..5d10a6c346042c6dc2a4b99d3b74514fe3a730a4 100644 (file)
@@ -739,7 +739,7 @@ static int uc_fw_request(struct xe_uc_fw *uc_fw, const struct firmware **firmwar
                return 0;
        }
 
-       err = request_firmware(&fw, uc_fw->path, dev);
+       err = firmware_request_nowarn(&fw, uc_fw->path, dev);
        if (err)
                goto fail;
 
@@ -768,8 +768,12 @@ fail:
                               XE_UC_FIRMWARE_MISSING :
                               XE_UC_FIRMWARE_ERROR);
 
-       xe_gt_notice(gt, "%s firmware %s: fetch failed with error %pe\n",
-                    xe_uc_fw_type_repr(uc_fw->type), uc_fw->path, ERR_PTR(err));
+       if (err == -ENOENT)
+               xe_gt_info(gt, "%s firmware %s not found\n",
+                          xe_uc_fw_type_repr(uc_fw->type), uc_fw->path);
+       else
+               xe_gt_notice(gt, "%s firmware %s: fetch failed with error %pe\n",
+                            xe_uc_fw_type_repr(uc_fw->type), uc_fw->path, ERR_PTR(err));
        xe_gt_info(gt, "%s firmware(s) can be downloaded from %s\n",
                   xe_uc_fw_type_repr(uc_fw->type), XE_UC_FIRMWARE_URL);