[igt-dev] [PATCH i-g-t 4/5] RFC lib/ioctl_wrappers: GEM_SET_DOMAIN ioctl not supported on xe

Modem, Bhanuprakash bhanuprakash.modem at intel.com
Thu Jun 8 11:42:03 UTC 2023


Hi Kunal,

On Tue-06-06-2023 01:32 pm, Kunal Joshi wrote:
> xe doesn't support GEM_SET_DOMAIN ioctl
> 
> Signed-off-by: Kunal Joshi <kunal1.joshi 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 ebd8a2f3..1180d4c6 100644
> --- a/lib/ioctl_wrappers.c
> +++ b/lib/ioctl_wrappers.c
> @@ -534,7 +534,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)
>   {
> -	int ret = __gem_set_domain(fd, handle, read, write);
> +	int ret;
> +
> +	if (is_xe_device(fd))
> +		return;
> +
> +	ret = __gem_set_domain(fd, handle, read, write);

I think this must be handled in test level. Instead of modifying the 
helper don't call it in case of Xe.

- Bhanu

>   
>   	if (ret == -ENODEV && gem_has_lmem(fd))
>   		igt_assert_eq(gem_wait(fd, handle, 0), 0);


More information about the igt-dev mailing list