.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2016 BayLibre, SAS |
---|
3 | 4 | * Author: Neil Armstrong <narmstrong@baylibre.com> |
---|
4 | | - * |
---|
5 | | - * This program is free software; you can redistribute it and/or |
---|
6 | | - * modify it under the terms of the GNU General Public License as |
---|
7 | | - * published by the Free Software Foundation; either version 2 of the |
---|
8 | | - * License, or (at your option) any later version. |
---|
9 | | - * |
---|
10 | | - * This program is distributed in the hope that it will be useful, but |
---|
11 | | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
13 | | - * General Public License for more details. |
---|
14 | | - * |
---|
15 | | - * You should have received a copy of the GNU General Public License |
---|
16 | | - * along with this program; if not, see <http://www.gnu.org/licenses/>. |
---|
17 | 5 | */ |
---|
18 | 6 | |
---|
19 | 7 | /* Video Input Unit */ |
---|
.. | .. |
---|
22 | 10 | #define __MESON_VIU_H |
---|
23 | 11 | |
---|
24 | 12 | /* OSDx_BLKx_CFG */ |
---|
| 13 | +#define OSD_MALI_SRC_EN BIT(30) |
---|
| 14 | + |
---|
25 | 15 | #define OSD_CANVAS_SEL 16 |
---|
26 | 16 | |
---|
27 | 17 | #define OSD_ENDIANNESS_LE BIT(15) |
---|
.. | .. |
---|
45 | 35 | #define OSD_COLOR_MATRIX_16_RGB655 (0x00 << 2) |
---|
46 | 36 | #define OSD_COLOR_MATRIX_16_RGB565 (0x04 << 2) |
---|
47 | 37 | |
---|
| 38 | +#define OSD_MALI_COLOR_MODE_R8 (0 << 8) |
---|
| 39 | +#define OSD_MALI_COLOR_MODE_YUV422 (1 << 8) |
---|
| 40 | +#define OSD_MALI_COLOR_MODE_RGB565 (2 << 8) |
---|
| 41 | +#define OSD_MALI_COLOR_MODE_RGBA5551 (3 << 8) |
---|
| 42 | +#define OSD_MALI_COLOR_MODE_RGBA4444 (4 << 8) |
---|
| 43 | +#define OSD_MALI_COLOR_MODE_RGBA8888 (5 << 8) |
---|
| 44 | +#define OSD_MALI_COLOR_MODE_RGB888 (7 << 8) |
---|
| 45 | +#define OSD_MALI_COLOR_MODE_YUV422_10B (8 << 8) |
---|
| 46 | +#define OSD_MALI_COLOR_MODE_RGBA1010102 (9 << 8) |
---|
| 47 | + |
---|
48 | 48 | #define OSD_INTERLACE_ENABLED BIT(1) |
---|
49 | 49 | #define OSD_INTERLACE_ODD BIT(0) |
---|
50 | 50 | #define OSD_INTERLACE_EVEN (0) |
---|
51 | 51 | |
---|
52 | 52 | /* OSDx_CTRL_STAT */ |
---|
53 | 53 | #define OSD_ENABLE BIT(21) |
---|
| 54 | +#define OSD_MEM_LINEAR_ADDR BIT(2) |
---|
54 | 55 | #define OSD_BLK0_ENABLE BIT(0) |
---|
55 | 56 | |
---|
56 | 57 | #define OSD_GLOBAL_ALPHA_SHIFT 12 |
---|
57 | 58 | |
---|
58 | 59 | /* OSDx_CTRL_STAT2 */ |
---|
| 60 | +#define OSD_DPATH_MALI_AFBCD BIT(15) |
---|
59 | 61 | #define OSD_REPLACE_EN BIT(14) |
---|
60 | 62 | #define OSD_REPLACE_SHIFT 6 |
---|
| 63 | +#define OSD_PENDING_STAT_CLEAN BIT(1) |
---|
61 | 64 | |
---|
| 65 | +void meson_viu_osd1_reset(struct meson_drm *priv); |
---|
| 66 | +void meson_viu_g12a_enable_osd1_afbc(struct meson_drm *priv); |
---|
| 67 | +void meson_viu_g12a_disable_osd1_afbc(struct meson_drm *priv); |
---|
| 68 | +void meson_viu_gxm_enable_osd1_afbc(struct meson_drm *priv); |
---|
| 69 | +void meson_viu_gxm_disable_osd1_afbc(struct meson_drm *priv); |
---|
62 | 70 | void meson_viu_init(struct meson_drm *priv); |
---|
63 | 71 | |
---|
64 | 72 | #endif /* __MESON_VIU_H */ |
---|