diff mbox series

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

Message ID 20220815113927.1056127-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. 15, 2022, 11:39 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1981971

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

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

Comments

Tim Gardner Aug. 15, 2022, 1:02 p.m. UTC | #1
On 8/15/22 05:39, Philip Cox wrote:
> BugLink: https://bugs.launchpad.net/bugs/1981971
> 
> The Elkhart Lake, Ice Lake, and Alder Lake S platforms need
> i915.enable_guc=2 to be set for them to work with the current
> version of the i915 driver we have in the linux-intel-iotg kernel.
> 
> Signed-off-by: Philip Cox <philip.cox@canonical.com>
> ---
>   drivers/gpu/drm/i915/gt/uc/intel_uc.c | 13 +++++++++++--
>   1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> index 86c318516e14..081f39475597 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> @@ -22,7 +22,16 @@ 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
> +	*/
> +	if (IS_JSL_EHL(i915) || IS_ICELAKE(i915) || IS_ALDERLAKE_S(i915)) {
> +		i915->params.enable_guc = 2;

Whats with the magic number ^ ? Shouldn't this be 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 +44,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;
>   	}
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..081f39475597 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
@@ -22,7 +22,16 @@  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
+	*/
+	if (IS_JSL_EHL(i915) || IS_ICELAKE(i915) || IS_ALDERLAKE_S(i915)) {
+		i915->params.enable_guc = 2;
+		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 +44,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;
 	}