diff mbox series

[v3,2/2] UBUNTU: SAUCE: (no-up) drm/i915: set enable_guc=2 for EHL, ICL, ADL-S platforms.

Message ID 20220816142056.1222020-3-philip.cox@canonical.com
State New
Headers show
Series i915: Enable HuC authentication for EHL, ICL, and ADL-S | expand

Commit Message

Philip Cox Aug. 16, 2022, 2:20 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1981971

The Elkhart Lake, Ice Lake, and Alder Lake S platforms need
i915.enable_guc=2/ENABLE_GUC_LOAD_HUC to be set for them to work
with the current version of the i915 driver we have in the
linux-intel-iotg kernel.

v2: Removed magic number.
v3: changes to the cover letter and patch set's commit messages

Signed-off-by: Philip Cox <philip.cox@canonical.com>
---
 drivers/gpu/drm/i915/gt/uc/intel_uc.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
index 86c318516e14..0c46a7c4d30f 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
@@ -22,7 +22,18 @@  static void uc_expand_default_options(struct intel_uc *uc)
 	if (i915->params.enable_guc != -1)
 		return;
 
-	/* Don't enable GuC/HuC on pre-Gen12 */
+	/* The parameter i915.enable_guc=2 is needed for EHL, ICL and ADL-S
+	    to enable HuC authentication but not explicitly required for ADL-P
+	    since HuC is default enabled.  This check needs to be before the other
+	    conditions are checked because the gen11 gfx platforms would return
+	    out of the function and not get set.
+	*/
+	if (IS_JSL_EHL(i915) || IS_ICELAKE(i915) || IS_ALDERLAKE_S(i915)) {
+		i915->params.enable_guc = ENABLE_GUC_LOAD_HUC;
+		return;
+	}
+
+	/* Don't enable GuC/HuC on non-ICL and non-EHL pre-Gen12 platforms */
 	if (GRAPHICS_VER(i915) < 12) {
 		i915->params.enable_guc = 0;
 		return;
@@ -35,7 +46,7 @@  static void uc_expand_default_options(struct intel_uc *uc)
 	}
 
 	/* Intermediate platforms are HuC authentication only */
-	if (IS_DG1(i915) || IS_ALDERLAKE_S(i915)) {
+	if (IS_DG1(i915)) {
 		i915->params.enable_guc = ENABLE_GUC_LOAD_HUC;
 		return;
 	}