mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-05 18:14:07 +08:00
drm/atmel-hlcdc: Rework the fbdev creation logic
Now that we wait for DRM panels to be available before registering the DRM device (returning -EPROBE_DEFER if the panel has not been probed yet), we no longer need to put the fbdev creation code in ->output_poll_changed(). This removes the 10 secs delay between DRM dev registration and fbdev creation (polling period = 10 seconds). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Reported-by: Alex Vazquez <avazquez.dev@gmail.com>
This commit is contained in:
parent
7ce7d89f48
commit
db02b7614a
@ -431,15 +431,8 @@ static void atmel_hlcdc_fb_output_poll_changed(struct drm_device *dev)
|
||||
{
|
||||
struct atmel_hlcdc_dc *dc = dev->dev_private;
|
||||
|
||||
if (dc->fbdev) {
|
||||
if (dc->fbdev)
|
||||
drm_fbdev_cma_hotplug_event(dc->fbdev);
|
||||
} else {
|
||||
dc->fbdev = drm_fbdev_cma_init(dev, 24,
|
||||
dev->mode_config.num_crtc,
|
||||
dev->mode_config.num_connector);
|
||||
if (IS_ERR(dc->fbdev))
|
||||
dc->fbdev = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
struct atmel_hlcdc_dc_commit {
|
||||
@ -653,10 +646,13 @@ static int atmel_hlcdc_dc_load(struct drm_device *dev)
|
||||
|
||||
platform_set_drvdata(pdev, dev);
|
||||
|
||||
drm_kms_helper_poll_init(dev);
|
||||
dc->fbdev = drm_fbdev_cma_init(dev, 24,
|
||||
dev->mode_config.num_crtc,
|
||||
dev->mode_config.num_connector);
|
||||
if (IS_ERR(dc->fbdev))
|
||||
dc->fbdev = NULL;
|
||||
|
||||
/* force connectors detection */
|
||||
drm_helper_hpd_irq_event(dev);
|
||||
drm_kms_helper_poll_init(dev);
|
||||
|
||||
return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user