1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Support for Medifield PNW Camera Imaging ISP subsystem. 4 * 5 * Copyright (c) 2010 Intel Corporation. All Rights Reserved. 6 * 7 * Copyright (c) 2010 Silicon Hive www.siliconhive.com. 8 * 9 * This program is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU General Public License version 11 * 2 as published by the Free Software Foundation. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * 19 */ 20 21 #ifndef __ATOMISP_IOCTL_H__ 22 #define __ATOMISP_IOCTL_H__ 23 24 #include "ia_css.h" 25 26 struct atomisp_device; 27 struct atomisp_video_pipe; 28 29 extern const struct atomisp_format_bridge atomisp_output_fmts[]; 30 31 const struct 32 atomisp_format_bridge *atomisp_get_format_bridge(unsigned int pixelformat); 33 34 const struct 35 atomisp_format_bridge *atomisp_get_format_bridge_from_mbus(u32 mbus_code); 36 37 int atomisp_pipe_check(struct atomisp_video_pipe *pipe, bool streaming_ok); 38 39 int atomisp_alloc_css_stat_bufs(struct atomisp_sub_device *asd, 40 uint16_t stream_id); 41 42 int atomisp_streamoff(struct file *file, void *fh, enum v4l2_buf_type type); 43 int atomisp_reqbufs(struct file *file, void *fh, struct v4l2_requestbuffers *req); 44 45 enum ia_css_pipe_id atomisp_get_css_pipe_id(struct atomisp_sub_device 46 *asd); 47 48 void atomisp_videobuf_free_buf(struct videobuf_buffer *vb); 49 50 extern const struct v4l2_ioctl_ops atomisp_ioctl_ops; 51 52 unsigned int atomisp_streaming_count(struct atomisp_device *isp); 53 54 /* compat_ioctl for 32bit userland app and 64bit kernel */ 55 long atomisp_compat_ioctl32(struct file *file, 56 unsigned int cmd, unsigned long arg); 57 58 int atomisp_stream_on_master_slave_sensor(struct atomisp_device *isp, 59 bool isp_timeout); 60 #endif /* __ATOMISP_IOCTL_H__ */ 61