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:
parent
91192696e6
commit
df5607d2ef
|
@ -771,9 +771,7 @@ anv_gem_get_engine_info(int fd)
|
||||||
{
|
{
|
||||||
int32_t length = 0;
|
int32_t length = 0;
|
||||||
int ret = anv_i915_query(fd, DRM_I915_QUERY_ENGINE_INFO, NULL, &length);
|
int ret = anv_i915_query(fd, DRM_I915_QUERY_ENGINE_INFO, NULL, &length);
|
||||||
assert(ret == 0);
|
if (ret == -1)
|
||||||
|
|
||||||
if (ret == -1 && errno == EINVAL)
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
struct drm_i915_query_engine_info *info = calloc(1, length);
|
struct drm_i915_query_engine_info *info = calloc(1, length);
|
||||||
|
|
Loading…
Reference in New Issue