drm/vc4: Call drm_dev_register() after all setup is done

drm_dev_register() initializes internal clients like bootsplash as the
last thing it does, so all setup needs to be done at this point.

Fix by calling vc4_kms_load() before registering.
Also check the error code returned from that function.

Cc: Eric Anholt <[email protected]>
Signed-off-by: Noralf Trønnes <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
This commit is contained in:
Noralf Trønnes 2019-03-26 18:55:46 +01:00
commit d7f9b83913

View file

@ -277,11 +277,13 @@ static int vc4_drm_bind(struct device *dev)
drm_fb_helper_remove_conflicting_framebuffers(NULL, "vc4drmfb", false);
ret = drm_dev_register(drm, 0);
ret = vc4_kms_load(drm);
if (ret < 0)
goto unbind_all;
vc4_kms_load(drm);
ret = drm_dev_register(drm, 0);
if (ret < 0)
goto unbind_all;
drm_fbdev_generic_setup(drm, 16);