Rev 3031 | Rev 3747 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3031 | Rev 3391 | ||
---|---|---|---|
Line 45... | Line 45... | ||
45 | u32 surface_height; |
45 | u32 surface_height; |
46 | u32 surface_bpp; |
46 | u32 surface_bpp; |
47 | u32 surface_depth; |
47 | u32 surface_depth; |
48 | }; |
48 | }; |
Line -... | Line 49... | ||
- | 49 | ||
- | 50 | /** |
|
- | 51 | * struct drm_fb_helper_funcs - driver callbacks for the fbdev emulation library |
|
- | 52 | * @gamma_set: - Set the given gamma lut register on the given crtc. |
|
- | 53 | * @gamma_get: - Read the given gamma lut register on the given crtc, used to |
|
- | 54 | * save the current lut when force-restoring the fbdev for e.g. |
|
- | 55 | * kdbg. |
|
- | 56 | * @fb_probe: - Driver callback to allocate and initialize the fbdev info |
|
- | 57 | * structure. Futhermore it also needs to allocate the drm |
|
- | 58 | * framebuffer used to back the fbdev. |
|
- | 59 | * |
|
- | 60 | * Driver callbacks used by the fbdev emulation helper library. |
|
49 | 61 | */ |
|
50 | struct drm_fb_helper_funcs { |
62 | struct drm_fb_helper_funcs { |
51 | void (*gamma_set)(struct drm_crtc *crtc, u16 red, u16 green, |
63 | void (*gamma_set)(struct drm_crtc *crtc, u16 red, u16 green, |
52 | u16 blue, int regno); |
64 | u16 blue, int regno); |
53 | void (*gamma_get)(struct drm_crtc *crtc, u16 *red, u16 *green, |
65 | void (*gamma_get)(struct drm_crtc *crtc, u16 *red, u16 *green, |
Line 62... | Line 74... | ||
62 | struct drm_cmdline_mode cmdline_mode; |
74 | struct drm_cmdline_mode cmdline_mode; |
63 | }; |
75 | }; |
Line 64... | Line 76... | ||
64 | 76 | ||
65 | struct drm_fb_helper { |
77 | struct drm_fb_helper { |
66 | struct drm_framebuffer *fb; |
- | |
67 | struct drm_framebuffer *saved_fb; |
78 | struct drm_framebuffer *fb; |
68 | struct drm_device *dev; |
- | |
69 | struct drm_display_mode *mode; |
79 | struct drm_device *dev; |
70 | int crtc_count; |
80 | int crtc_count; |
71 | struct drm_fb_helper_crtc *crtc_info; |
81 | struct drm_fb_helper_crtc *crtc_info; |
72 | int connector_count; |
82 | int connector_count; |
73 | struct drm_fb_helper_connector **connector_info; |
83 | struct drm_fb_helper_connector **connector_info; |
Line 79... | Line 89... | ||
79 | /* we got a hotplug but fbdev wasn't running the console |
89 | /* we got a hotplug but fbdev wasn't running the console |
80 | delay until next set_par */ |
90 | delay until next set_par */ |
81 | bool delayed_hotplug; |
91 | bool delayed_hotplug; |
82 | }; |
92 | }; |
Line 83... | Line -... | ||
83 | - | ||
84 | int drm_fb_helper_single_fb_probe(struct drm_fb_helper *helper, |
- | |
85 | int preferred_bpp); |
- | |
86 | 93 | ||
87 | int drm_fb_helper_init(struct drm_device *dev, |
94 | int drm_fb_helper_init(struct drm_device *dev, |
88 | struct drm_fb_helper *helper, int crtc_count, |
95 | struct drm_fb_helper *helper, int crtc_count, |
89 | int max_conn); |
96 | int max_conn); |
90 | void drm_fb_helper_fini(struct drm_fb_helper *helper); |
97 | void drm_fb_helper_fini(struct drm_fb_helper *helper); |
Line 100... | Line 107... | ||
100 | unsigned blue, |
107 | unsigned blue, |
101 | unsigned transp, |
108 | unsigned transp, |
102 | struct fb_info *info); |
109 | struct fb_info *info); |
Line 103... | Line 110... | ||
103 | 110 | ||
104 | bool drm_fb_helper_restore_fbdev_mode(struct drm_fb_helper *fb_helper); |
- | |
105 | void drm_fb_helper_restore(void); |
111 | bool drm_fb_helper_restore_fbdev_mode(struct drm_fb_helper *fb_helper); |
106 | void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper, |
112 | void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper, |
107 | uint32_t fb_width, uint32_t fb_height); |
113 | uint32_t fb_width, uint32_t fb_height); |
108 | void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch, |
114 | void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch, |