anv: Handle errors properly in anv_i915_query
DRM_IOCTL_I915_QUERY is a multi-query. The most egregious errors are returned via the usual ioctl error mechanism but there are also per-query errors that are indicated by item.length < 0. We need to handle those as well. While we're at it, scrape errno so we can return a proper integer error. Fixes: c0d07c83 "anv: Support i915 query (DRM_IOCTL_I915_QUERY)..." Reviewed-by:Paulo Zanoni <paulo.r.zanoni@intel.com> Part-of: <mesa/mesa!11770> (cherry picked from commit b664481b)