aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-03-30 01:34:15 -0400
committerDave Airlie <airlied@redhat.com>2010-04-06 20:28:01 -0400
commit0b4c0f3f0eceacb691e2b5570d9b16d751ce1b48 (patch)
tree708eecc3e3b86f4328df588400e2b7a3f6f2b32d /include/drm
parent8be48d924c307e72e3797ab5bde81b07a1ccc52d (diff)
drm/kms/fb: separate fbdev connector list from core drm connectors
This breaks the connection between the core drm connector list and the fbdev connector usage, and allows them to become disjoint in the future. It also removes the untype void* that was in the connector struct to support this. All connectors are added to the fbdev now but this could be changed in the future. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_crtc.h1
-rw-r--r--include/drm/drm_crtc_helper.h5
-rw-r--r--include/drm/drm_fb_helper.h6
3 files changed, 5 insertions, 7 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index e4e34bae22cd..fce2042ad0a5 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -514,7 +514,6 @@ struct drm_connector {
514 uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER]; 514 uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER];
515 uint32_t force_encoder_id; 515 uint32_t force_encoder_id;
516 struct drm_encoder *encoder; /* currently active encoder */ 516 struct drm_encoder *encoder; /* currently active encoder */
517 void *fb_helper_private;
518}; 517};
519 518
520/** 519/**
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
index ce7aab77f7dc..b1fa0f8cfa60 100644
--- a/include/drm/drm_crtc_helper.h
+++ b/include/drm/drm_crtc_helper.h
@@ -39,7 +39,6 @@
39 39
40#include <linux/fb.h> 40#include <linux/fb.h>
41 41
42#include "drm_fb_helper.h"
43struct drm_crtc_helper_funcs { 42struct drm_crtc_helper_funcs {
44 /* 43 /*
45 * Control power levels on the CRTC. If the mode passed in is 44 * Control power levels on the CRTC. If the mode passed in is
@@ -96,7 +95,6 @@ struct drm_connector_helper_funcs {
96 95
97extern int drm_helper_probe_single_connector_modes(struct drm_connector *connector, uint32_t maxX, uint32_t maxY); 96extern int drm_helper_probe_single_connector_modes(struct drm_connector *connector, uint32_t maxX, uint32_t maxY);
98extern void drm_helper_disable_unused_functions(struct drm_device *dev); 97extern void drm_helper_disable_unused_functions(struct drm_device *dev);
99extern int drm_helper_hotplug_stage_two(struct drm_device *dev);
100extern int drm_crtc_helper_set_config(struct drm_mode_set *set); 98extern int drm_crtc_helper_set_config(struct drm_mode_set *set);
101extern bool drm_crtc_helper_set_mode(struct drm_crtc *crtc, 99extern bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
102 struct drm_display_mode *mode, 100 struct drm_display_mode *mode,
@@ -122,11 +120,10 @@ static inline void drm_encoder_helper_add(struct drm_encoder *encoder,
122 encoder->helper_private = (void *)funcs; 120 encoder->helper_private = (void *)funcs;
123} 121}
124 122
125static inline int drm_connector_helper_add(struct drm_connector *connector, 123static inline void drm_connector_helper_add(struct drm_connector *connector,
126 const struct drm_connector_helper_funcs *funcs) 124 const struct drm_connector_helper_funcs *funcs)
127{ 125{
128 connector->helper_private = (void *)funcs; 126 connector->helper_private = (void *)funcs;
129 return drm_fb_helper_add_connector(connector);
130} 127}
131 128
132extern int drm_helper_resume_force_mode(struct drm_device *dev); 129extern int drm_helper_resume_force_mode(struct drm_device *dev);
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index b1ea66f11ded..50094f94d4ca 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -69,6 +69,7 @@ struct drm_fb_helper_surface_size {
69 69
70struct drm_fb_helper_connector { 70struct drm_fb_helper_connector {
71 struct drm_fb_helper_cmdline_mode cmdline_mode; 71 struct drm_fb_helper_cmdline_mode cmdline_mode;
72 struct drm_connector *connector;
72}; 73};
73 74
74struct drm_fb_helper { 75struct drm_fb_helper {
@@ -77,6 +78,8 @@ struct drm_fb_helper {
77 struct drm_display_mode *mode; 78 struct drm_display_mode *mode;
78 int crtc_count; 79 int crtc_count;
79 struct drm_fb_helper_crtc *crtc_info; 80 struct drm_fb_helper_crtc *crtc_info;
81 int connector_count;
82 struct drm_fb_helper_connector **connector_info;
80 struct drm_fb_helper_funcs *funcs; 83 struct drm_fb_helper_funcs *funcs;
81 int conn_limit; 84 int conn_limit;
82 struct fb_info *fbdev; 85 struct fb_info *fbdev;
@@ -113,12 +116,11 @@ void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helpe
113void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch, 116void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
114 uint32_t depth); 117 uint32_t depth);
115 118
116int drm_fb_helper_add_connector(struct drm_connector *connector);
117int drm_fb_helper_parse_command_line(struct drm_device *dev);
118int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info); 119int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info);
119 120
120bool drm_helper_fb_hotplug_event(struct drm_fb_helper *fb_helper, u32 max_width, 121bool drm_helper_fb_hotplug_event(struct drm_fb_helper *fb_helper, u32 max_width,
121 u32 max_height); 122 u32 max_height);
122bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper); 123bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper);
124int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper);
123 125
124#endif 126#endif