#include <linux/iopoll.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/videodev2.h>
#include <linux/vmalloc.h>
#include <media/v4l2-event.h>
#include "rkisp1-common.h"
#define RKISP1_DEF_SINK_PAD_FMT …
#define RKISP1_DEF_SRC_PAD_FMT …
#define RKISP1_ISP_DEV_NAME …
#define ISP_DEWARP_CONTROL …
#define ISP_DEWARP_CONTROL_MIPI_CSI2_HS_POLARITY …
#define ISP_DEWARP_CONTROL_MIPI_CSI2_VS_SEL_RISING …
#define ISP_DEWARP_CONTROL_MIPI_CSI2_VS_SEL_NEGATIVE …
#define ISP_DEWARP_CONTROL_MIPI_CSI2_VS_SEL_POSITIVE …
#define ISP_DEWARP_CONTROL_MIPI_CSI2_VS_SEL_FALLING …
#define ISP_DEWARP_CONTROL_MIPI_CSI2_VS_SEL_MASK …
#define ISP_DEWARP_CONTROL_MIPI_ISP2_LEFT_JUST_MODE …
#define ISP_DEWARP_CONTROL_MIPI_ISP2_DATA_TYPE(dt) …
#define ISP_DEWARP_CONTROL_MIPI_ISP2_DATA_TYPE_MASK …
#define ISP_DEWARP_CONTROL_MIPI_CSI1_HS_POLARITY …
#define ISP_DEWARP_CONTROL_MIPI_CSI1_VS_SEL_RISING …
#define ISP_DEWARP_CONTROL_MIPI_CSI1_VS_SEL_NEGATIVE …
#define ISP_DEWARP_CONTROL_MIPI_CSI1_VS_SEL_POSITIVE …
#define ISP_DEWARP_CONTROL_MIPI_CSI1_VS_SEL_FALLING …
#define ISP_DEWARP_CONTROL_MIPI_CSI1_VS_SEL_MASK …
#define ISP_DEWARP_CONTROL_MIPI_ISP1_LEFT_JUST_MODE …
#define ISP_DEWARP_CONTROL_MIPI_ISP1_DATA_TYPE(dt) …
#define ISP_DEWARP_CONTROL_MIPI_ISP1_DATA_TYPE_MASK …
#define ISP_DEWARP_CONTROL_GPR_ISP_1_DISABLE …
#define ISP_DEWARP_CONTROL_GPR_ISP_0_DISABLE …
static int rkisp1_gasket_enable(struct rkisp1_device *rkisp1,
struct media_pad *source)
{ … }
static void rkisp1_gasket_disable(struct rkisp1_device *rkisp1)
{ … }
static void rkisp1_config_ism(struct rkisp1_isp *isp,
const struct v4l2_subdev_state *sd_state)
{ … }
static int rkisp1_config_isp(struct rkisp1_isp *isp,
const struct v4l2_subdev_state *sd_state,
enum v4l2_mbus_type mbus_type, u32 mbus_flags)
{ … }
static void rkisp1_config_path(struct rkisp1_isp *isp,
enum v4l2_mbus_type mbus_type)
{ … }
static int rkisp1_config_cif(struct rkisp1_isp *isp,
struct v4l2_subdev_state *sd_state,
enum v4l2_mbus_type mbus_type, u32 mbus_flags)
{ … }
static void rkisp1_isp_stop(struct rkisp1_isp *isp)
{ … }
static void rkisp1_config_clk(struct rkisp1_isp *isp)
{ … }
static int rkisp1_isp_start(struct rkisp1_isp *isp,
const struct v4l2_subdev_state *sd_state,
struct media_pad *source)
{ … }
static inline struct rkisp1_isp *to_rkisp1_isp(struct v4l2_subdev *sd)
{ … }
static int rkisp1_isp_enum_mbus_code(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_mbus_code_enum *code)
{ … }
static int rkisp1_isp_enum_frame_size(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_frame_size_enum *fse)
{ … }
static int rkisp1_isp_init_state(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state)
{ … }
static void rkisp1_isp_set_src_fmt(struct rkisp1_isp *isp,
struct v4l2_subdev_state *sd_state,
struct v4l2_mbus_framefmt *format)
{ … }
static void rkisp1_isp_set_src_crop(struct rkisp1_isp *isp,
struct v4l2_subdev_state *sd_state,
struct v4l2_rect *r)
{ … }
static void rkisp1_isp_set_sink_crop(struct rkisp1_isp *isp,
struct v4l2_subdev_state *sd_state,
struct v4l2_rect *r)
{ … }
static void rkisp1_isp_set_sink_fmt(struct rkisp1_isp *isp,
struct v4l2_subdev_state *sd_state,
struct v4l2_mbus_framefmt *format)
{ … }
static int rkisp1_isp_set_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *fmt)
{ … }
static int rkisp1_isp_get_selection(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_selection *sel)
{ … }
static int rkisp1_isp_set_selection(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_selection *sel)
{ … }
static int rkisp1_subdev_link_validate(struct media_link *link)
{ … }
static const struct v4l2_subdev_pad_ops rkisp1_isp_pad_ops = …;
static int rkisp1_isp_s_stream(struct v4l2_subdev *sd, int enable)
{ … }
static int rkisp1_isp_subs_evt(struct v4l2_subdev *sd, struct v4l2_fh *fh,
struct v4l2_event_subscription *sub)
{ … }
static const struct media_entity_operations rkisp1_isp_media_ops = …;
static const struct v4l2_subdev_video_ops rkisp1_isp_video_ops = …;
static const struct v4l2_subdev_core_ops rkisp1_isp_core_ops = …;
static const struct v4l2_subdev_ops rkisp1_isp_ops = …;
static const struct v4l2_subdev_internal_ops rkisp1_isp_internal_ops = …;
int rkisp1_isp_register(struct rkisp1_device *rkisp1)
{ … }
void rkisp1_isp_unregister(struct rkisp1_device *rkisp1)
{ … }
static void rkisp1_isp_queue_event_sof(struct rkisp1_isp *isp)
{ … }
irqreturn_t rkisp1_isp_isr(int irq, void *ctx)
{ … }