diff mbox series

[2/2] drm/i915/guc: Turn on GuC/HuC auto mode

Message ID 20190703113640.31100-2-michal.wajdeczko@intel.com (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/i915/guc: Upgrade to GuC 33.0.0 | expand

Commit Message

Michal Wajdeczko July 3, 2019, 11:36 a.m. UTC
GuC firmware is now mature, so let it run by default.
Note that today GuC is only used for HuC authentication.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_params.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chris Wilson July 3, 2019, 11:40 a.m. UTC | #1
Quoting Michal Wajdeczko (2019-07-03 12:36:40)
> GuC firmware is now mature, so let it run by default.
> Note that today GuC is only used for HuC authentication.

https://bugs.freedesktop.org/show_bug.cgi?id=110617 ?
-Chris
Michal Wajdeczko July 3, 2019, 1:02 p.m. UTC | #2
On Wed, 03 Jul 2019 13:40:06 +0200, Chris Wilson  
<chris@chris-wilson.co.uk> wrote:

> Quoting Michal Wajdeczko (2019-07-03 12:36:40)
>> GuC firmware is now mature, so let it run by default.
>> Note that today GuC is only used for HuC authentication.
>
> https://bugs.freedesktop.org/show_bug.cgi?id=110617 ?

Above bug was found on suspicious kernel with old GuC 9.39:

[    2.381803] [drm] HuC: Loaded firmware i915/kbl_huc_ver02_00_1810.bin  
(version 2.0)
[    2.386316] [drm] GuC: Loaded firmware i915/kbl_guc_ver9_39.bin  
(version 9.39)
[    2.438318] [drm:intel_huc_auth] *ERROR* HuC: Firmware not verified  
0x6000
[    2.445235] [drm:intel_huc_auth] *ERROR* HuC: Authentication failed -110
[    2.451975] i915 0000:00:02.0: GuC initialization failed -110

while results from try-bot [1] with 33.0.0 on KBL are looking fine:

[    3.854084] [drm] HuC: Loaded firmware i915/kbl_huc_ver02_00_1810.bin  
(version 2.0)
[    3.865419] [drm] GuC: Loaded firmware i915/kbl_guc_33.0.0.bin (version  
33.0)
[    3.876243] i915 0000:00:02.0: GuC submission disabled
[    3.876245] i915 0000:00:02.0: HuC enabled

Note that newer GuC fixes other known issue [2] that has similar signature:

[160.168623] [drm:intel_huc_auth [i915]] *ERROR* HuC: Firmware not  
verified -110
[160.168839] [drm:intel_huc_auth [i915]] *ERROR* HuC: Authentication  
failed -110
[160.169159] [drm:i915_gem_init_hw [i915]] *ERROR* Enabling uc failed  
(-110)

Michal

[1]  
https://intel-gfx-ci.01.org/tree/drm-tip/Trybot_4514/fi-kbl-7567u/boot0.log
[2] https://bugs.freedesktop.org/show_bug.cgi?id=110820
Chris Wilson July 4, 2019, 3:59 p.m. UTC | #3
Quoting Michal Wajdeczko (2019-07-03 14:02:51)
> On Wed, 03 Jul 2019 13:40:06 +0200, Chris Wilson  
> <chris@chris-wilson.co.uk> wrote:
> 
> > Quoting Michal Wajdeczko (2019-07-03 12:36:40)
> >> GuC firmware is now mature, so let it run by default.
> >> Note that today GuC is only used for HuC authentication.
> >
> > https://bugs.freedesktop.org/show_bug.cgi?id=110617 ?
> 
> Above bug was found on suspicious kernel with old GuC 9.39:
> 
> [    2.381803] [drm] HuC: Loaded firmware i915/kbl_huc_ver02_00_1810.bin  
> (version 2.0)
> [    2.386316] [drm] GuC: Loaded firmware i915/kbl_guc_ver9_39.bin  
> (version 9.39)
> [    2.438318] [drm:intel_huc_auth] *ERROR* HuC: Firmware not verified  
> 0x6000
> [    2.445235] [drm:intel_huc_auth] *ERROR* HuC: Authentication failed -110
> [    2.451975] i915 0000:00:02.0: GuC initialization failed -110
> 
> while results from try-bot [1] with 33.0.0 on KBL are looking fine:
> 
> [    3.854084] [drm] HuC: Loaded firmware i915/kbl_huc_ver02_00_1810.bin  
> (version 2.0)
> [    3.865419] [drm] GuC: Loaded firmware i915/kbl_guc_33.0.0.bin (version  
> 33.0)
> [    3.876243] i915 0000:00:02.0: GuC submission disabled
> [    3.876245] i915 0000:00:02.0: HuC enabled
> 
> Note that newer GuC fixes other known issue [2] that has similar signature:
> 
> [160.168623] [drm:intel_huc_auth [i915]] *ERROR* HuC: Firmware not  
> verified -110
> [160.168839] [drm:intel_huc_auth [i915]] *ERROR* HuC: Authentication  
> failed -110
> [160.169159] [drm:i915_gem_init_hw [i915]] *ERROR* Enabling uc failed  
> (-110)

Pushed the switch to the new GuC version, but I am deferring the
decision to enable-by-default to someone in MAINTAINERS. Probably Joonas
if he survives his swim with the fishes.
-Chris
Joonas Lahtinen July 9, 2019, 2:17 p.m. UTC | #4
Better subject would be: "Enable HuC (through GuC) on supported platforms"

Quoting Michal Wajdeczko (2019-07-03 14:36:40)
> GuC firmware is now mature, so let it run by default.

That's bit of a misleading statement (in more than one way).

"Enable loading HuC firmware (through GuC) to unlock
advanced video codecs on supported platforms.

GuC firmware is required to authenticate the HuC firmware,
which is a requirement for it to operate."

Has the most recent firmware been merged to linux-firmware and
is it present in our CI systems?

It would also be good to list what kind of tests have been run
to ensure that there are no regressions, and which platforms
this change affects.

Regards, Joonas

> Note that today GuC is only used for HuC authentication.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_params.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
> index d29ade3b7de6..5736c55694fe 100644
> --- a/drivers/gpu/drm/i915/i915_params.h
> +++ b/drivers/gpu/drm/i915/i915_params.h
> @@ -54,7 +54,7 @@ struct drm_printer;
>         param(int, disable_power_well, -1) \
>         param(int, enable_ips, 1) \
>         param(int, invert_brightness, 0) \
> -       param(int, enable_guc, 0) \
> +       param(int, enable_guc, -1) \
>         param(int, guc_log_level, -1) \
>         param(char *, guc_firmware_path, NULL) \
>         param(char *, huc_firmware_path, NULL) \
> -- 
> 2.19.2
>
Michal Wajdeczko July 10, 2019, 2:27 p.m. UTC | #5
On Tue, 09 Jul 2019 16:17:02 +0200, Joonas Lahtinen
<joonas.lahtinen@linux.intel.com> wrote:

> Better subject would be: "Enable HuC (through GuC) on supported  
> platforms"

Such subject sounds better, but on one hand it does not reflect real
code change (since we are not explicitly enabling HuC, but instead we
are just letting the driver enable GuC/HuC to whatever mode it decides),
but on other hand this is what actual outcome of the change is (as i915
currently enables GuC loading with HuC authentication on every platform
where corresponding firmwares are defined/available, and nothing more).

Please confirm if you still opt-in to use your subject.

>
> Quoting Michal Wajdeczko (2019-07-03 14:36:40)
>> GuC firmware is now mature, so let it run by default.
>
> That's bit of a misleading statement (in more than one way).

It's mature enough to perform HuC authentication, and we
don't expect more from it ;)

>
> "Enable loading HuC firmware (through GuC) to unlock
> advanced video codecs on supported platforms.
>
> GuC firmware is required to authenticate the HuC firmware,
> which is a requirement for it to operate."

To some extend this duplicates existing "DOC: HuC Firmware"
Do we need to repeat that again here?

>
> Has the most recent firmware been merged to linux-firmware and
> is it present in our CI systems?

My understanding is: No and Yes.
Maybe Anusha can provide more details here.

>
> It would also be good to list what kind of tests have been run
> to ensure that there are no regressions,

I'm afraid on IGT level we don't have HuC tests.
But media team was using modparam override to force GuC/HuC for
a while, Tony do you have such test list/results handy?

> and which platforms
> this change affects.

This change affects all platforms where we have GuC/HuC firmwares
defined, so: SKL, BXT, KBL, CFL, ICL.

Note that we'll still have possibility to tweak that inside
driver, as auto mode is just moving responsibility what can
be enabled from the user to the i915.

>
> Regards, Joonas
>
>> Note that today GuC is only used for HuC authentication.
>>
>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
>> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> ---
>>  drivers/gpu/drm/i915/i915_params.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_params.h  
>> b/drivers/gpu/drm/i915/i915_params.h
>> index d29ade3b7de6..5736c55694fe 100644
>> --- a/drivers/gpu/drm/i915/i915_params.h
>> +++ b/drivers/gpu/drm/i915/i915_params.h
>> @@ -54,7 +54,7 @@ struct drm_printer;
>>         param(int, disable_power_well, -1) \
>>         param(int, enable_ips, 1) \
>>         param(int, invert_brightness, 0) \
>> -       param(int, enable_guc, 0) \
>> +       param(int, enable_guc, -1) \
>>         param(int, guc_log_level, -1) \
>>         param(char *, guc_firmware_path, NULL) \
>>         param(char *, huc_firmware_path, NULL) \
>> --
>> 2.19.2
Srivatsa, Anusha July 10, 2019, 5:51 p.m. UTC | #6
>-----Original Message-----
>From: Wajdeczko, Michal
>Sent: Wednesday, July 10, 2019 7:27 AM
>To: intel-gfx@lists.freedesktop.org; Joonas Lahtinen
><joonas.lahtinen@linux.intel.com>; Srivatsa, Anusha
><anusha.srivatsa@intel.com>; Ye, Tony <tony.ye@intel.com>
>Cc: Ceraolo Spurio, Daniele <daniele.ceraolospurio@intel.com>; Chris Wilson
><chris@chris-wilson.co.uk>
>Subject: Re: [PATCH 2/2] drm/i915/guc: Turn on GuC/HuC auto mode
>
>On Tue, 09 Jul 2019 16:17:02 +0200, Joonas Lahtinen
><joonas.lahtinen@linux.intel.com> wrote:
>
>> Better subject would be: "Enable HuC (through GuC) on supported
>> platforms"
>
>Such subject sounds better, but on one hand it does not reflect real code change
>(since we are not explicitly enabling HuC, but instead we are just letting the driver
>enable GuC/HuC to whatever mode it decides), but on other hand this is what
>actual outcome of the change is (as i915 currently enables GuC loading with HuC
>authentication on every platform where corresponding firmwares are
>defined/available, and nothing more).
>
>Please confirm if you still opt-in to use your subject.
>
>>
>> Quoting Michal Wajdeczko (2019-07-03 14:36:40)
>>> GuC firmware is now mature, so let it run by default.
>>
>> That's bit of a misleading statement (in more than one way).
>
>It's mature enough to perform HuC authentication, and we don't expect more
>from it ;)
>
>>
>> "Enable loading HuC firmware (through GuC) to unlock advanced video
>> codecs on supported platforms.
>>
>> GuC firmware is required to authenticate the HuC firmware, which is a
>> requirement for it to operate."
>
>To some extend this duplicates existing "DOC: HuC Firmware"
>Do we need to repeat that again here?
>
>>
>> Has the most recent firmware been merged to linux-firmware and is it
>> present in our CI systems?
>
>My understanding is: No and Yes.
>Maybe Anusha can provide more details here.

Waiting on the firmware to get merged to linux-firmware. Sent the PR.
The latest firmware is however available on our CI.

Anusha 
>>
>> It would also be good to list what kind of tests have been run to
>> ensure that there are no regressions,
>
>I'm afraid on IGT level we don't have HuC tests.
>But media team was using modparam override to force GuC/HuC for a while,
>Tony do you have such test list/results handy?
>
>> and which platforms
>> this change affects.
>
>This change affects all platforms where we have GuC/HuC firmwares defined, so:
>SKL, BXT, KBL, CFL, ICL.
>
>Note that we'll still have possibility to tweak that inside driver, as auto mode is
>just moving responsibility what can be enabled from the user to the i915.
>
>>
>> Regards, Joonas
>>
>>> Note that today GuC is only used for HuC authentication.
>>>
>>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
>>> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>>> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>>> ---
>>>  drivers/gpu/drm/i915/i915_params.h | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/i915_params.h
>>> b/drivers/gpu/drm/i915/i915_params.h
>>> index d29ade3b7de6..5736c55694fe 100644
>>> --- a/drivers/gpu/drm/i915/i915_params.h
>>> +++ b/drivers/gpu/drm/i915/i915_params.h
>>> @@ -54,7 +54,7 @@ struct drm_printer;
>>>         param(int, disable_power_well, -1) \
>>>         param(int, enable_ips, 1) \
>>>         param(int, invert_brightness, 0) \
>>> -       param(int, enable_guc, 0) \
>>> +       param(int, enable_guc, -1) \
>>>         param(int, guc_log_level, -1) \
>>>         param(char *, guc_firmware_path, NULL) \
>>>         param(char *, huc_firmware_path, NULL) \
>>> --
>>> 2.19.2
Ye, Tony July 11, 2019, 4:24 a.m. UTC | #7
On 7/10/2019 10:27 PM, Michal Wajdeczko wrote:
> On Tue, 09 Jul 2019 16:17:02 +0200, Joonas Lahtinen
> <joonas.lahtinen@linux.intel.com> wrote:
>
>> Better subject would be: "Enable HuC (through GuC) on supported 
>> platforms"
>
> Such subject sounds better, but on one hand it does not reflect real
> code change (since we are not explicitly enabling HuC, but instead we
> are just letting the driver enable GuC/HuC to whatever mode it decides),
> but on other hand this is what actual outcome of the change is (as i915
> currently enables GuC loading with HuC authentication on every platform
> where corresponding firmwares are defined/available, and nothing more).
>
> Please confirm if you still opt-in to use your subject.
>
>>
>> Quoting Michal Wajdeczko (2019-07-03 14:36:40)
>>> GuC firmware is now mature, so let it run by default.
>>
>> That's bit of a misleading statement (in more than one way).
>
> It's mature enough to perform HuC authentication, and we
> don't expect more from it ;)
>
>>
>> "Enable loading HuC firmware (through GuC) to unlock
>> advanced video codecs on supported platforms.
>>
>> GuC firmware is required to authenticate the HuC firmware,
>> which is a requirement for it to operate."
>
> To some extend this duplicates existing "DOC: HuC Firmware"
> Do we need to repeat that again here?
>
>>
>> Has the most recent firmware been merged to linux-firmware and
>> is it present in our CI systems?
>
> My understanding is: No and Yes.
> Maybe Anusha can provide more details here.
>
>>
>> It would also be good to list what kind of tests have been run
>> to ensure that there are no regressions,
>
> I'm afraid on IGT level we don't have HuC tests.
> But media team was using modparam override to force GuC/HuC for
> a while, Tony do you have such test list/results handy?

HuC functionality has been tested with AVC VDENC/HEVC VDENC/VP9VDENC 
encoding test cases in regular CI.

Thanks, -Tony

>
>> and which platforms
>> this change affects.
>
> This change affects all platforms where we have GuC/HuC firmwares
> defined, so: SKL, BXT, KBL, CFL, ICL.
>
> Note that we'll still have possibility to tweak that inside
> driver, as auto mode is just moving responsibility what can
> be enabled from the user to the i915.
>
>>
>> Regards, Joonas
>>
>>> Note that today GuC is only used for HuC authentication.
>>>
>>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
>>> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>>> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>>> ---
>>>  drivers/gpu/drm/i915/i915_params.h | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/i915_params.h 
>>> b/drivers/gpu/drm/i915/i915_params.h
>>> index d29ade3b7de6..5736c55694fe 100644
>>> --- a/drivers/gpu/drm/i915/i915_params.h
>>> +++ b/drivers/gpu/drm/i915/i915_params.h
>>> @@ -54,7 +54,7 @@ struct drm_printer;
>>>         param(int, disable_power_well, -1) \
>>>         param(int, enable_ips, 1) \
>>>         param(int, invert_brightness, 0) \
>>> -       param(int, enable_guc, 0) \
>>> +       param(int, enable_guc, -1) \
>>>         param(int, guc_log_level, -1) \
>>>         param(char *, guc_firmware_path, NULL) \
>>>         param(char *, huc_firmware_path, NULL) \
>>> -- 
>>> 2.19.2
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
index d29ade3b7de6..5736c55694fe 100644
--- a/drivers/gpu/drm/i915/i915_params.h
+++ b/drivers/gpu/drm/i915/i915_params.h
@@ -54,7 +54,7 @@  struct drm_printer;
 	param(int, disable_power_well, -1) \
 	param(int, enable_ips, 1) \
 	param(int, invert_brightness, 0) \
-	param(int, enable_guc, 0) \
+	param(int, enable_guc, -1) \
 	param(int, guc_log_level, -1) \
 	param(char *, guc_firmware_path, NULL) \
 	param(char *, huc_firmware_path, NULL) \