Subversion Repositories Kolibri OS

Rev

Rev 3747 | Rev 5270 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3747 Rev 5056
Line 30... Line 30...
30
#ifndef DRM_FB_HELPER_H
30
#ifndef DRM_FB_HELPER_H
31
#define DRM_FB_HELPER_H
31
#define DRM_FB_HELPER_H
Line 32... Line 32...
32
 
32
 
Line -... Line 33...
-
 
33
struct drm_fb_helper;
Line 33... Line 34...
33
struct drm_fb_helper;
34
 
34
 
35
#include 
35
 
36
 
36
struct drm_fb_helper_crtc {
37
struct drm_fb_helper_crtc {
Line 52... Line 53...
52
 * @gamma_set: Set the given gamma lut register on the given crtc.
53
 * @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
 * @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
 * 		 save the current lut when force-restoring the fbdev for e.g.
55
 * 		 kdbg.
56
 * 		 kdbg.
56
 * @fb_probe: Driver callback to allocate and initialize the fbdev info
57
 * @fb_probe: Driver callback to allocate and initialize the fbdev info
57
 * 		structure. Futhermore it also needs to allocate the drm
58
 *            structure. Furthermore it also needs to allocate the drm
58
 * 		framebuffer used to back the fbdev.
59
 * 		framebuffer used to back the fbdev.
59
 * @initial_config: Setup an initial fbdev display configuration
60
 * @initial_config: Setup an initial fbdev display configuration
60
 *
61
 *
61
 * Driver callbacks used by the fbdev emulation helper library.
62
 * Driver callbacks used by the fbdev emulation helper library.
62
 */
63
 */
Line 83... Line 84...
83
	struct drm_framebuffer *fb;
84
	struct drm_framebuffer *fb;
84
	struct drm_device *dev;
85
	struct drm_device *dev;
85
	int crtc_count;
86
	int crtc_count;
86
	struct drm_fb_helper_crtc *crtc_info;
87
	struct drm_fb_helper_crtc *crtc_info;
87
	int connector_count;
88
	int connector_count;
-
 
89
	int connector_info_alloc_count;
88
	struct drm_fb_helper_connector **connector_info;
90
	struct drm_fb_helper_connector **connector_info;
89
	struct drm_fb_helper_funcs *funcs;
91
	const struct drm_fb_helper_funcs *funcs;
90
	struct fb_info *fbdev;
92
	struct fb_info *fbdev;
91
	u32 pseudo_palette[17];
93
	u32 pseudo_palette[17];
92
	struct list_head kernel_fb_list;
94
	struct list_head kernel_fb_list;
Line 93... Line 95...
93
 
95
 
94
	/* we got a hotplug but fbdev wasn't running the console
96
	/* we got a hotplug but fbdev wasn't running the console
95
	   delay until next set_par */
97
	   delay until next set_par */
96
	bool delayed_hotplug;
98
	bool delayed_hotplug;
Line -... Line 99...
-
 
99
};
-
 
100
 
97
};
101
void drm_fb_helper_prepare(struct drm_device *dev, struct drm_fb_helper *helper,
98
 
102
			   const struct drm_fb_helper_funcs *funcs);
99
int drm_fb_helper_init(struct drm_device *dev,
103
int drm_fb_helper_init(struct drm_device *dev,
100
		       struct drm_fb_helper *helper, int crtc_count,
104
		       struct drm_fb_helper *helper, int crtc_count,
101
				  int max_conn);
105
				  int max_conn);
Line 105... Line 109...
105
			      struct fb_info *info);
109
			      struct fb_info *info);
106
int drm_fb_helper_set_par(struct fb_info *info);
110
int drm_fb_helper_set_par(struct fb_info *info);
107
int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
111
int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
108
			    struct fb_info *info);
112
			    struct fb_info *info);
Line 109... Line 113...
109
 
113
 
110
bool drm_fb_helper_restore_fbdev_mode(struct drm_fb_helper *fb_helper);
114
bool drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper);
111
void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper,
115
void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper,
112
			    uint32_t fb_width, uint32_t fb_height);
116
			    uint32_t fb_width, uint32_t fb_height);
113
void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
117
void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
Line 118... Line 122...
118
int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper);
122
int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper);
119
bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel);
123
bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel);
120
int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper);
124
int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper);
121
int drm_fb_helper_debug_enter(struct fb_info *info);
125
int drm_fb_helper_debug_enter(struct fb_info *info);
122
int drm_fb_helper_debug_leave(struct fb_info *info);
126
int drm_fb_helper_debug_leave(struct fb_info *info);
-
 
127
struct drm_display_mode *
-
 
128
drm_has_preferred_mode(struct drm_fb_helper_connector *fb_connector,
-
 
129
			int width, int height);
-
 
130
struct drm_display_mode *
-
 
131
drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn,
-
 
132
		      int width, int height);
123
 
133
 
-
 
134
int drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper, struct drm_connector *connector);
-
 
135
int drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,
-
 
136
				       struct drm_connector *connector);
124
#endif
137
#endif