perf tools: Don't clone maps from parent when synthesizing forks
[linux/fpc-iii.git] / drivers / media / platform / ti-vpe / csc.h
blob024700b15152b8480b40d54d507230d616eba8be
1 /*
2 * Copyright (c) 2013 Texas Instruments Inc.
4 * David Griego, <dagriego@biglakesoftware.com>
5 * Dale Farnsworth, <dale@farnsworth.org>
6 * Archit Taneja, <archit@ti.com>
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 2 as published by
10 * the Free Software Foundation.
12 #ifndef TI_CSC_H
13 #define TI_CSC_H
15 /* VPE color space converter regs */
16 #define CSC_CSC00 0x00
17 #define CSC_A0_MASK 0x1fff
18 #define CSC_A0_SHIFT 0
19 #define CSC_B0_MASK 0x1fff
20 #define CSC_B0_SHIFT 16
22 #define CSC_CSC01 0x04
23 #define CSC_C0_MASK 0x1fff
24 #define CSC_C0_SHIFT 0
25 #define CSC_A1_MASK 0x1fff
26 #define CSC_A1_SHIFT 16
28 #define CSC_CSC02 0x08
29 #define CSC_B1_MASK 0x1fff
30 #define CSC_B1_SHIFT 0
31 #define CSC_C1_MASK 0x1fff
32 #define CSC_C1_SHIFT 16
34 #define CSC_CSC03 0x0c
35 #define CSC_A2_MASK 0x1fff
36 #define CSC_A2_SHIFT 0
37 #define CSC_B2_MASK 0x1fff
38 #define CSC_B2_SHIFT 16
40 #define CSC_CSC04 0x10
41 #define CSC_C2_MASK 0x1fff
42 #define CSC_C2_SHIFT 0
43 #define CSC_D0_MASK 0x0fff
44 #define CSC_D0_SHIFT 16
46 #define CSC_CSC05 0x14
47 #define CSC_D1_MASK 0x0fff
48 #define CSC_D1_SHIFT 0
49 #define CSC_D2_MASK 0x0fff
50 #define CSC_D2_SHIFT 16
52 #define CSC_BYPASS (1 << 28)
54 struct csc_data {
55 void __iomem *base;
56 struct resource *res;
58 struct platform_device *pdev;
61 void csc_dump_regs(struct csc_data *csc);
62 void csc_set_coeff_bypass(struct csc_data *csc, u32 *csc_reg5);
63 void csc_set_coeff(struct csc_data *csc, u32 *csc_reg0,
64 enum v4l2_colorspace src_colorspace,
65 enum v4l2_colorspace dst_colorspace);
66 struct csc_data *csc_create(struct platform_device *pdev, const char *res_name);
68 #endif