#include <linux/clk.h>
#include <linux/component.h>
#include <linux/kernel.h>
#include <linux/mfd/syscon.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/spinlock.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_print.h>
#include <drm/exynos_drm.h>
#include "exynos_drm_drv.h"
#include "exynos_drm_ipp.h"
#include "regs-fimc.h"
#define FIMC_MAX_DEVS …
#define FIMC_MAX_SRC …
#define FIMC_MAX_DST …
#define FIMC_SHFACTOR …
#define FIMC_BUF_STOP …
#define FIMC_BUF_START …
#define FIMC_WIDTH_ITU_709 …
#define FIMC_AUTOSUSPEND_DELAY …
static unsigned int fimc_mask = …;
module_param_named(fimc_devs, fimc_mask, uint, 0644);
MODULE_PARM_DESC(…) …;
#define get_fimc_context(dev) …
enum { … };
static const char * const fimc_clock_names[] = …;
struct fimc_scaler { … };
struct fimc_context { … };
static u32 fimc_read(struct fimc_context *ctx, u32 reg)
{ … }
static void fimc_write(struct fimc_context *ctx, u32 val, u32 reg)
{ … }
static void fimc_set_bits(struct fimc_context *ctx, u32 reg, u32 bits)
{ … }
static void fimc_clear_bits(struct fimc_context *ctx, u32 reg, u32 bits)
{ … }
static void fimc_sw_reset(struct fimc_context *ctx)
{ … }
static void fimc_set_type_ctrl(struct fimc_context *ctx)
{ … }
static void fimc_handle_jpeg(struct fimc_context *ctx, bool enable)
{ … }
static void fimc_mask_irq(struct fimc_context *ctx, bool enable)
{ … }
static void fimc_clear_irq(struct fimc_context *ctx)
{ … }
static bool fimc_check_ovf(struct fimc_context *ctx)
{ … }
static bool fimc_check_frame_end(struct fimc_context *ctx)
{ … }
static int fimc_get_buf_id(struct fimc_context *ctx)
{ … }
static void fimc_handle_lastend(struct fimc_context *ctx, bool enable)
{ … }
static void fimc_src_set_fmt_order(struct fimc_context *ctx, u32 fmt)
{ … }
static void fimc_src_set_fmt(struct fimc_context *ctx, u32 fmt, bool tiled)
{ … }
static void fimc_src_set_transf(struct fimc_context *ctx, unsigned int rotation)
{ … }
static void fimc_set_window(struct fimc_context *ctx,
struct exynos_drm_ipp_buffer *buf)
{ … }
static void fimc_src_set_size(struct fimc_context *ctx,
struct exynos_drm_ipp_buffer *buf)
{ … }
static void fimc_src_set_addr(struct fimc_context *ctx,
struct exynos_drm_ipp_buffer *buf)
{ … }
static void fimc_dst_set_fmt_order(struct fimc_context *ctx, u32 fmt)
{ … }
static void fimc_dst_set_fmt(struct fimc_context *ctx, u32 fmt, bool tiled)
{ … }
static void fimc_dst_set_transf(struct fimc_context *ctx, unsigned int rotation)
{ … }
static int fimc_set_prescaler(struct fimc_context *ctx, struct fimc_scaler *sc,
struct drm_exynos_ipp_task_rect *src,
struct drm_exynos_ipp_task_rect *dst)
{ … }
static void fimc_set_scaler(struct fimc_context *ctx, struct fimc_scaler *sc)
{ … }
static void fimc_dst_set_size(struct fimc_context *ctx,
struct exynos_drm_ipp_buffer *buf)
{ … }
static void fimc_dst_set_buf_seq(struct fimc_context *ctx, u32 buf_id,
bool enqueue)
{ … }
static void fimc_dst_set_addr(struct fimc_context *ctx,
struct exynos_drm_ipp_buffer *buf)
{ … }
static void fimc_stop(struct fimc_context *ctx);
static irqreturn_t fimc_irq_handler(int irq, void *dev_id)
{ … }
static void fimc_clear_addr(struct fimc_context *ctx)
{ … }
static void fimc_reset(struct fimc_context *ctx)
{ … }
static void fimc_start(struct fimc_context *ctx)
{ … }
static void fimc_stop(struct fimc_context *ctx)
{ … }
static int fimc_commit(struct exynos_drm_ipp *ipp,
struct exynos_drm_ipp_task *task)
{ … }
static void fimc_abort(struct exynos_drm_ipp *ipp,
struct exynos_drm_ipp_task *task)
{ … }
static struct exynos_drm_ipp_funcs ipp_funcs = …;
static int fimc_bind(struct device *dev, struct device *master, void *data)
{ … }
static void fimc_unbind(struct device *dev, struct device *master,
void *data)
{ … }
static const struct component_ops fimc_component_ops = …;
static void fimc_put_clocks(struct fimc_context *ctx)
{ … }
static int fimc_setup_clocks(struct fimc_context *ctx)
{ … }
int exynos_drm_check_fimc_device(struct device *dev)
{ … }
static const unsigned int fimc_formats[] = …;
static const unsigned int fimc_tiled_formats[] = …;
static const struct drm_exynos_ipp_limit fimc_4210_limits_v1[] = …;
static const struct drm_exynos_ipp_limit fimc_4210_limits_v2[] = …;
static const struct drm_exynos_ipp_limit fimc_4210_limits_tiled_v1[] = …;
static const struct drm_exynos_ipp_limit fimc_4210_limits_tiled_v2[] = …;
static int fimc_probe(struct platform_device *pdev)
{ … }
static void fimc_remove(struct platform_device *pdev)
{ … }
static int fimc_runtime_suspend(struct device *dev)
{ … }
static int fimc_runtime_resume(struct device *dev)
{ … }
static DEFINE_RUNTIME_DEV_PM_OPS(fimc_pm_ops, fimc_runtime_suspend,
fimc_runtime_resume, NULL);
static const struct of_device_id fimc_of_match[] = …;
MODULE_DEVICE_TABLE(of, fimc_of_match);
struct platform_driver fimc_driver = …;