Some drm drivers call remove_conflicting_framebuffers. Create a drm_fb_helper function that wraps around these calls. This is part of an effort to prevent drm drivers from calling fbdev functions directly, in order to make fbdev emulation a top level drm option. v2: - Added kerneldocs - Follow the drm way of aligning of arguments in func definitions Signed-off-by: Archit Taneja <architt@xxxxxxxxxxxxxx> --- drivers/gpu/drm/drm_fb_helper.c | 15 +++++++++++++++ include/drm/drm_fb_helper.h | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 9620aa5..86e4e2c 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -894,6 +894,21 @@ void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, int state) } EXPORT_SYMBOL(drm_fb_helper_set_suspend); +/** + * drm_fb_helper_remove_conflicting_framebuffers - wrapper around + * remove_conflicting_framebuffers + * @fb_helper: driver-allocated fbdev helper + * + * A wrapper around remove_conflicting_framebuffers implemented by fbdev core + */ +int drm_fb_helper_remove_conflicting_framebuffers(struct apertures_struct *a, + const char *name, + bool primary) +{ + return remove_conflicting_framebuffers(a, name, primary); +} +EXPORT_SYMBOL(drm_fb_helper_remove_conflicting_framebuffers); + static int setcolreg(struct drm_crtc *crtc, u16 red, u16 green, u16 blue, u16 regno, struct fb_info *info) { diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h index ef32500..cbdc69d 100644 --- a/include/drm/drm_fb_helper.h +++ b/include/drm/drm_fb_helper.h @@ -168,6 +168,10 @@ void drm_fb_helper_cfb_imageblit(struct fb_info *info, void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, int state); +int drm_fb_helper_remove_conflicting_framebuffers(struct apertures_struct *a, + const char *name, + bool primary); + int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info); int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel