#include <linux/module.h>
#include <linux/uaccess.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/mm.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <media/v4l2-event.h>
#include <media/v4l2-mediabus.h>
#include <media/videobuf2-vmalloc.h>
#include "atomisp_cmd.h"
#include "atomisp_common.h"
#include "atomisp_compat.h"
#include "atomisp_fops.h"
#include "atomisp_internal.h"
#include "atomisp_ioctl.h"
const struct atomisp_in_fmt_conv atomisp_in_fmt_conv[] = …;
static const struct { … } compressed_codes[] = …;
u32 atomisp_subdev_uncompressed_code(u32 code)
{ … }
bool atomisp_subdev_is_compressed(u32 code)
{ … }
const struct atomisp_in_fmt_conv *atomisp_find_in_fmt_conv(u32 code)
{ … }
const struct atomisp_in_fmt_conv *atomisp_find_in_fmt_conv_by_atomisp_in_fmt(
enum atomisp_input_format atomisp_in_fmt)
{ … }
bool atomisp_subdev_format_conversion(struct atomisp_sub_device *asd)
{ … }
static long isp_subdev_ioctl(struct v4l2_subdev *sd,
unsigned int cmd, void *arg)
{ … }
static int isp_subdev_subscribe_event(struct v4l2_subdev *sd,
struct v4l2_fh *fh,
struct v4l2_event_subscription *sub)
{ … }
static int isp_subdev_unsubscribe_event(struct v4l2_subdev *sd,
struct v4l2_fh *fh,
struct v4l2_event_subscription *sub)
{ … }
static int isp_subdev_enum_mbus_code(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_mbus_code_enum *code)
{ … }
static int isp_subdev_validate_rect(struct v4l2_subdev *sd, uint32_t pad,
uint32_t target)
{ … }
struct v4l2_rect *atomisp_subdev_get_rect(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
u32 which, uint32_t pad,
uint32_t target)
{ … }
struct v4l2_mbus_framefmt
*atomisp_subdev_get_ffmt(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state, uint32_t which,
uint32_t pad)
{ … }
static void isp_get_fmt_rect(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
uint32_t which,
struct v4l2_mbus_framefmt **ffmt,
struct v4l2_rect *crop[ATOMISP_SUBDEV_PADS_NUM],
struct v4l2_rect *comp[ATOMISP_SUBDEV_PADS_NUM])
{ … }
static int isp_subdev_get_selection(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_selection *sel)
{ … }
static const char *atomisp_pad_str(unsigned int pad)
{ … }
int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
u32 which, uint32_t pad, uint32_t target,
u32 flags, struct v4l2_rect *r)
{ … }
static int isp_subdev_set_selection(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_selection *sel)
{ … }
void atomisp_subdev_set_ffmt(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
uint32_t which,
u32 pad, struct v4l2_mbus_framefmt *ffmt)
{ … }
static int isp_subdev_get_format(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *fmt)
{ … }
static int isp_subdev_set_format(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *fmt)
{ … }
static const struct v4l2_subdev_core_ops isp_subdev_v4l2_core_ops = …;
static const struct v4l2_subdev_pad_ops isp_subdev_v4l2_pad_ops = …;
static const struct v4l2_subdev_ops isp_subdev_v4l2_ops = …;
static void isp_subdev_init_params(struct atomisp_sub_device *asd)
{ … }
static int atomisp_link_setup(struct media_entity *entity,
const struct media_pad *local,
const struct media_pad *remote, u32 flags)
{ … }
static const struct media_entity_operations isp_subdev_media_ops = …;
static const char *const ctrl_run_mode_menu[] = …;
static const struct v4l2_ctrl_config ctrl_run_mode = …;
static const char *const ctrl_vfpp_mode_menu[] = …;
static const struct v4l2_ctrl_config ctrl_vfpp = …;
static const struct v4l2_ctrl_config ctrl_continuous_raw_buffer_size = …;
static const struct v4l2_ctrl_config ctrl_continuous_viewfinder = …;
static const struct v4l2_ctrl_config ctrl_enable_raw_buffer_lock = …;
static const struct v4l2_ctrl_config ctrl_disable_dz = …;
static int atomisp_init_subdev_pipe(struct atomisp_sub_device *asd,
struct atomisp_video_pipe *pipe, enum v4l2_buf_type buf_type)
{ … }
static int isp_subdev_init_entities(struct atomisp_sub_device *asd)
{ … }
static void atomisp_subdev_cleanup_entities(struct atomisp_sub_device *asd)
{ … }
void atomisp_subdev_cleanup_pending_events(struct atomisp_sub_device *asd)
{ … }
void atomisp_subdev_unregister_entities(struct atomisp_sub_device *asd)
{ … }
int atomisp_subdev_register_subdev(struct atomisp_sub_device *asd,
struct v4l2_device *vdev)
{ … }
int atomisp_subdev_init(struct atomisp_device *isp)
{ … }