Skip to content

Commit 00debf8

Browse files
Zenghui Yuxin3liang
authored andcommitted
drm/hisilicon/hibmc: Move drm_fbdev_generic_setup() down to avoid the splat
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 de99f06 ("drm/drv: DOC: Add driver example code"). Signed-off-by: Zenghui Yu <[email protected]> Reviewed-by: Thomas Zimmermann <[email protected]> Signed-off-by: Xinliang Liu <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 17f6470 commit 00debf8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,6 @@ static int hibmc_load(struct drm_device *dev)
307307
/* reset all the states of crtc/plane/encoder/connector */
308308
drm_mode_config_reset(dev);
309309

310-
drm_fbdev_generic_setup(dev, dev->mode_config.preferred_depth);
311-
312310
return 0;
313311

314312
err:
@@ -355,6 +353,9 @@ static int hibmc_pci_probe(struct pci_dev *pdev,
355353
ret);
356354
goto err_unload;
357355
}
356+
357+
drm_fbdev_generic_setup(dev, dev->mode_config.preferred_depth);
358+
358359
return 0;
359360

360361
err_unload:

0 commit comments

Comments
 (0)