Subversion Repositories Kolibri OS

Rev

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

Rev 1408 Rev 1964
Line 28... Line 28...
28
 *      Jesse Barnes 
28
 *      Jesse Barnes 
29
 */
29
 */
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 -... Line 32...
-
 
32
 
-
 
33
struct drm_fb_helper;
-
 
34
 
32
 
35
 
33
struct drm_fb_helper_crtc {
36
struct drm_fb_helper_crtc {
34
	uint32_t crtc_id;
37
	uint32_t crtc_id;
-
 
38
	struct drm_mode_set mode_set;
35
	struct drm_mode_set mode_set;
39
	struct drm_display_mode *desired_mode;
Line -... Line 40...
-
 
40
};
-
 
41
 
-
 
42
struct drm_fb_helper_surface_size {
-
 
43
	u32 fb_width;
-
 
44
	u32 fb_height;
-
 
45
	u32 surface_width;
-
 
46
	u32 surface_height;
-
 
47
	u32 surface_bpp;
Line 36... Line 48...
36
};
48
	u32 surface_depth;
37
 
49
};
38
 
50
 
39
struct drm_fb_helper_funcs {
51
struct drm_fb_helper_funcs {
40
	void (*gamma_set)(struct drm_crtc *crtc, u16 red, u16 green,
52
	void (*gamma_set)(struct drm_crtc *crtc, u16 red, u16 green,
41
			  u16 blue, int regno);
-
 
Line 42... Line 53...
42
	void (*gamma_get)(struct drm_crtc *crtc, u16 *red, u16 *green,
53
			  u16 blue, int regno);
43
			  u16 *blue, int regno);
54
	void (*gamma_get)(struct drm_crtc *crtc, u16 *red, u16 *green,
44
};
-
 
45
 
-
 
46
/* mode specified on the command line */
-
 
47
struct 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
			  u16 *blue, int regno);
Line 55... Line 56...
55
	bool interlace;
56
 
-
 
57
	int (*fb_probe)(struct drm_fb_helper *helper,
56
	bool cvt;
58
			struct drm_fb_helper_surface_size *sizes);
57
	bool margins;
59
};
Line 58... Line 60...
58
};
60
 
59
 
61
struct drm_fb_helper_connector {
-
 
62
	struct drm_connector *connector;
60
struct drm_fb_helper_connector {
63
	struct drm_cmdline_mode cmdline_mode;
61
	struct drm_fb_helper_cmdline_mode cmdline_mode;
64
};
62
};
65
 
63
 
66
struct drm_fb_helper {
-
 
67
	struct drm_framebuffer *fb;
-
 
68
	struct drm_framebuffer *saved_fb;
64
struct drm_fb_helper {
69
	struct drm_device *dev;
65
	struct drm_framebuffer *fb;
70
	struct drm_display_mode *mode;
-
 
71
	int crtc_count;
-
 
72
	struct drm_fb_helper_crtc *crtc_info;
66
	struct drm_device *dev;
73
	int connector_count;
-
 
74
	struct drm_fb_helper_connector **connector_info;
-
 
75
	struct drm_fb_helper_funcs *funcs;
-
 
76
	int conn_limit;
-
 
77
	struct fb_info *fbdev;
67
	struct drm_display_mode *mode;
78
	u32 pseudo_palette[17];
Line 68... Line 79...
68
	int crtc_count;
79
	struct list_head kernel_fb_list;
69
	struct drm_fb_helper_crtc *crtc_info;
80
 
-
 
81
	/* we got a hotplug but fbdev wasn't running the console
70
	struct drm_fb_helper_funcs *funcs;
82
	   delay until next set_par */
71
	int conn_limit;
-
 
72
	struct list_head kernel_fb_list;
-
 
73
};
-
 
74
 
-
 
75
int drm_fb_helper_single_fb_probe(struct drm_device *dev,
-
 
76
				  int preferred_bpp,
-
 
77
				  int (*fb_create)(struct drm_device *dev,
-
 
78
						   uint32_t fb_width,
83
	bool delayed_hotplug;
79
						   uint32_t fb_height,
84
};
80
						   uint32_t surface_width,
85
 
81
						   uint32_t surface_height,
86
int drm_fb_helper_single_fb_probe(struct drm_fb_helper *helper,
82
						   uint32_t surface_depth,
87
				  int preferred_bpp);
83
						   uint32_t surface_bpp,
88
 
84
						   struct drm_framebuffer **fb_ptr));
89
int drm_fb_helper_init(struct drm_device *dev,
85
int drm_fb_helper_init_crtc_count(struct drm_fb_helper *helper, int crtc_count,
90
		       struct drm_fb_helper *helper, int crtc_count,
Line 96... Line 101...
96
			    unsigned green,
101
			    unsigned green,
97
			    unsigned blue,
102
			    unsigned blue,
98
			    unsigned transp,
103
			    unsigned transp,
99
			    struct fb_info *info);
104
			    struct fb_info *info);
Line -... Line 105...
-
 
105
 
100
 
106
bool drm_fb_helper_restore_fbdev_mode(struct drm_fb_helper *fb_helper);
101
void drm_fb_helper_restore(void);
107
void drm_fb_helper_restore(void);
102
void drm_fb_helper_fill_var(struct fb_info *info, struct drm_framebuffer *fb,
108
void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper,
103
			    uint32_t fb_width, uint32_t fb_height);
109
			    uint32_t fb_width, uint32_t fb_height);
104
void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
110
void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
Line 105... Line -...
105
			    uint32_t depth);
-
 
106
 
-
 
107
int drm_fb_helper_add_connector(struct drm_connector *connector);
111
			    uint32_t depth);
Line -... Line 112...
-
 
112
 
-
 
113
int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info);
-
 
114
 
-
 
115
int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper);
-
 
116
bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel);
-
 
117
int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper);
108
int drm_fb_helper_parse_command_line(struct drm_device *dev);
118
int drm_fb_helper_debug_enter(struct fb_info *info);