|
@@ -98,11 +98,6 @@ static int sun4i_drv_bind(struct device *dev)
|
|
|
goto free_drm;
|
|
|
}
|
|
|
|
|
|
- /* drm_vblank_init calls kcalloc, which can fail */
|
|
|
- ret = drm_vblank_init(drm, 1);
|
|
|
- if (ret)
|
|
|
- goto free_mem_region;
|
|
|
-
|
|
|
drm_mode_config_init(drm);
|
|
|
|
|
|
ret = component_bind_all(drm->dev, drm);
|
|
@@ -111,6 +106,11 @@ static int sun4i_drv_bind(struct device *dev)
|
|
|
goto cleanup_mode_config;
|
|
|
}
|
|
|
|
|
|
+ /* drm_vblank_init calls kcalloc, which can fail */
|
|
|
+ ret = drm_vblank_init(drm, drm->mode_config.num_crtc);
|
|
|
+ if (ret)
|
|
|
+ goto free_mem_region;
|
|
|
+
|
|
|
drm->irq_enabled = true;
|
|
|
|
|
|
/* Remove early framebuffers (ie. simplefb) */
|