]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/fb_helper: Add drm_fb_helper functions to manage fb_info creation
authorArchit Taneja <architt@codeaurora.org>
Wed, 22 Jul 2015 09:27:56 +0000 (14:57 +0530)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 6 Aug 2015 12:12:54 +0000 (14:12 +0200)
commitb8017d6c33be9862505a9154e302c4b00cbfca43
treefd5d3f30f6d57d7b86acaa8e541bba5981fe0a32
parentc201d00f4a4c004482aec7de1bffdfe2d85e65cf
drm/fb_helper: Add drm_fb_helper functions to manage fb_info creation

Every drm driver calls framebuffer_alloc, fb_alloc_cmap,
unregister_framebuffer, fb_dealloc_cmap and framebuffer_release in
order to emulate fbdev support.

Create drm_fb_helper functions that perform the above operations.

This is part of an effort to prevent drm drivers from calling fbdev
functions directly. It also removes repetitive code from drivers.

There are some drivers that call alloc_apertures after framebuffer_alloc
and some that don't. Make the helper always call alloc_apertures. This
would make certain drivers allocate memory for apertures but not use
them. Since it's a small amount of memory, it shouldn't be an issue.

v2:
- Added kerneldocs
- Added a check for non-NULL fb_helper before proceeding. This will
  make the helpers work when we have a module param for fbdev emulation

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_fb_helper.c
include/drm/drm_fb_helper.h