From: Thomas Zimmermann <tzimmermann@suse.de> To: Zenghui Yu <yuzenghui@huawei.com>, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: xinliang.liu@linaro.org, zourongrong@gmail.com, john.stultz@linaro.org, kong.kongxinwei@hisilicon.com, puck.chen@hisilicon.com, airlied@linux.ie, daniel@ffwll.ch, sam@ravnborg.org, wanghaibin.wang@huawei.com Subject: Re: [PATCH] drm/hisilicon/hibmc: Move drm_fbdev_generic_setup() down to avoid the splat Date: Mon, 6 Jul 2020 19:03:40 +0200 [thread overview] Message-ID: <aa244201-9b43-2d35-c236-21391e7af7d0@suse.de> (raw) In-Reply-To: <20200706144713.1123-1-yuzenghui@huawei.com> [-- Attachment #1.1: Type: text/plain, Size: 2383 bytes --] Hi Am 06.07.20 um 16:47 schrieb Zenghui Yu: > The HiSilicon hibmc driver triggers a splat at boot time as below > > [ 14.137806] ------------[ cut here ]------------ > [ 14.142405] hibmc-drm 0000:0a:00.0: Device has not been registered. > [ 14.148661] WARNING: CPU: 0 PID: 496 at drivers/gpu/drm/drm_fb_helper.c:2233 drm_fbdev_generic_setup+0x15c/0x1b8 > [ 14.158787] [...] > [ 14.278307] Call trace: > [ 14.280742] drm_fbdev_generic_setup+0x15c/0x1b8 > [ 14.285337] hibmc_pci_probe+0x354/0x418 > [ 14.289242] local_pci_probe+0x44/0x98 > [ 14.292974] work_for_cpu_fn+0x20/0x30 > [ 14.296708] process_one_work+0x1c4/0x4e0 > [ 14.300698] worker_thread+0x2c8/0x528 > [ 14.304431] kthread+0x138/0x140 > [ 14.307646] ret_from_fork+0x10/0x18 > [ 14.311205] ---[ end trace a2000ec2d838af4d ]--- > > This turned out to be due to the fbdev device hasn't been registered when > drm_fbdev_generic_setup() is invoked. Let's fix the splat by moving it down > after drm_dev_register() which will follow the "Display driver example" > documented by commit de99f0600a79 ("drm/drv: DOC: Add driver example > code"). > > Signed-off-by: Zenghui Yu <yuzenghui@huawei.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> > --- > drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > index a6fd0c29e5b8..544b9993c99e 100644 > --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > @@ -307,8 +307,6 @@ static int hibmc_load(struct drm_device *dev) > /* reset all the states of crtc/plane/encoder/connector */ > drm_mode_config_reset(dev); > > - drm_fbdev_generic_setup(dev, dev->mode_config.preferred_depth); > - > return 0; > > err: > @@ -355,6 +353,9 @@ static int hibmc_pci_probe(struct pci_dev *pdev, > ret); > goto err_unload; > } > + > + drm_fbdev_generic_setup(dev, dev->mode_config.preferred_depth); > + > return 0; > > err_unload: > -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 516 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Thomas Zimmermann <tzimmermann@suse.de> To: Zenghui Yu <yuzenghui@huawei.com>, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: xinliang.liu@linaro.org, puck.chen@hisilicon.com, airlied@linux.ie, kong.kongxinwei@hisilicon.com, zourongrong@gmail.com, wanghaibin.wang@huawei.com, sam@ravnborg.org Subject: Re: [PATCH] drm/hisilicon/hibmc: Move drm_fbdev_generic_setup() down to avoid the splat Date: Mon, 6 Jul 2020 19:03:40 +0200 [thread overview] Message-ID: <aa244201-9b43-2d35-c236-21391e7af7d0@suse.de> (raw) In-Reply-To: <20200706144713.1123-1-yuzenghui@huawei.com> [-- Attachment #1.1.1: Type: text/plain, Size: 2383 bytes --] Hi Am 06.07.20 um 16:47 schrieb Zenghui Yu: > The HiSilicon hibmc driver triggers a splat at boot time as below > > [ 14.137806] ------------[ cut here ]------------ > [ 14.142405] hibmc-drm 0000:0a:00.0: Device has not been registered. > [ 14.148661] WARNING: CPU: 0 PID: 496 at drivers/gpu/drm/drm_fb_helper.c:2233 drm_fbdev_generic_setup+0x15c/0x1b8 > [ 14.158787] [...] > [ 14.278307] Call trace: > [ 14.280742] drm_fbdev_generic_setup+0x15c/0x1b8 > [ 14.285337] hibmc_pci_probe+0x354/0x418 > [ 14.289242] local_pci_probe+0x44/0x98 > [ 14.292974] work_for_cpu_fn+0x20/0x30 > [ 14.296708] process_one_work+0x1c4/0x4e0 > [ 14.300698] worker_thread+0x2c8/0x528 > [ 14.304431] kthread+0x138/0x140 > [ 14.307646] ret_from_fork+0x10/0x18 > [ 14.311205] ---[ end trace a2000ec2d838af4d ]--- > > This turned out to be due to the fbdev device hasn't been registered when > drm_fbdev_generic_setup() is invoked. Let's fix the splat by moving it down > after drm_dev_register() which will follow the "Display driver example" > documented by commit de99f0600a79 ("drm/drv: DOC: Add driver example > code"). > > Signed-off-by: Zenghui Yu <yuzenghui@huawei.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> > --- > drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > index a6fd0c29e5b8..544b9993c99e 100644 > --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > @@ -307,8 +307,6 @@ static int hibmc_load(struct drm_device *dev) > /* reset all the states of crtc/plane/encoder/connector */ > drm_mode_config_reset(dev); > > - drm_fbdev_generic_setup(dev, dev->mode_config.preferred_depth); > - > return 0; > > err: > @@ -355,6 +353,9 @@ static int hibmc_pci_probe(struct pci_dev *pdev, > ret); > goto err_unload; > } > + > + drm_fbdev_generic_setup(dev, dev->mode_config.preferred_depth); > + > return 0; > > err_unload: > -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer [-- Attachment #1.2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 516 bytes --] [-- Attachment #2: Type: text/plain, Size: 160 bytes --] _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-07-06 17:03 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-06 14:47 [PATCH] drm/hisilicon/hibmc: Move drm_fbdev_generic_setup() down to avoid the splat Zenghui Yu 2020-07-06 14:47 ` Zenghui Yu 2020-07-06 17:03 ` Thomas Zimmermann [this message] 2020-07-06 17:03 ` Thomas Zimmermann 2020-07-08 9:14 ` Xinliang Liu 2020-07-08 9:14 ` Xinliang Liu
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=aa244201-9b43-2d35-c236-21391e7af7d0@suse.de \ --to=tzimmermann@suse.de \ --cc=airlied@linux.ie \ --cc=daniel@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=john.stultz@linaro.org \ --cc=kong.kongxinwei@hisilicon.com \ --cc=linux-kernel@vger.kernel.org \ --cc=puck.chen@hisilicon.com \ --cc=sam@ravnborg.org \ --cc=wanghaibin.wang@huawei.com \ --cc=xinliang.liu@linaro.org \ --cc=yuzenghui@huawei.com \ --cc=zourongrong@gmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.