[Intel-gfx] [PATCH] drm/i915/huc: Fix error reported by I915_PARAM_HUC_STATUS

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Fri Feb 28 11:33:17 UTC 2020


> >>>>> ------------------+----------
> >>>>>    HuC state       | option B
> >>>>> ------------------+----------
> >>>>> no HuC hardware   | -ENODEV
> >>>>> GuC fw disabled   | -EOPNOTSUPP -> user decision, why error?
> >>>>> HuC fw disabled   | -EOPNOTSUPP -> user decision, why error?
> >>>>> HuC fw missing    | -ENOEXEC
> >>>>> HuC fw error      | -ENOEXEC
> >>>>> HuC fw fail       |    0        -> unlikely, but still fw/hw error
> >>>>> HuC authenticated |    1
> >>>>> ------------------+----------
> >>>>>
> >>>>> On other hand, option A treats all error conditions as errors, leaving
> >>>>> status codes only for normal operations: disabled(0)/authenticated(1):
> >>>>>
> >>>>> ------------------+----------
> >>>>>    HuC state       | option A
> >>>>> ------------------+----------
> >>>>> no HuC hardware   | -ENODEV  -> you shouldn't ask
> >>>>> GuC fw disabled   |     0    -> user decision, not an error
> >>>>> HuC fw disabled   |     0    -> user decision, not an error
> >>>>> HuC fw missing    | -ENOPKG  -> fw not installed correctly
> >>>>> HuC fw error      | -ENOEXEC -> bad/wrong fw
> >>>>> HuC fw fail       | -EACCES  -> fw/hw error
> >>>>> HuC authenticated |     1
> >>>>> ------------------+----------

Let's go with Option B here.

It correctly reports anything as error if it precedes
the actual action of authentication and prevents it from
happening.

So the result one gets is 0/1 is for the authentication
status which is the original intent here. Or alternatively
an error if the authentication was not attempted.

Regards, Joonas


More information about the Intel-gfx mailing list