diff options
author | Noralf Trønnes <noralf@tronnes.org> | 2017-12-15 12:51:17 -0500 |
---|---|---|
committer | Noralf Trønnes <noralf@tronnes.org> | 2017-12-20 08:52:22 -0500 |
commit | 48c9571c34b153abc1c4f2b431fa74490b671943 (patch) | |
tree | 26ae43819c573a3be597c208e3cb9853edd1de87 /include/drm/drm_fb_helper.h | |
parent | 95b0137f28a420ac02826e674286bc363dd7c196 (diff) |
drm/fb-helper: Add drm_fb_helper_defio_init()
Add helper for initializing fbdev deferred I/O.
The cleanup could have happened in drm_fb_helper_fini(), but that would
have required me to set fb_info->fbdefio to NULL in a couple of drivers
before they call _fini() to avoid double defio cleanup. The problem is
that one of those is vboxvideo which lives in Greg's staging tree.
So I put the cleanup in drm_fb_helper_fbdev_teardown(), not perfect
but not that bad either.
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20171215175119.36181-6-noralf@tronnes.org
Diffstat (limited to 'include/drm/drm_fb_helper.h')
-rw-r--r-- | include/drm/drm_fb_helper.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h index aa78ac3b8ad0..b069433e7fc1 100644 --- a/include/drm/drm_fb_helper.h +++ b/include/drm/drm_fb_helper.h | |||
@@ -276,6 +276,7 @@ void drm_fb_helper_unlink_fbi(struct drm_fb_helper *fb_helper); | |||
276 | 276 | ||
277 | void drm_fb_helper_deferred_io(struct fb_info *info, | 277 | void drm_fb_helper_deferred_io(struct fb_info *info, |
278 | struct list_head *pagelist); | 278 | struct list_head *pagelist); |
279 | int drm_fb_helper_defio_init(struct drm_fb_helper *fb_helper); | ||
279 | 280 | ||
280 | ssize_t drm_fb_helper_sys_read(struct fb_info *info, char __user *buf, | 281 | ssize_t drm_fb_helper_sys_read(struct fb_info *info, char __user *buf, |
281 | size_t count, loff_t *ppos); | 282 | size_t count, loff_t *ppos); |
@@ -423,6 +424,11 @@ static inline void drm_fb_helper_deferred_io(struct fb_info *info, | |||
423 | { | 424 | { |
424 | } | 425 | } |
425 | 426 | ||
427 | static inline int drm_fb_helper_defio_init(struct drm_fb_helper *fb_helper) | ||
428 | { | ||
429 | return -ENODEV; | ||
430 | } | ||
431 | |||
426 | static inline ssize_t drm_fb_helper_sys_read(struct fb_info *info, | 432 | static inline ssize_t drm_fb_helper_sys_read(struct fb_info *info, |
427 | char __user *buf, size_t count, | 433 | char __user *buf, size_t count, |
428 | loff_t *ppos) | 434 | loff_t *ppos) |