[igt-dev] [PATCH i-g-t v4] tests/i915/gem_huc_copy: Enable a HuC copy test
Ye, Tony
tony.ye at intel.com
Thu Jan 16 23:59:08 UTC 2020
On 1/16/2020 3:56 PM, Ye, Tony wrote:
> There are two issues with the HUC_STATUS query ioctl.
>
> 1. on a platform with huc supported, i915.enable_guc=0, got unexpected
> return value:
> ret=0, param.value=0, errno=ENODEV
it is ret=-1, param.value=0, errno=ENODEV, sorry for the typo.
>
> 2. the return value doesn't differentiate these two conditions:
> a. i915.enable_guc=0/1, huc is disabled, skip the huc_copy test;
> b. i915.enable_guc=2/3, huc load/authentication failed, fail huc_copy.
> A patch like this is required:
> https://patchwork.freedesktop.org/patch/306419/?series=61001&rev=1
>
> Regards,
> Tony
> On 1/10/2020 5:05 PM, Ye, Tony wrote:
>>
>>
>> On 1/10/2020 11:54 AM, Chris Wilson wrote:
>>> Quoting Ye, Tony (2020-01-10 19:51:58)
>>>>
>>>>
>>>> On 1/10/2020 10:28 AM, Chris Wilson wrote:
>>>>> Quoting Robert M. Fosha (2020-01-10 17:41:46)
>>>>>> +static bool
>>>>>> +check_huc_enabled(int fd)
>>>>>> +{
>>>>>> + int dir;
>>>>>> + dir = igt_sysfs_open_parameters(fd);
>>>>>> +
>>>>>> + if (dir < 0)
>>>>>> + return 0;
>>>>>> +
>>>>>> + if (igt_sysfs_get_u32(dir, "enable_guc") & 2)
>>>>>> + return 1;
>>>>>> + else
>>>>>> + return 0;
>>>>>
>>>>> No. If you have this in your userspace, please immediately remove it,
>>>>> and backport that to any and all stable branches and releases.
>>>>> -Chris
>>>>
>>>> The code is to skip the test when HuC is disabled by the enable_guc
>>>> module parameter. If HuC is disabled by the enable_guc param, then skip
>>>> the test. If the HuC failed to load due to a real error, then fail the
>>>> test.
>>>>
>>>> Could you suggest how to handle HUC_STATUS failure properly without
>>>> this
>>>> code?
>>>
>>> Look at the error code from querying HUC_STATUS.
>>> -Chris
>>
>> Agree that the check should be done via uAPI instead of the sysfs.
>> Thanks for the feedback.
>> Tony
>>>
More information about the igt-dev
mailing list