forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/gpu/drm/sun4i/sun8i_csc.h
....@@ -1,14 +1,12 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Copyright (C) Jernej Skrabec <jernej.skrabec@siol.net>
3
- *
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.
84 */
95
106 #ifndef _SUN8I_CSC_H_
117 #define _SUN8I_CSC_H_
8
+
9
+#include <drm/drm_color_mgmt.h>
1210
1311 struct sun8i_mixer;
1412
....@@ -18,8 +16,8 @@
1816 #define CCSC10_OFFSET 0xA0000
1917 #define CCSC11_OFFSET 0xF0000
2018
21
-#define SUN8I_CSC_CTRL(base) (base + 0x0)
22
-#define SUN8I_CSC_COEFF(base, i) (base + 0x10 + 4 * i)
19
+#define SUN8I_CSC_CTRL(base) ((base) + 0x0)
20
+#define SUN8I_CSC_COEFF(base, i) ((base) + 0x10 + 4 * (i))
2321
2422 #define SUN8I_CSC_CTRL_EN BIT(0)
2523
....@@ -30,7 +28,9 @@
3028 };
3129
3230 void sun8i_csc_set_ccsc_coefficients(struct sun8i_mixer *mixer, int layer,
33
- enum sun8i_csc_mode mode);
31
+ enum sun8i_csc_mode mode,
32
+ enum drm_color_encoding encoding,
33
+ enum drm_color_range range);
3434 void sun8i_csc_enable_ccsc(struct sun8i_mixer *mixer, int layer, bool enable);
3535
3636 #endif