aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drm_fb_helper.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/drm/drm_fb_helper.h')
-rw-r--r--include/drm/drm_fb_helper.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index 88fffbdfa26f..58c892a2cbfa 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -35,9 +35,30 @@ struct drm_fb_helper_crtc {
35 struct drm_mode_set mode_set; 35 struct drm_mode_set mode_set;
36}; 36};
37 37
38
38struct drm_fb_helper_funcs { 39struct drm_fb_helper_funcs {
39 void (*gamma_set)(struct drm_crtc *crtc, u16 red, u16 green, 40 void (*gamma_set)(struct drm_crtc *crtc, u16 red, u16 green,
40 u16 blue, int regno); 41 u16 blue, int regno);
42 void (*gamma_get)(struct drm_crtc *crtc, u16 *red, u16 *green,
43 u16 *blue, int regno);
44};
45
46/* mode specified on the command line */
47struct drm_fb_helper_cmdline_mode {
48 bool specified;
49 bool refresh_specified;
50 bool bpp_specified;
51 int xres, yres;
52 int bpp;
53 int refresh;
54 bool rb;
55 bool interlace;
56 bool cvt;
57 bool margins;
58};
59
60struct drm_fb_helper_connector {
61 struct drm_fb_helper_cmdline_mode cmdline_mode;
41}; 62};
42 63
43struct drm_fb_helper { 64struct drm_fb_helper {
@@ -52,11 +73,14 @@ struct drm_fb_helper {
52}; 73};
53 74
54int drm_fb_helper_single_fb_probe(struct drm_device *dev, 75int drm_fb_helper_single_fb_probe(struct drm_device *dev,
76 int preferred_bpp,
55 int (*fb_create)(struct drm_device *dev, 77 int (*fb_create)(struct drm_device *dev,
56 uint32_t fb_width, 78 uint32_t fb_width,
57 uint32_t fb_height, 79 uint32_t fb_height,
58 uint32_t surface_width, 80 uint32_t surface_width,
59 uint32_t surface_height, 81 uint32_t surface_height,
82 uint32_t surface_depth,
83 uint32_t surface_bpp,
60 struct drm_framebuffer **fb_ptr)); 84 struct drm_framebuffer **fb_ptr));
61int drm_fb_helper_init_crtc_count(struct drm_fb_helper *helper, int crtc_count, 85int drm_fb_helper_init_crtc_count(struct drm_fb_helper *helper, int crtc_count,
62 int max_conn); 86 int max_conn);
@@ -77,6 +101,11 @@ int drm_fb_helper_setcolreg(unsigned regno,
77void drm_fb_helper_restore(void); 101void drm_fb_helper_restore(void);
78void drm_fb_helper_fill_var(struct fb_info *info, struct drm_framebuffer *fb, 102void drm_fb_helper_fill_var(struct fb_info *info, struct drm_framebuffer *fb,
79 uint32_t fb_width, uint32_t fb_height); 103 uint32_t fb_width, uint32_t fb_height);
80void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch); 104void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
105 uint32_t depth);
106
107int drm_fb_helper_add_connector(struct drm_connector *connector);
108int drm_fb_helper_parse_command_line(struct drm_device *dev);
109int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info);
81 110
82#endif 111#endif