Re: [PATCH v9 6/6] drm/i915: expose rcs topology through query uAPI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux