aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drm_fb_helper.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-03-30 01:34:17 -0400
committerDave Airlie <airlied@redhat.com>2010-04-06 20:29:52 -0400
commit5c4426a782bc9509573fc7958a786ebd14fafdf3 (patch)
treece701b338b6cd84e07a6259b56dca9df9875aedb /include/drm/drm_fb_helper.h
parent19b4b44503ccdf834062d68e022dc1e2721695a5 (diff)
drm/kms/fb: add polling support for when nothing is connected.
When we are running in a headless environment we have no idea what output the user might plug in later, we only have hotplug detect from the digital outputs. So if we detect no connected outputs at initialisation, start a slow work operation to poll every 5 seconds for an output. this is only hooked up for radeon so far, on hw where we have full hotplug detection there is no need for this. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm/drm_fb_helper.h')
-rw-r--r--include/drm/drm_fb_helper.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index 50094f94d4ca..a073d73c195e 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -30,6 +30,8 @@
30#ifndef DRM_FB_HELPER_H 30#ifndef DRM_FB_HELPER_H
31#define DRM_FB_HELPER_H 31#define DRM_FB_HELPER_H
32 32
33#include <linux/slow-work.h>
34
33struct drm_fb_helper_crtc { 35struct drm_fb_helper_crtc {
34 uint32_t crtc_id; 36 uint32_t crtc_id;
35 struct drm_mode_set mode_set; 37 struct drm_mode_set mode_set;
@@ -86,8 +88,12 @@ struct drm_fb_helper {
86 u32 pseudo_palette[17]; 88 u32 pseudo_palette[17];
87 struct list_head kernel_fb_list; 89 struct list_head kernel_fb_list;
88 90
91 struct delayed_slow_work output_poll_slow_work;
92 bool poll_enabled;
89 int (*fb_probe)(struct drm_fb_helper *helper, 93 int (*fb_probe)(struct drm_fb_helper *helper,
90 struct drm_fb_helper_surface_size *sizes); 94 struct drm_fb_helper_surface_size *sizes);
95
96 void (*fb_poll_changed)(struct drm_fb_helper *helper);
91}; 97};
92 98
93int drm_fb_helper_single_fb_probe(struct drm_fb_helper *helper, 99int drm_fb_helper_single_fb_probe(struct drm_fb_helper *helper,
@@ -118,9 +124,11 @@ void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
118 124
119int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info); 125int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info);
120 126
121bool drm_helper_fb_hotplug_event(struct drm_fb_helper *fb_helper, u32 max_width, 127bool drm_helper_fb_hotplug_event(struct drm_fb_helper *fb_helper,
122 u32 max_height); 128 u32 max_width, u32 max_height, bool polled);
123bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper); 129bool 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); 130int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper);
125 131
132void drm_fb_helper_poll_init(struct drm_fb_helper *fb_helper);
133void drm_fb_helper_poll_fini(struct drm_fb_helper *fb_helper);
126#endif 134#endif