drm/fb-cma-helper: Add fb_deferred_io support
authorNoralf Trønnes <noralf@tronnes.org>
Thu, 28 Apr 2016 15:18:35 +0000 (17:18 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 2 May 2016 14:25:08 +0000 (16:25 +0200)
commit199c77179c879e6cbca178bf67e9153dc89fb3d1
tree79332b26817c6662ad54f9ee4555920001d70ed0
parentba0263340a2aeaf5f08e4f2b0f4c29e300828b06
drm/fb-cma-helper: Add fb_deferred_io support

This adds fbdev deferred io support if CONFIG_FB_DEFERRED_IO is enabled.
The driver has to provide a (struct drm_framebuffer_funcs *)->dirty()
callback to get notification of fbdev framebuffer changes.
If the dirty() hook is set, then fb_deferred_io is set up automatically
by the helper.

Two functions have been added so that the driver can provide a dirty()
function:
- drm_fbdev_cma_init_with_funcs()
  This makes it possible for the driver to provided a custom
  (struct drm_fb_helper_funcs *)->fb_probe() function.
- drm_fbdev_cma_create_with_funcs()
  This is used by the .fb_probe hook to set a driver provided
  (struct drm_framebuffer_funcs *)->dirty() function.

Cc: laurent.pinchart@ideasonboard.com
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/1461856717-6476-6-git-send-email-noralf@tronnes.org
drivers/gpu/drm/drm_fb_cma_helper.c
include/drm/drm_fb_cma_helper.h