* [PATCH] drm/vc4: Kick out the simplefb framebuffer before we set up KMS.
@ 2016-04-19 20:37 Eric Anholt
2016-04-19 21:33 ` Dave Airlie
0 siblings, 1 reply; 2+ messages in thread
From: Eric Anholt @ 2016-04-19 20:37 UTC (permalink / raw)
To: dri-devel
Cc: linux-fbdev, Florian Fainelli, Stephen Warren, linux-kernel,
Hans de Goede, linux-rpi-kernel
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>
---
Dave: It would be nice if I could merge this patch through
bcm2835-dt-next, where I'm trying to get the VC4 DT merged even though
the defconfig includes both VC4 and simplefb. There aren't any
conflicts with anything I'm merging through drm-next.
drivers/gpu/drm/vc4/vc4_drv.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index b7d2ff0e6e1f..109b10651959 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;
--
2.8.0.rc3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/vc4: Kick out the simplefb framebuffer before we set up KMS.
2016-04-19 20:37 [PATCH] drm/vc4: Kick out the simplefb framebuffer before we set up KMS Eric Anholt
@ 2016-04-19 21:33 ` Dave Airlie
0 siblings, 0 replies; 2+ messages in thread
From: Dave Airlie @ 2016-04-19 21:33 UTC (permalink / raw)
To: Eric Anholt
Cc: Linux Fbdev development list, Florian Fainelli, Stephen Warren,
LKML, dri-devel, Hans de Goede, linux-rpi-kernel
On 20 April 2016 at 06:37, Eric Anholt <eric@anholt.net> wrote:
> 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>
> ---
>
> Dave: It would be nice if I could merge this patch through
> bcm2835-dt-next, where I'm trying to get the VC4 DT merged even though
> the defconfig includes both VC4 and simplefb. There aren't any
> conflicts with anything I'm merging through drm-next.
sounds fine.
Acked-by: Dave Airlie <airlied@redhat.com>
Dave.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-19 21:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-19 20:37 [PATCH] drm/vc4: Kick out the simplefb framebuffer before we set up KMS Eric Anholt
2016-04-19 21:33 ` Dave Airlie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).