1 From 8fde5a249d84674a92b4732def88cbc47f2bb530 Mon Sep 17 00:00:00 2001
2 From: Eric Anholt <eric@anholt.net>
3 Date: Tue, 19 Apr 2016 13:24:14 -0700
4 Subject: [PATCH] drm/vc4: Kick out the simplefb framebuffer before we set up
7 If we don't, then simplefb stays loaded on /dev/fb0 even though
8 scanout isn't happening from simplefb's memory area any more, and you
9 end up with no console.
11 Signed-off-by: Eric Anholt <eric@anholt.net>
12 Acked-by: Dave Airlie <airlied@redhat.com>
13 (cherry picked from commit b3a15f6d55fb584dd4d8baac5d1b6a398720620c)
15 drivers/gpu/drm/vc4/vc4_drv.c | 20 ++++++++++++++++++++
16 1 file changed, 20 insertions(+)
18 --- a/drivers/gpu/drm/vc4/vc4_drv.c
19 +++ b/drivers/gpu/drm/vc4/vc4_drv.c
20 @@ -164,6 +164,24 @@ static void vc4_match_add_drivers(struct
24 +static void vc4_kick_out_firmware_fb(void)
26 + struct apertures_struct *ap;
28 + ap = alloc_apertures(1);
32 + /* Since VC4 is a UMA device, the simplefb node may have been
33 + * located anywhere in memory.
35 + ap->ranges[0].base = 0;
36 + ap->ranges[0].size = ~0;
38 + remove_conflicting_framebuffers(ap, "vc4drmfb", false);
42 static int vc4_drm_bind(struct device *dev)
44 struct platform_device *pdev = to_platform_device(dev);
45 @@ -208,6 +226,8 @@ static int vc4_drm_bind(struct device *d
49 + vc4_kick_out_firmware_fb();
51 ret = drm_dev_register(drm, 0);