diff options
Diffstat (limited to 'drivers/media/platform/sunxi/sun6i-csi/sun6i_video.h')
-rw-r--r-- | drivers/media/platform/sunxi/sun6i-csi/sun6i_video.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.h b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.h new file mode 100644 index 000000000..a917d2da6 --- /dev/null +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.h @@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (c) 2011-2018 Magewell Electronics Co., Ltd. (Nanjing) + * All rights reserved. + * Author: Yong Deng <yong.deng@magewell.com> + */ + +#ifndef __SUN6I_VIDEO_H__ +#define __SUN6I_VIDEO_H__ + +#include <media/v4l2-dev.h> +#include <media/videobuf2-core.h> + +struct sun6i_csi_device; + +struct sun6i_video { + struct video_device video_dev; + struct vb2_queue queue; + struct mutex lock; /* Queue lock. */ + struct media_pad pad; + + struct list_head dma_queue; + spinlock_t dma_queue_lock; /* DMA queue lock. */ + + struct v4l2_format format; + u32 mbus_code; + unsigned int sequence; +}; + +int sun6i_video_setup(struct sun6i_csi_device *csi_dev); +void sun6i_video_cleanup(struct sun6i_csi_device *csi_dev); + +void sun6i_video_frame_done(struct sun6i_csi_device *csi_dev); + +#endif /* __SUN6I_VIDEO_H__ */ |