aboutsummaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2008-09-18 09:59:08 +1000
committerDave Airlie <airlied@linux.ie>2008-09-18 09:59:08 +1000
commit1062d8dcff19ded743f046e27adb889f3596ab4d (patch)
tree8ebba429d60d9937d6d9baef9e46d7ad90dffa69 /linux-core
parente23d5c03c4c9850d5e54f323fe944329b389b042 (diff)
modesetting: Add helper to force restore modes on crtcs at resume time
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_crtc_helper.c18
-rw-r--r--linux-core/drm_crtc_helper.h3
2 files changed, 19 insertions, 2 deletions
diff --git a/linux-core/drm_crtc_helper.c b/linux-core/drm_crtc_helper.c
index 89d87a6c..71bdc447 100644
--- a/linux-core/drm_crtc_helper.c
+++ b/linux-core/drm_crtc_helper.c
@@ -785,4 +785,22 @@ int drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb,
}
EXPORT_SYMBOL(drm_helper_mode_fill_fb_struct);
+int drm_helper_resume_force_mode(struct drm_device *dev)
+{
+ struct drm_crtc *crtc;
+ int ret;
+ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
+
+ if (!crtc->enabled)
+ continue;
+
+ ret = drm_crtc_helper_set_mode(crtc, &crtc->mode, crtc->x,
+ crtc->y);
+
+ if (ret == false)
+ DRM_ERROR("failed to set mode on crtc %p\n", crtc);
+ }
+ return 0;
+}
+EXPORT_SYMBOL(drm_helper_resume_force_mode);
diff --git a/linux-core/drm_crtc_helper.h b/linux-core/drm_crtc_helper.h
index dcb46f98..c0719157 100644
--- a/linux-core/drm_crtc_helper.h
+++ b/linux-core/drm_crtc_helper.h
@@ -92,6 +92,5 @@ static inline void drm_connector_helper_add(struct drm_connector *connector, con
connector->helper_private = (void *)funcs;
}
-extern int drm_get_buffer_object(struct drm_device *dev, struct drm_buffer_object **bo, unsigned long handle);
-
+extern int drm_helper_resume_force_mode(struct drm_device *dev);
#endif