summaryrefslogtreecommitdiffstats
path: root/include/drm/drm_fb_helper.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-03-30 05:34:17 +0000
committerDave Airlie <airlied@redhat.com>2010-04-07 10:29:52 +1000
commit5c4426a782bc9509573fc7958a786ebd14fafdf3 (patch)
treece701b338b6cd84e07a6259b56dca9df9875aedb /include/drm/drm_fb_helper.h
parent19b4b44503ccdf834062d68e022dc1e2721695a5 (diff)
downloadlinux-5c4426a782bc9509573fc7958a786ebd14fafdf3.tar.bz2
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 @@
#ifndef DRM_FB_HELPER_H
#define DRM_FB_HELPER_H
+#include <linux/slow-work.h>
+
struct drm_fb_helper_crtc {
uint32_t crtc_id;
struct drm_mode_set mode_set;
@@ -86,8 +88,12 @@ struct drm_fb_helper {
u32 pseudo_palette[17];
struct list_head kernel_fb_list;
+ struct delayed_slow_work output_poll_slow_work;
+ bool poll_enabled;
int (*fb_probe)(struct drm_fb_helper *helper,
struct drm_fb_helper_surface_size *sizes);
+
+ void (*fb_poll_changed)(struct drm_fb_helper *helper);
};
int 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,
int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info);
-bool drm_helper_fb_hotplug_event(struct drm_fb_helper *fb_helper, u32 max_width,
- u32 max_height);
+bool drm_helper_fb_hotplug_event(struct drm_fb_helper *fb_helper,
+ u32 max_width, u32 max_height, bool polled);
bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper);
int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper);
+void drm_fb_helper_poll_init(struct drm_fb_helper *fb_helper);
+void drm_fb_helper_poll_fini(struct drm_fb_helper *fb_helper);
#endif