From 8e6e8f93f7cb3452b1c00da8a30d01558628d913 Mon Sep 17 00:00:00 2001 From: Sylwester Nawrocki Date: Sat, 14 Sep 2013 18:39:04 -0300 Subject: [media] V4L: Add mem2mem ioctl and file operation helpers This patch adds ioctl helpers to the V4L2 mem-to-mem API, so we can avoid several ioctl handlers in the mem-to-mem video node drivers that are simply a pass-through to the v4l2_m2m_* calls. These helpers will only be useful for drivers that use same mutex for both OUTPUT and CAPTURE queue, which is the case for all currently in tree v4l2 m2m drivers. In order to use the helpers the drivers are required to use struct v4l2_fh. Signed-off-by: Sylwester Nawrocki Signed-off-by: Kyungmin Park Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-fh.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/media/v4l2-fh.h') diff --git a/include/media/v4l2-fh.h b/include/media/v4l2-fh.h index 528cdaf622e1..803516775162 100644 --- a/include/media/v4l2-fh.h +++ b/include/media/v4l2-fh.h @@ -45,6 +45,10 @@ struct v4l2_fh { struct list_head available; /* Dequeueable event */ unsigned int navailable; u32 sequence; + +#if IS_ENABLED(CONFIG_V4L2_MEM2MEM_DEV) + struct v4l2_m2m_ctx *m2m_ctx; +#endif }; /* -- cgit v1.2.3