xref: /rk3399_rockchip-uboot/drivers/video/drm/rockchip_panel.h (revision 785b4fbf6c5db1eb4c0ddf983292d7ab077c4212)
1 /*
2  * (C) Copyright 2008-2017 Fuzhou Rockchip Electronics Co., Ltd
3  *
4  * SPDX-License-Identifier:	GPL-2.0+
5  */
6 
7 #ifndef _ROCKCHIP_PANEL_H_
8 #define _ROCKCHIP_PANEL_H_
9 
10 struct rockchip_panel_funcs {
11 	int (*init)(struct display_state *state);
12 	void (*deinit)(struct display_state *state);
13 	int (*prepare)(struct display_state *state);
14 	int (*unprepare)(struct display_state *state);
15 	int (*enable)(struct display_state *state);
16 	int (*disable)(struct display_state *state);
17 };
18 
19 struct rockchip_panel {
20 	const struct rockchip_panel_funcs *funcs;
21 	const void *data;
22 };
23 
24 const struct rockchip_panel *rockchip_get_panel(const void *blob, int node);
25 const struct drm_display_mode *
26 rockchip_get_display_mode_from_panel(struct display_state *state);
27 int rockchip_panel_init(struct display_state *state);
28 void rockchip_panel_deinit(struct display_state *state);
29 int rockchip_panel_enable(struct display_state *state);
30 int rockchip_panel_disable(struct display_state *state);
31 int rockchip_panel_prepare(struct display_state *state);
32 int rockchip_panel_unprepare(struct display_state *state);
33 
34 #ifdef CONFIG_DRM_ROCKCHIP_PANEL
35 extern const struct rockchip_panel_funcs panel_simple_funcs;
36 #endif
37 #ifdef CONFIG_DRM_ROCKCHIP_DSI_PANEL
38 extern const struct rockchip_panel_funcs rockchip_dsi_panel_funcs;
39 #endif
40 #endif	/* _ROCKCHIP_PANEL_H_ */
41