|
|
@@ -125,6 +125,22 @@ static struct drm_driver sun4i_drv_driver = {
|
|
|
.disable_vblank = sun4i_drv_disable_vblank,
|
|
|
};
|
|
|
|
|
|
+static void sun4i_remove_framebuffers(void)
|
|
|
+{
|
|
|
+ struct apertures_struct *ap;
|
|
|
+
|
|
|
+ ap = alloc_apertures(1);
|
|
|
+ if (!ap)
|
|
|
+ return;
|
|
|
+
|
|
|
+ /* The framebuffer can be located anywhere in RAM */
|
|
|
+ ap->ranges[0].base = 0;
|
|
|
+ ap->ranges[0].size = ~0;
|
|
|
+
|
|
|
+ remove_conflicting_framebuffers(ap, "sun4i-drm-fb", false);
|
|
|
+ kfree(ap);
|
|
|
+}
|
|
|
+
|
|
|
static int sun4i_drv_bind(struct device *dev)
|
|
|
{
|
|
|
struct drm_device *drm;
|
|
|
@@ -172,6 +188,9 @@ static int sun4i_drv_bind(struct device *dev)
|
|
|
}
|
|
|
drm->irq_enabled = true;
|
|
|
|
|
|
+ /* Remove early framebuffers (ie. simplefb) */
|
|
|
+ sun4i_remove_framebuffers();
|
|
|
+
|
|
|
/* Create our framebuffer */
|
|
|
drv->fbdev = sun4i_framebuffer_init(drm);
|
|
|
if (IS_ERR(drv->fbdev)) {
|