qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] linux-user: syscall: ioctls: support DRM_IOCTL_VERSION


From: Chen Gang
Subject: Re: [PATCH v2] linux-user: syscall: ioctls: support DRM_IOCTL_VERSION
Date: Sun, 17 May 2020 21:08:42 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 2020/5/12 上午2:43, Laurent Vivier wrote:
>>  
>> +  IOCTL_SPECIAL(DRM_IOCTL_VERSION, IOC_RW, do_ioctl_drm,
>> +                MK_PTR(MK_STRUCT(STRUCT_drm_version)))
> 
> Add a blank line here.
>

OK, thanks.

>>  #ifdef TARGET_TIOCSTART
>>    IOCTL_IGNORE(TIOCSTART)
>>    IOCTL_IGNORE(TIOCSTOP)
>> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
>> index 8d27d10807..2eb7c91ab4 100644
>> --- a/linux-user/syscall.c
>> +++ b/linux-user/syscall.c
>> @@ -112,6 +112,7 @@
>>  #include <linux/if_alg.h>
>>  #include <linux/rtc.h>
>>  #include <sound/asound.h>
>> +#include <libdrm/drm.h>
> 
> I think you should check in configure that this file is available on the
> system.
> 

OK, I'll check in configure in patch v3.

>> diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
>> index 152ec637cb..3c261cff0e 100644
>> --- a/linux-user/syscall_defs.h
>> +++ b/linux-user/syscall_defs.h
>> @@ -1167,6 +1167,9 @@ struct target_rtc_pll_info {
>>  #define TARGET_DM_TARGET_MSG          TARGET_IOWRU(0xfd, 0x0e)
>>  #define TARGET_DM_DEV_SET_GEOMETRY    TARGET_IOWRU(0xfd, 0x0f)
>>  
>> +/* drm ioctls */
>> +#define TARGET_DRM_IOCTL_VERSION      TARGET_IOWRU('d', 0x00)
> 
> Why do you use the TARGET_IOWRU variant?
> 
> Can't you use TARGET_IOWR('d', 0x00, struct target_drm_version)?
> 

Because qemu will automatically set the size with the target structure
size in syscall_init(). It'll be more easier. e.g. usb ioctls and device
mapper ioctls also do like this.

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]