diff options
Diffstat (limited to 'isp/omap3isp-priv.h')
-rw-r--r-- | isp/omap3isp-priv.h | 56 |
1 files changed, 33 insertions, 23 deletions
diff --git a/isp/omap3isp-priv.h b/isp/omap3isp-priv.h index bf3e540..7864c63 100644 --- a/isp/omap3isp-priv.h +++ b/isp/omap3isp-priv.h @@ -26,28 +26,7 @@ #include <linux/v4l2-mediabus.h> #include "omap3isp.h" - -/* - * struct omap3_isp_video - OMAP3 video device - * @node: Output video node entity - * @video: V4L2 capture device - * @format: Current video format - * @pool: Buffers pool - * @scaler: Whether scaling should be performed on the ISP or the sensor - * @dequeued: Bitmask of dequeued buffers that belong to the application - * @queued: Number of buffers queued to the driver - * @running: Whether video capture is running on the device - */ -struct omap3_isp_video { - struct media_entity *node; - struct v4l2_device *video; - struct v4l2_mbus_framefmt format; - struct v4l2_buffers_pool *pool; - enum omap3_isp_scaler scaler; - unsigned int dequeued; - unsigned int queued; - bool running; -}; +#include "tools.h" /* * struct omap3_isp_pad - OMAP3 entity pad @@ -59,28 +38,59 @@ struct omap3_isp_pad { struct v4l2_mbus_framefmt format; }; +enum omap3_isp_entity_type { + OMAP3_ISP_ENTITY_ENTITY, + OMAP3_ISP_ENTITY_VIDEO, +}; + /* * struct omap3_isp_entity - OMAP3 entity in a pipeline * @list: Entities list + * @type: Entity type * @entity: Media entity information * @sink: Sink pad * @source: Sink pad */ struct omap3_isp_entity { struct list_entry list; + enum omap3_isp_entity_type type; struct media_entity *entity; struct omap3_isp_pad sink; struct omap3_isp_pad source; }; /* + * struct omap3_isp_video - OMAP3 video device + * @entity: OMAP3 entity + * @video: V4L2 capture device + * @format: Current video format + * @pool: Buffers pool + * @scaler: Whether scaling should be performed on the ISP or the sensor + * @dequeued: Bitmask of dequeued buffers that belong to the application + * @queued: Number of buffers queued to the driver + * @running: Whether video capture is running on the device + */ +struct omap3_isp_video { + struct omap3_isp_entity entity; + struct v4l2_device *video; + struct v4l2_mbus_framefmt format; + struct v4l2_buffers_pool *pool; + enum omap3_isp_scaler scaler; + unsigned int dequeued; + unsigned int queued; + bool running; +}; + +#define to_omap3_isp_video(e) container_of(e, struct omap3_isp_video, entity) + +/* * struct omap3_isp_pipeline - OMAP3 pipeline * @entitites: Entities in the pipeline * @output: Video device at the output of the pipeline */ struct omap3_isp_pipeline { struct list_entry entities; - struct omap3_isp_video output; + struct omap3_isp_video *output; }; struct omap3_isp_device { |