dt-bindings: mtd: ingenic: Use standard ecc-engine property
[linux/fpc-iii.git] / drivers / gpu / drm / sun4i / sun8i_csc.h
blob880e8fbb08556871424ab785a3c260416196a791
1 /*
2 * Copyright (C) Jernej Skrabec <jernej.skrabec@siol.net>
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of
7 * the License, or (at your option) any later version.
8 */
10 #ifndef _SUN8I_CSC_H_
11 #define _SUN8I_CSC_H_
13 struct sun8i_mixer;
15 /* VI channel CSC units offsets */
16 #define CCSC00_OFFSET 0xAA050
17 #define CCSC01_OFFSET 0xFA000
18 #define CCSC10_OFFSET 0xA0000
19 #define CCSC11_OFFSET 0xF0000
21 #define SUN8I_CSC_CTRL(base) (base + 0x0)
22 #define SUN8I_CSC_COEFF(base, i) (base + 0x10 + 4 * i)
24 #define SUN8I_CSC_CTRL_EN BIT(0)
26 enum sun8i_csc_mode {
27 SUN8I_CSC_MODE_OFF,
28 SUN8I_CSC_MODE_YUV2RGB,
29 SUN8I_CSC_MODE_YVU2RGB,
32 void sun8i_csc_set_ccsc_coefficients(struct sun8i_mixer *mixer, int layer,
33 enum sun8i_csc_mode mode);
34 void sun8i_csc_enable_ccsc(struct sun8i_mixer *mixer, int layer, bool enable);
36 #endif