From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E2F7C433E0 for ; Sun, 14 Jun 2020 07:44:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4F69D2065C for ; Sun, 14 Jun 2020 07:44:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F69D2065C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A52056E15B; Sun, 14 Jun 2020 07:44:51 +0000 (UTC) Received: from asavdk4.altibox.net (asavdk4.altibox.net [109.247.116.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id C02DE6E15B for ; Sun, 14 Jun 2020 07:44:49 +0000 (UTC) Received: from ravnborg.org (unknown [188.228.123.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk4.altibox.net (Postfix) with ESMTPS id 965248051D; Sun, 14 Jun 2020 09:44:42 +0200 (CEST) Date: Sun, 14 Jun 2020 09:44:41 +0200 From: Sam Ravnborg To: Linus Walleij Subject: Re: [PATCH 1/2] drm: mcde: Fix display initialization problem Message-ID: <20200614074441.GA220677@ravnborg.org> References: <20200613223027.4189309-1-linus.walleij@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200613223027.4189309-1-linus.walleij@linaro.org> X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=G88y7es5 c=1 sm=1 tr=0 a=S6zTFyMACwkrwXSdXUNehg==:117 a=S6zTFyMACwkrwXSdXUNehg==:17 a=kj9zAlcOel0A:10 a=KKAkSRfTAAAA:8 a=7gkXJVJtAAAA:8 a=e5mUnYsNAAAA:8 a=Zvhud1mh3OEFsl6IILoA:9 a=CjuIK1q_8ugA:10 a=cvBusfyB2V15izCimMoJ:22 a=E9Po1WZjFZOl8hwRPBS3:22 a=Vxmtnl_E_bksehYqCbjh:22 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Sean Paul , dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Linus. On Sun, Jun 14, 2020 at 12:30:26AM +0200, Linus Walleij wrote: > The following bug appeared in the MCDE driver/display > initialization during the recent merge window. > > First the place we call drm_fbdev_generic_setup() in the > wrong place: this needs to be called AFTER calling > drm_dev_register() else we get this splat: > > ------------[ cut here ]------------ > WARNING: CPU: 0 PID: 1 at ../drivers/gpu/drm/drm_fb_helper.c:2198 drm_fbdev_generic_setup+0x164/0x1a8 > mcde a0350000.mcde: Device has not been registered. > Modules linked in: > Hardware name: ST-Ericsson Ux5x0 platform (Device Tree Support) > [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [] (show_stack) from [] (dump_stack+0x9c/0xb0) > [] (dump_stack) from [] (__warn+0xb8/0xd0) > [] (__warn) from [] (warn_slowpath_fmt+0x74/0xb8) > [] (warn_slowpath_fmt) from [] (drm_fbdev_generic_setup+0x164/0x1a8) > [] (drm_fbdev_generic_setup) from [] (mcde_drm_bind+0xc4/0x160) > [] (mcde_drm_bind) from [] (try_to_bring_up_master+0x15c/0x1a4) > (...) > > Signed-off-by: Linus Walleij Yup, this is the right way to do it. Reviewed-by: Sam Ravnborg One small thing to consider, see below. But for another patch. > --- > drivers/gpu/drm/mcde/mcde_drv.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c > index 84f3e2dbd77b..80082d6dce3a 100644 > --- a/drivers/gpu/drm/mcde/mcde_drv.c > +++ b/drivers/gpu/drm/mcde/mcde_drv.c > @@ -209,7 +209,6 @@ static int mcde_modeset_init(struct drm_device *drm) > > drm_mode_config_reset(drm); > drm_kms_helper_poll_init(drm); > - drm_fbdev_generic_setup(drm, 32); > > return 0; > } > @@ -264,6 +263,8 @@ static int mcde_drm_bind(struct device *dev) > if (ret < 0) > goto unbind; > > + drm_fbdev_generic_setup(drm, 32); Consider using mode_config.preferred_depth, then you can pass 0 here. > + > return 0; > > unbind: > -- > 2.26.2 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel