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

Joshi, Kunal1 kunal1.joshi at intel.com
Fri Jun 9 05:57:52 UTC 2023


On 6/8/2023 5:12 PM, Modem, Bhanuprakash wrote:
> 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.
>     igt_assert_eq(gem_wait(fd, handle, 0), 0);


I think it will be good if we can place it here

Also some library helpers calls this i think will have to
place checks there too

But let me know your thoughts

Thanks and Regards
Kunal Joshi





More information about the igt-dev mailing list