summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vc4
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2016-04-19 20:24:14 (GMT)
committerEric Anholt <eric@anholt.net>2016-04-20 00:31:56 (GMT)
commitb3a15f6d55fb584dd4d8baac5d1b6a398720620c (patch)
tree9f36197f15d58a725c97644fc44d47e6f5d7f02c /drivers/gpu/drm/vc4
parentf55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff)
downloadlinux-b3a15f6d55fb584dd4d8baac5d1b6a398720620c.tar.xz
drm/vc4: Kick out the simplefb framebuffer before we set up KMS.
If we don't, then simplefb stays loaded on /dev/fb0 even though scanout isn't happening from simplefb's memory area any more, and you end up with no console. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/vc4')
-rw-r--r--drivers/gpu/drm/vc4/vc4_drv.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index b7d2ff0..109b106 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -153,6 +153,24 @@ static void vc4_match_add_drivers(struct device *dev,
}
}
+static void vc4_kick_out_firmware_fb(void)
+{
+ struct apertures_struct *ap;
+
+ ap = alloc_apertures(1);
+ if (!ap)
+ return;
+
+ /* Since VC4 is a UMA device, the simplefb node may have been
+ * located anywhere in memory.
+ */
+ ap->ranges[0].base = 0;
+ ap->ranges[0].size = ~0;
+
+ remove_conflicting_framebuffers(ap, "vc4drmfb", false);
+ kfree(ap);
+}
+
static int vc4_drm_bind(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
@@ -186,6 +204,8 @@ static int vc4_drm_bind(struct device *dev)
if (ret)
goto gem_destroy;
+ vc4_kick_out_firmware_fb();
+
ret = drm_dev_register(drm, 0);
if (ret < 0)
goto unbind_all;