[Intel-gfx] [PATCH v9 6/6] drm/i915: expose rcs topology through query uAPI
Lionel Landwerlin
lionel.g.landwerlin at intel.com
Thu Jan 18 15:53:38 UTC 2018
On 18/01/18 15:36, Chris Wilson wrote:
> Quoting Lionel Landwerlin (2018-01-18 15:22:27)
>> On 18/01/18 15:18, Chris Wilson wrote:
>>> Quoting Lionel Landwerlin (2018-01-18 14:45:31)
>>>> +static int query_slice_info(struct drm_i915_private *dev_priv,
>>>> + struct drm_i915_query_item *query_item)
>>>> +{
>>>> + const struct sseu_dev_info *sseu = &INTEL_INFO(dev_priv)->sseu;
>>>> + struct drm_i915_query_slice_info slice_info;
>>>> +
>>>> + if (query_item->flags != 0)
>>>> + return -EINVAL;
>>>> +
>>>> + if (sseu->max_slices == 0)
>>>> + return -ENODEV;
>>> So conclusion was to cancel all queries and not report a 0-length result
>>> for unsupported? :)
>>> -Chris
>>>
>> Looking at GETPARAM, some queries return ENODEV if not supported (look
>> at SLICE_MASK, so did the same here).
>> Error are now reported in the s32 length field of the query item.
>> Unless you've screwed up the pointer to the items, in which case you'll
>> get an error through the ioctl() return value.
>>
>> Does that sounds sensible?
> It does, my fault for overlooking you had made the change. And even
> added it to the ioctl comments, making me look twice as bad ;)
> -Chris
>
One could hope that one day we have better tools than emails to review
changes :)
Cheers,
-
Lionel
More information about the Intel-gfx
mailing list