mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-24 20:40:12 +01:00
modesetting: Add helper to force restore modes on crtcs at resume time
This commit is contained in:
parent
e23d5c03c4
commit
1062d8dcff
2 changed files with 19 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue