diff options
author | Noralf Trønnes <noralf@tronnes.org> | 2016-08-23 13:54:06 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-08-23 14:08:35 +0200 |
commit | cfe63423d9be3e7020296c3dfb512768a83cd099 (patch) | |
tree | 93294e2ec00b3b1fb3b33285e44e72670aaaade3 /include/drm/drm_fb_helper.h | |
parent | drm/fb-helper: Fix the dummy remove_conflicting_framebuffers (diff) | |
download | linux-cfe63423d9be3e7020296c3dfb512768a83cd099.tar.xz linux-cfe63423d9be3e7020296c3dfb512768a83cd099.zip |
drm/fb-helper: Add drm_fb_helper_set_suspend_unlocked()
This adds a function that also takes the console lock before calling
fb_set_suspend() in contrast to drm_fb_helper_set_suspend() which is
a plain wrapper around fb_set_suspend().
Resume is run asynchronously using a worker if the console lock is
already taken. This is modelled after the i915 driver.
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1471953246-29602-1-git-send-email-noralf@tronnes.org
Diffstat (limited to 'include/drm/drm_fb_helper.h')
-rw-r--r-- | include/drm/drm_fb_helper.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h index f811d755c254..0c6e53d9ce68 100644 --- a/include/drm/drm_fb_helper.h +++ b/include/drm/drm_fb_helper.h @@ -177,6 +177,7 @@ struct drm_fb_helper_connector { * the screen buffer * @dirty_lock: spinlock protecting @dirty_clip * @dirty_work: worker used to flush the framebuffer + * @resume_work: worker used during resume if the console lock is already taken * * This is the main structure used by the fbdev helpers. Drivers supporting * fbdev emulation should embedded this into their overall driver structure. @@ -197,6 +198,7 @@ struct drm_fb_helper { struct drm_clip_rect dirty_clip; spinlock_t dirty_lock; struct work_struct dirty_work; + struct work_struct resume_work; /** * @kernel_fb_list: @@ -264,6 +266,8 @@ void drm_fb_helper_cfb_imageblit(struct fb_info *info, const struct fb_image *image); void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, int state); +void drm_fb_helper_set_suspend_unlocked(struct drm_fb_helper *fb_helper, + int suspend); int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info); @@ -421,6 +425,11 @@ static inline void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, { } +static inline void +drm_fb_helper_set_suspend_unlocked(struct drm_fb_helper *fb_helper, int suspend) +{ +} + static inline int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper) { return 0; |