From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from bombadil.infradead.org ([198.137.202.133]:53574 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726756AbeHIUT7 (ORCPT ); Thu, 9 Aug 2018 16:19:59 -0400 Date: Thu, 9 Aug 2018 14:53:58 -0300 From: Mauro Carvalho Chehab To: Hans Verkuil Cc: linux-media@vger.kernel.org, Hans Verkuil Subject: Re: [PATCHv17 02/34] uapi/linux/media.h: add request API Message-ID: <20180809145358.2278c795@coco.lan> In-Reply-To: <20180804124526.46206-3-hverkuil@xs4all.nl> References: <20180804124526.46206-1-hverkuil@xs4all.nl> <20180804124526.46206-3-hverkuil@xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-media-owner@vger.kernel.org List-ID: Em Sat, 4 Aug 2018 14:44:54 +0200 Hans Verkuil escreveu: > From: Hans Verkuil > > Define the public request API. > > This adds the new MEDIA_IOC_REQUEST_ALLOC ioctl to allocate a request > and two ioctls that operate on a request in order to queue the > contents of the request to the driver and to re-initialize the > request. > > Signed-off-by: Hans Verkuil > Acked-by: Sakari Ailus > Reviewed-by: Laurent Pinchart > --- > include/uapi/linux/media.h | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h > index 36f76e777ef9..cf77f00a0f2d 100644 > --- a/include/uapi/linux/media.h > +++ b/include/uapi/linux/media.h > @@ -364,11 +364,23 @@ struct media_v2_topology { > > /* ioctls */ > > +struct __attribute__ ((packed)) media_request_alloc { > + __s32 fd; > +}; > + > #define MEDIA_IOC_DEVICE_INFO _IOWR('|', 0x00, struct media_device_info) > #define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc) > #define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum) > #define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc) > #define MEDIA_IOC_G_TOPOLOGY _IOWR('|', 0x04, struct media_v2_topology) > +#define MEDIA_IOC_REQUEST_ALLOC _IOWR('|', 0x05, struct media_request_alloc) Same comment as in patch 1: keep it simpler: just pass a s32 * as the argument for this ioctl. > + > +/* > + * These ioctls are called on the request file descriptor as returned > + * by MEDIA_IOC_REQUEST_ALLOC. > + */ > +#define MEDIA_REQUEST_IOC_QUEUE _IO('|', 0x80) > +#define MEDIA_REQUEST_IOC_REINIT _IO('|', 0x81) > > #ifndef __KERNEL__ > Thanks, Mauro