[Intel-gfx] [PATCH i-g-t v3 08/11] lib/ioctl_wrappers: update set_domain for discrete
Dixit, Ashutosh
ashutosh.dixit at intel.com
Mon Aug 2 06:24:45 UTC 2021
On Fri, 30 Jul 2021 01:53:45 -0700, Matthew Auld wrote:
>
> On discrete set_domain is now gone, instead we just need to add the
> wait.
Reviewed-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
> 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