From d7f9b83913f12b918906b8c1f4a4b90b5f4347d3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Noralf=20Tr=C3=B8nnes?= Date: Tue, 26 Mar 2019 18:55:46 +0100 Subject: [PATCH] drm/vc4: Call drm_dev_register() after all setup is done MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20190326175546.18126-17-noralf@tronnes.org --- drivers/gpu/drm/vc4/vc4_drv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index f2d0fb3aa729..8d56eb23c9b5 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -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); -- 2.39.5