Merge tag 'io_uring-5.11-2021-01-16' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / gpu / drm / kmb / kmb_plane.h
blob486490f7a3ec55b3dc63b680ae57fa4cfd141901
1 /* SPDX-License-Identifier: GPL-2.0-only
3 * Copyright © 2018-2020 Intel Corporation
4 */
6 #ifndef __KMB_PLANE_H__
7 #define __KMB_PLANE_H__
9 #include <drm/drm_fourcc.h>
10 #include <drm/drm_plane.h>
12 #define LCD_INT_VL0_ERR ((LAYER0_DMA_FIFO_UNDERFLOW) | \
13 (LAYER0_DMA_FIFO_OVERFLOW) | \
14 (LAYER0_DMA_CB_FIFO_OVERFLOW) | \
15 (LAYER0_DMA_CB_FIFO_UNDERFLOW) | \
16 (LAYER0_DMA_CR_FIFO_OVERFLOW) | \
17 (LAYER0_DMA_CR_FIFO_UNDERFLOW))
19 #define LCD_INT_VL1_ERR ((LAYER1_DMA_FIFO_UNDERFLOW) | \
20 (LAYER1_DMA_FIFO_OVERFLOW) | \
21 (LAYER1_DMA_CB_FIFO_OVERFLOW) | \
22 (LAYER1_DMA_CB_FIFO_UNDERFLOW) | \
23 (LAYER1_DMA_CR_FIFO_OVERFLOW) | \
24 (LAYER1_DMA_CR_FIFO_UNDERFLOW))
26 #define LCD_INT_GL0_ERR (LAYER2_DMA_FIFO_OVERFLOW | LAYER2_DMA_FIFO_UNDERFLOW)
27 #define LCD_INT_GL1_ERR (LAYER3_DMA_FIFO_OVERFLOW | LAYER3_DMA_FIFO_UNDERFLOW)
28 #define LCD_INT_VL0 (LAYER0_DMA_DONE | LAYER0_DMA_IDLE | LCD_INT_VL0_ERR)
29 #define LCD_INT_VL1 (LAYER1_DMA_DONE | LAYER1_DMA_IDLE | LCD_INT_VL1_ERR)
30 #define LCD_INT_GL0 (LAYER2_DMA_DONE | LAYER2_DMA_IDLE | LCD_INT_GL0_ERR)
31 #define LCD_INT_GL1 (LAYER3_DMA_DONE | LAYER3_DMA_IDLE | LCD_INT_GL1_ERR)
32 #define LCD_INT_DMA_ERR (LCD_INT_VL0_ERR | LCD_INT_VL1_ERR \
33 | LCD_INT_GL0_ERR | LCD_INT_GL1_ERR)
35 #define POSSIBLE_CRTCS 1
36 #define to_kmb_plane(x) container_of(x, struct kmb_plane, base_plane)
38 enum layer_id {
39 LAYER_0,
40 LAYER_1,
41 LAYER_2,
42 LAYER_3,
43 /* KMB_MAX_PLANES */
46 #define KMB_MAX_PLANES 1
48 enum sub_plane_id {
49 Y_PLANE,
50 U_PLANE,
51 V_PLANE,
52 MAX_SUB_PLANES,
55 struct kmb_plane {
56 struct drm_plane base_plane;
57 unsigned char id;
60 struct layer_status {
61 bool disable;
62 u32 ctrl;
65 struct kmb_plane *kmb_plane_init(struct drm_device *drm);
66 void kmb_plane_destroy(struct drm_plane *plane);
67 #endif /* __KMB_PLANE_H__ */