mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-21 14:20:29 +01:00
intel: fix PXP status check
Current check doesn't work on older kernels. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8064>
This commit is contained in:
parent
ade73d2e7f
commit
5ef8587b1e
1 changed files with 5 additions and 3 deletions
|
|
@ -253,10 +253,12 @@ i915_gem_supports_protected_context(int fd)
|
|||
bool ret;
|
||||
|
||||
errno = 0;
|
||||
if (!i915_gem_get_param(fd, I915_PARAM_PXP_STATUS, &val) && (errno == ENODEV))
|
||||
return false;
|
||||
else
|
||||
if (!i915_gem_get_param(fd, I915_PARAM_PXP_STATUS, &val)) {
|
||||
if (errno == ENODEV)
|
||||
return false;
|
||||
} else {
|
||||
return (val > 0);
|
||||
}
|
||||
|
||||
/* failed without ENODEV, so older kernels require a creation test */
|
||||
ret = i915_gem_create_context_ext(fd,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue