#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/bug.h>
#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/list.h>
#include <linux/mfd/syscon.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/slab.h>
#include <linux/clk.h>
#include <media/v4l2-ioctl.h>
#include <media/videobuf2-v4l2.h>
#include <media/videobuf2-dma-contig.h>
#include "fimc-core.h"
#include "fimc-reg.h"
#include "media-dev.h"
static const char *fimc_clocks[MAX_FIMC_CLOCKS] = …;
static const struct fimc_fmt fimc_formats[] = …;
const struct fimc_fmt *fimc_get_format(unsigned int index)
{ … }
int fimc_check_scaler_ratio(struct fimc_ctx *ctx, int sw, int sh,
int dw, int dh, int rotation)
{ … }
static int fimc_get_scaler_factor(u32 src, u32 tar, u32 *ratio, u32 *shift)
{ … }
int fimc_set_scaler_info(struct fimc_ctx *ctx)
{ … }
static irqreturn_t fimc_irq_handler(int irq, void *priv)
{ … }
int fimc_prepare_addr(struct fimc_ctx *ctx, struct vb2_buffer *vb,
const struct fimc_frame *frame, struct fimc_addr *addr)
{ … }
void fimc_set_yuv_order(struct fimc_ctx *ctx)
{ … }
void fimc_prepare_dma_offset(struct fimc_ctx *ctx, struct fimc_frame *f)
{ … }
static int fimc_set_color_effect(struct fimc_ctx *ctx, enum v4l2_colorfx colorfx)
{ … }
#define ctrl_to_ctx(__ctrl) …
static int __fimc_s_ctrl(struct fimc_ctx *ctx, struct v4l2_ctrl *ctrl)
{ … }
static int fimc_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static const struct v4l2_ctrl_ops fimc_ctrl_ops = …;
int fimc_ctrls_create(struct fimc_ctx *ctx)
{ … }
void fimc_ctrls_delete(struct fimc_ctx *ctx)
{ … }
void fimc_ctrls_activate(struct fimc_ctx *ctx, bool active)
{ … }
void fimc_alpha_ctrl_update(struct fimc_ctx *ctx)
{ … }
void __fimc_get_format(const struct fimc_frame *frame, struct v4l2_format *f)
{ … }
void fimc_adjust_mplane_format(const struct fimc_fmt *fmt, u32 width, u32 height,
struct v4l2_pix_format_mplane *pix)
{ … }
const struct fimc_fmt *fimc_find_format(const u32 *pixelformat,
const u32 *mbus_code,
unsigned int mask, int index)
{ … }
static void fimc_clk_put(struct fimc_dev *fimc)
{ … }
static int fimc_clk_get(struct fimc_dev *fimc)
{ … }
#ifdef CONFIG_PM
static int fimc_m2m_suspend(struct fimc_dev *fimc)
{ … }
static int fimc_m2m_resume(struct fimc_dev *fimc)
{ … }
#endif
static const struct of_device_id fimc_of_match[];
static int fimc_parse_dt(struct fimc_dev *fimc, u32 *clk_freq)
{ … }
static int fimc_probe(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM
static int fimc_runtime_resume(struct device *dev)
{ … }
static int fimc_runtime_suspend(struct device *dev)
{ … }
#endif
#ifdef CONFIG_PM_SLEEP
static int fimc_resume(struct device *dev)
{ … }
static int fimc_suspend(struct device *dev)
{ … }
#endif
static void fimc_remove(struct platform_device *pdev)
{ … }
static const struct fimc_drvdata fimc_drvdata_s5pv210 = …;
static const struct fimc_drvdata fimc_drvdata_exynos4210 = …;
static const struct fimc_drvdata fimc_drvdata_exynos4x12 = …;
static const struct of_device_id fimc_of_match[] = …;
static const struct dev_pm_ops fimc_pm_ops = …;
static struct platform_driver fimc_driver = …;
int __init fimc_register_driver(void)
{ … }
void fimc_unregister_driver(void)
{ … }