anv: Use fallback paths if DRM_I915_QUERY_ENGINE_INFO fails

Anvil can handle if this call fails, but not if we assert. :)

Reported-by: Brian Paul <brianp@vmware.com>
Fixes: 5d84c764fd ("anv: Gather engine info from i915 if available")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9664>
This commit is contained in:
Jordan Justen 2021-03-17 10:08:56 -07:00 committed by Marge Bot
parent 91192696e6
commit df5607d2ef
1 changed files with 1 additions and 3 deletions

View File

@ -771,9 +771,7 @@ anv_gem_get_engine_info(int fd)
{
int32_t length = 0;
int ret = anv_i915_query(fd, DRM_I915_QUERY_ENGINE_INFO, NULL, &length);
assert(ret == 0);
if (ret == -1 && errno == EINVAL)
if (ret == -1)
return NULL;
struct drm_i915_query_engine_info *info = calloc(1, length);