drm/fb-helper: add new drm_setup_crtcs_fb() function
authorDavid Lechner <david@lechnology.com>
Thu, 3 Aug 2017 16:19:08 +0000 (11:19 -0500)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 3 Aug 2017 17:48:15 +0000 (19:48 +0200)
commitf461bd2b494bdf27ed7f9ea03101f7119ed7c695
tree8dae2ed953a5a22e092a76d70c39bb3855a7cfab
parentf3a73544da732e28368ce12d6682ff8531824aaa
drm/fb-helper: add new drm_setup_crtcs_fb() function

This adds a new drm_setup_crtcs_fb() function to handle the parts of
drm_setup_crtcs() that touch fb_helper->fb and fb_helper->fbdev. When
drm_setup_crtcs() is called during initialization, these fields are NULL
because they have not been allocated yet.

There is currently a hack at the end of drm_fb_helper_single_fb_probe()
that sets fb_helper->fb, so it is moved to the new drm_setup_crtcs_fb()
function.

This is also done in preparation for addition setup that requires access
to fb_helper->fbdev.

Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1501777149-8310-2-git-send-email-david@lechnology.com
drivers/gpu/drm/drm_fb_helper.c