linux/drivers/media/platform/samsung/exynos4-is/fimc-core.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Samsung S5P/EXYNOS4 SoC series FIMC (CAMIF) driver
 *
 * Copyright (C) 2010-2012 Samsung Electronics Co., Ltd.
 * Sylwester Nawrocki <[email protected]>
 */

#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)
{}

/* The color format (colplanes, memplanes) must be already configured. */
int fimc_prepare_addr(struct fimc_ctx *ctx, struct vb2_buffer *vb,
		      const struct fimc_frame *frame, struct fimc_addr *addr)
{}

/* Set order for 1 and 2 plane YCBCR 4:2:2 formats. */
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)
{}

/*
 * V4L2 controls handling
 */
#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)
{}

/* Update maximum value of the alpha color control */
void fimc_alpha_ctrl_update(struct fimc_ctx *ctx)
{}

void __fimc_get_format(const struct fimc_frame *frame, struct v4l2_format *f)
{}

/**
 * fimc_adjust_mplane_format - adjust bytesperline/sizeimage for each plane
 * @fmt: fimc pixel format description (input)
 * @width: requested pixel width
 * @height: requested pixel height
 * @pix: multi-plane format to adjust
 */
void fimc_adjust_mplane_format(const struct fimc_fmt *fmt, u32 width, u32 height,
			       struct v4l2_pix_format_mplane *pix)
{}

/**
 * fimc_find_format - lookup fimc color format by fourcc or media bus format
 * @pixelformat: fourcc to match, ignored if null
 * @mbus_code: media bus code to match, ignored if null
 * @mask: the color flags to match
 * @index: offset in the fimc_formats array, ignored if negative
 */
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 /* CONFIG_PM */

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 /* CONFIG_PM_SLEEP */

static void fimc_remove(struct platform_device *pdev)
{}

/* S5PV210, S5PC110 */
static const struct fimc_drvdata fimc_drvdata_s5pv210 =;

/* EXYNOS4210, S5PV310, S5PC210 */
static const struct fimc_drvdata fimc_drvdata_exynos4210 =;

/* EXYNOS4212, EXYNOS4412 */
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)
{}