| From 7c39739caf0e5ad5a702d597c5b2330e63ba32af Mon Sep 17 00:00:00 2001 |
| From: Hans Verkuil <hans.verkuil@cisco.com> |
| Date: Mon, 21 May 2018 04:54:26 -0400 |
| Subject: [PATCH 1/4] BACKPORT: media: uapi/linux/media.h: add request API |
| |
| 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 <hans.verkuil@cisco.com> |
| Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> |
| Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
| Reviewed-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| (cherry picked from commit 66431c0bab0fb8bdd62930575869bea98eb2baf0) |
| Signed-off-by: Alexandre Courbot <acourbot@chromium.org> |
| --- |
| include/uapi/linux/media.h | 8 ++++++++ |
| 1 file changed, 8 insertions(+) |
| |
| diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h |
| index b9b9446..99084f1 100644 |
| --- a/include/uapi/linux/media.h |
| +++ b/include/uapi/linux/media.h |
| @@ -413,5 +413,13 @@ struct media_v2_topology { |
| #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 _IOR ('|', 0x05, int) |
| + |
| +/* |
| + * 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) |
| |
| #endif /* __LINUX_MEDIA_H */ |
| -- |
| 2.16.4 |
| |