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_OUTPUT_H
29#define MDFLD_OUTPUT_H
30
31#include "psb_drv.h"
32
33#define TPO_PANEL_WIDTH 84
34#define TPO_PANEL_HEIGHT 46
35#define TMD_PANEL_WIDTH 39
36#define TMD_PANEL_HEIGHT 71
37
38struct mdfld_dsi_config;
39
40enum panel_type {
41 TPO_VID,
42 TMD_VID,
43 HDMI,
44 TC35876X,
45};
46
47struct panel_info {
48 u32 width_mm;
49 u32 height_mm;
50
51};
52
53struct panel_funcs {
54 const struct drm_encoder_funcs *encoder_funcs;
55 const struct drm_encoder_helper_funcs *encoder_helper_funcs;
56 struct drm_display_mode * (*get_config_mode)(struct drm_device *);
57 int (*get_panel_info)(struct drm_device *, int, struct panel_info *);
58 int (*reset)(int pipe);
59 void (*drv_ic_init)(struct mdfld_dsi_config *dsi_config, int pipe);
60};
61
62int mdfld_output_init(struct drm_device *dev);
63
64struct backlight_device *mdfld_get_backlight_device(void);
65int mdfld_set_brightness(struct backlight_device *bd);
66
67int mdfld_get_panel_type(struct drm_device *dev, int pipe);
68
69extern const struct drm_crtc_helper_funcs mdfld_helper_funcs;
70
71extern const struct panel_funcs mdfld_tmd_vid_funcs;
72extern const struct panel_funcs mdfld_tpo_vid_funcs;
73
74extern void mdfld_disable_crtc(struct drm_device *dev, int pipe);
75extern void mdfldWaitForPipeEnable(struct drm_device *dev, int pipe);
76extern void mdfldWaitForPipeDisable(struct drm_device *dev, int pipe);
77#endif
78