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 #ifndef __MDFLD_DSI_DPI_H__
29 #define __MDFLD_DSI_DPI_H__
30
31 #include "mdfld_dsi_output.h"
32 #include "mdfld_output.h"
33
34 struct mdfld_dsi_dpi_timing {
35 u16 hsync_count;
36 u16 hbp_count;
37 u16 hfp_count;
38 u16 hactive_count;
39 u16 vsync_count;
40 u16 vbp_count;
41 u16 vfp_count;
42 };
43
44 struct mdfld_dsi_dpi_output {
45 struct mdfld_dsi_encoder base;
46 struct drm_device *dev;
47
48 int panel_on;
49 int first_boot;
50
51 const struct panel_funcs *p_funcs;
52 };
53
54 #define MDFLD_DSI_DPI_OUTPUT(dsi_encoder)\
55 container_of(dsi_encoder, struct mdfld_dsi_dpi_output, base)
56
57
58 extern int mdfld_dsi_dpi_timing_calculation(struct drm_display_mode *mode,
59 struct mdfld_dsi_dpi_timing *dpi_timing,
60 int num_lane, int bpp);
61 extern struct mdfld_dsi_encoder *mdfld_dsi_dpi_init(struct drm_device *dev,
62 struct mdfld_dsi_connector *dsi_connector,
63 const struct panel_funcs *p_funcs);
64
65
66 extern void mdfld_dsi_dpi_dpms(struct drm_encoder *encoder, int mode);
67 extern bool mdfld_dsi_dpi_mode_fixup(struct drm_encoder *encoder,
68 const struct drm_display_mode *mode,
69 struct drm_display_mode *adjusted_mode);
70 extern void mdfld_dsi_dpi_prepare(struct drm_encoder *encoder);
71 extern void mdfld_dsi_dpi_commit(struct drm_encoder *encoder);
72 extern void mdfld_dsi_dpi_mode_set(struct drm_encoder *encoder,
73 struct drm_display_mode *mode,
74 struct drm_display_mode *adjusted_mode);
75 extern void mdfld_dsi_dpi_turn_on(struct mdfld_dsi_dpi_output *output,
76 int pipe);
77 extern void mdfld_dsi_dpi_controller_init(struct mdfld_dsi_config *dsi_config,
78 int pipe);
79 #endif