hc
2023-02-17 557c24d082b6ecb9bfe5407b77ae43fa7650a5dc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
 * (C) Copyright 2008-2017 Fuzhou Rockchip Electronics Co., Ltd
 *
 * SPDX-License-Identifier:    GPL-2.0+
 */
 
#ifndef _ROCKCHIP_CRTC_H_
#define _ROCKCHIP_CRTC_H_
 
#define VOP2_MAX_VP                4
 
struct rockchip_vp {
   bool enable;
   bool xmirror_en;
   u8 bg_ovl_dly;
   u8 primary_plane_id;
   int output_type;
   u32 plane_mask;
   int cursor_plane;
};
 
struct rockchip_crtc {
   const struct rockchip_crtc_funcs *funcs;
   const void *data;
   struct drm_display_mode active_mode;
   struct rockchip_vp vps[4];
   bool hdmi_hpd : 1;
   bool active : 1;
   bool assign_plane : 1;
   bool splice_mode : 1;
   u8 splice_crtc_id;
};
 
struct rockchip_crtc_funcs {
   int (*preinit)(struct display_state *state);
   int (*init)(struct display_state *state);
   void (*deinit)(struct display_state *state);
   int (*set_plane)(struct display_state *state);
   int (*prepare)(struct display_state *state);
   int (*enable)(struct display_state *state);
   int (*disable)(struct display_state *state);
   void (*unprepare)(struct display_state *state);
   int (*fixup_dts)(struct display_state *state, void *blob);
   int (*send_mcu_cmd)(struct display_state *state, u32 type, u32 value);
   int (*check)(struct display_state *state);
   int (*mode_valid)(struct display_state *state);
   int (*plane_check)(struct display_state *state);
};
 
struct vop_data;
struct vop2_data;
extern const struct rockchip_crtc_funcs rockchip_vop_funcs;
extern const struct rockchip_crtc_funcs rockchip_vop2_funcs;
extern const struct vop_data rk3036_vop;
extern const struct vop_data px30_vop_lit;
extern const struct vop_data px30_vop_big;
extern const struct vop_data rk3308_vop;
extern const struct vop_data rk1808_vop;
extern const struct vop_data rk3288_vop_big;
extern const struct vop_data rk3288_vop_lit;
extern const struct vop_data rk3368_vop;
extern const struct vop_data rk3366_vop;
extern const struct vop_data rk3399_vop_big;
extern const struct vop_data rk3399_vop_lit;
extern const struct vop_data rk322x_vop;
extern const struct vop_data rk3328_vop;
extern const struct vop_data rv1106_vop;
extern const struct vop_data rv1108_vop;
extern const struct vop_data rv1126_vop;
extern const struct vop2_data rk3568_vop;
extern const struct vop2_data rk3588_vop;
#endif