1/* 2 * TI OMAP4 ISS V4L2 Driver - ISP IPIPE module 3 * 4 * Copyright (C) 2012 Texas Instruments, Inc. 5 * 6 * Author: Sergio Aguirre <sergio.a.aguirre@gmail.com> 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 2 of the License, or 11 * (at your option) any later version. 12 */ 13 14#ifndef OMAP4_ISS_IPIPE_H 15#define OMAP4_ISS_IPIPE_H 16 17#include "iss_video.h" 18 19enum ipipe_input_entity { 20 IPIPE_INPUT_NONE, 21 IPIPE_INPUT_IPIPEIF, 22}; 23 24#define IPIPE_OUTPUT_VP BIT(0) 25 26/* Sink and source IPIPE pads */ 27#define IPIPE_PAD_SINK 0 28#define IPIPE_PAD_SOURCE_VP 1 29#define IPIPE_PADS_NUM 2 30 31/* 32 * struct iss_ipipe_device - Structure for the IPIPE module to store its own 33 * information 34 * @subdev: V4L2 subdevice 35 * @pads: Sink and source media entity pads 36 * @formats: Active video formats 37 * @input: Active input 38 * @output: Active outputs 39 * @error: A hardware error occurred during capture 40 * @state: Streaming state 41 * @wait: Wait queue used to stop the module 42 * @stopping: Stopping state 43 */ 44struct iss_ipipe_device { 45 struct v4l2_subdev subdev; 46 struct media_pad pads[IPIPE_PADS_NUM]; 47 struct v4l2_mbus_framefmt formats[IPIPE_PADS_NUM]; 48 49 enum ipipe_input_entity input; 50 unsigned int output; 51 unsigned int error; 52 53 enum iss_pipeline_stream_state state; 54 wait_queue_head_t wait; 55 atomic_t stopping; 56}; 57 58struct iss_device; 59 60int omap4iss_ipipe_register_entities(struct iss_ipipe_device *ipipe, 61 struct v4l2_device *vdev); 62void omap4iss_ipipe_unregister_entities(struct iss_ipipe_device *ipipe); 63 64int omap4iss_ipipe_init(struct iss_device *iss); 65void omap4iss_ipipe_cleanup(struct iss_device *iss); 66 67#endif /* OMAP4_ISS_IPIPE_H */ 68