brintos

brintos / linux-shallow public Read only

0
0
Text · 1.5 KiB · af2e86b Raw
66 lines · c
1/* SPDX-License-Identifier: GPL-2.0-only */2/*3 * Copyright (c) 2013 Texas Instruments Inc.4 *5 * David Griego, <dagriego@biglakesoftware.com>6 * Dale Farnsworth, <dale@farnsworth.org>7 * Archit Taneja, <archit@ti.com>8 */9#ifndef TI_CSC_H10#define TI_CSC_H11 12/* VPE color space converter regs */13#define CSC_CSC00		0x0014#define CSC_A0_MASK		0x1fff15#define CSC_A0_SHIFT		016#define CSC_B0_MASK		0x1fff17#define CSC_B0_SHIFT		1618 19#define CSC_CSC01		0x0420#define CSC_C0_MASK		0x1fff21#define CSC_C0_SHIFT		022#define CSC_A1_MASK		0x1fff23#define CSC_A1_SHIFT		1624 25#define CSC_CSC02		0x0826#define CSC_B1_MASK		0x1fff27#define CSC_B1_SHIFT		028#define CSC_C1_MASK		0x1fff29#define CSC_C1_SHIFT		1630 31#define CSC_CSC03		0x0c32#define CSC_A2_MASK		0x1fff33#define CSC_A2_SHIFT		034#define CSC_B2_MASK		0x1fff35#define CSC_B2_SHIFT		1636 37#define CSC_CSC04		0x1038#define CSC_C2_MASK		0x1fff39#define CSC_C2_SHIFT		040#define CSC_D0_MASK		0x0fff41#define CSC_D0_SHIFT		1642 43#define CSC_CSC05		0x1444#define CSC_D1_MASK		0x0fff45#define CSC_D1_SHIFT		046#define CSC_D2_MASK		0x0fff47#define CSC_D2_SHIFT		1648 49#define CSC_BYPASS		(1 << 28)50 51struct csc_data {52	void __iomem		*base;53	struct resource		*res;54 55	struct platform_device	*pdev;56};57 58void csc_dump_regs(struct csc_data *csc);59void csc_set_coeff_bypass(struct csc_data *csc, u32 *csc_reg5);60void csc_set_coeff(struct csc_data *csc, u32 *csc_reg0,61		   struct v4l2_format *src_fmt, struct v4l2_format *dst_fmt);62 63struct csc_data *csc_create(struct platform_device *pdev, const char *res_name);64 65#endif66