| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * 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. |
|---|
| 8 | 4 | */ |
|---|
| 9 | 5 | |
|---|
| 10 | 6 | #ifndef _SUN8I_CSC_H_ |
|---|
| 11 | 7 | #define _SUN8I_CSC_H_ |
|---|
| 8 | + |
|---|
| 9 | +#include <drm/drm_color_mgmt.h> |
|---|
| 12 | 10 | |
|---|
| 13 | 11 | struct sun8i_mixer; |
|---|
| 14 | 12 | |
|---|
| .. | .. |
|---|
| 18 | 16 | #define CCSC10_OFFSET 0xA0000 |
|---|
| 19 | 17 | #define CCSC11_OFFSET 0xF0000 |
|---|
| 20 | 18 | |
|---|
| 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)) |
|---|
| 23 | 21 | |
|---|
| 24 | 22 | #define SUN8I_CSC_CTRL_EN BIT(0) |
|---|
| 25 | 23 | |
|---|
| .. | .. |
|---|
| 30 | 28 | }; |
|---|
| 31 | 29 | |
|---|
| 32 | 30 | 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); |
|---|
| 34 | 34 | void sun8i_csc_enable_ccsc(struct sun8i_mixer *mixer, int layer, bool enable); |
|---|
| 35 | 35 | |
|---|
| 36 | 36 | #endif |
|---|