[Intel-gfx] [PATCH i-g-t v2 08/11] lib/ioctl_wrappers: update set_domain for discrete
Matthew Auld
matthew.auld at intel.com
Wed Jul 28 10:30:38 UTC 2021
On discrete set_domain is now gone, instead we just need to add the
wait.
Signed-off-by: Matthew Auld <matthew.auld at intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit at intel.com>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Cc: Ramalingam C <ramalingam.c at intel.com>
---
lib/ioctl_wrappers.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 7e27a1b3..09eb3ce7 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -565,7 +565,12 @@ int __gem_set_domain(int fd, uint32_t handle, uint32_t read, uint32_t write)
*/
void gem_set_domain(int fd, uint32_t handle, uint32_t read, uint32_t write)
{
- igt_assert_eq(__gem_set_domain(fd, handle, read, write), 0);
+ int ret = __gem_set_domain(fd, handle, read, write);
+
+ if (ret == -ENODEV && gem_has_lmem(fd))
+ igt_assert_eq(gem_wait(fd, handle, 0), 0);
+ else
+ igt_assert_eq(ret, 0);
}
/**
--
2.26.3
More information about the Intel-gfx
mailing list