blob: 6896ba769c3a21cdca1195910525c90f8d6bde8f [file] [log] [blame]
Gopikrishnaiah Anandanfbf75392017-01-16 10:43:36 -08001/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12#ifndef _SDE_HW_COLOR_PROC_COMMON_V4_H_
13#define _SDE_HW_COLOR_PROC_COMMON_V4_H_
14
15#define GAMUT_TABLE_SEL_OFF 0x4
Gopikrishnaiah Anandanfbf75392017-01-16 10:43:36 -080016#define GAMUT_UPPER_COLOR_OFF 0x8
Ping Lic057d9d2017-07-20 13:41:52 -070017#define GAMUT_LOWER_COLOR_OFF 0xc
18#define GAMUT_SCALEA_OFFSET_OFF 0x10
19#define GAMUT_SCALEB_OFFSET_OFF 0xe0
Gopikrishnaiah Anandanfbf75392017-01-16 10:43:36 -080020#define GAMUT_TABLE0_SEL BIT(12)
21#define GAMUT_MAP_EN BIT(1)
22#define GAMUT_EN BIT(0)
23#define GAMUT_MODE_13B_OFF 640
Gopikrishnaiah Anandan8b1498a2017-05-10 16:58:04 -070024#define GAMUT_MODE_5_OFF 1248
Gopikrishnaiah Anandanfbf75392017-01-16 10:43:36 -080025
26enum {
27 gamut_mode_17 = 0,
28 gamut_mode_5,
29 gamut_mode_13a,
30 gamut_mode_13b,
31};
32
33#define GC_C0_OFF 0x4
34#define GC_C0_INDEX_OFF 0x8
35#define GC_8B_ROUND_EN BIT(1)
36#define GC_EN BIT(0)
37#define GC_TBL_NUM 3
38#define GC_LUT_SWAP_OFF 0x1c
39
Rajesh Yadavec93afb2017-06-08 19:28:33 +053040#define IGC_TBL_NUM 3
41#define IGC_DITHER_OFF 0x7e0
42#define IGC_OPMODE_OFF 0x0
43#define IGC_C0_OFF 0x0
44#define IGC_DATA_MASK (BIT(12) - 1)
45#define IGC_DSPP_SEL_MASK_MAX (BIT(4) - 1)
46#define IGC_DSPP_SEL_MASK(n) \
47 ((IGC_DSPP_SEL_MASK_MAX & ~(1 << (n))) << 28)
48#define IGC_INDEX_UPDATE BIT(25)
49#define IGC_EN BIT(0)
50#define IGC_DIS 0
51#define IGC_DITHER_DATA_MASK (BIT(4) - 1)
52
Rajesh Yadavd490cb62017-07-04 13:20:42 +053053#define PCC_NUM_PLANES 3
54#define PCC_NUM_COEFF 11
55#define PCC_EN BIT(0)
56#define PCC_DIS 0
57#define PCC_C_OFF 0x4
Rajesh Yadav1db632f2017-07-05 20:36:37 +053058#define PCC_R_OFF 0x10
59#define PCC_G_OFF 0x1c
60#define PCC_B_OFF 0x28
61#define PCC_RG_OFF 0x34
62#define PCC_RB_OFF 0x40
63#define PCC_GB_OFF 0x4c
64#define PCC_RGB_OFF 0x58
65#define PCC_RR_OFF 0x64
66#define PCC_GG_OFF 0x70
67#define PCC_BB_OFF 0x7c
Rajesh Yadavd490cb62017-07-04 13:20:42 +053068
Gopikrishnaiah Anandanfbf75392017-01-16 10:43:36 -080069#endif /* _SDE_HW_COLOR_PROC_COMMON_V4_H_ */