aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.4/0333-drm-vc4-Kick-out-the-simplefb-framebuffer-before-we-.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2016-09-10 14:54:26 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2016-09-10 14:54:26 +0200
commit2b1c6b21b5e6c82ebb55d7fb7df90e60e88cbb14 (patch)
treeba6d48b4fec219d07110f5d55afc19bc309d2bdb /target/linux/brcm2708/patches-4.4/0333-drm-vc4-Kick-out-the-simplefb-framebuffer-before-we-.patch
parentac08cb06f6734ebf73ed855cbc836c566f80eaca (diff)
downloadupstream-2b1c6b21b5e6c82ebb55d7fb7df90e60e88cbb14.tar.gz
upstream-2b1c6b21b5e6c82ebb55d7fb7df90e60e88cbb14.tar.bz2
upstream-2b1c6b21b5e6c82ebb55d7fb7df90e60e88cbb14.zip
brcm2708: update linux 4.4 patches to latest version
As usual these patches were extracted and rebased from the raspberry pi repo: https://github.com/raspberrypi/linux/tree/rpi-4.4.y Also adds support for Raspberry Pi Compute Module 3 (untested). Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.4/0333-drm-vc4-Kick-out-the-simplefb-framebuffer-before-we-.patch')
-rw-r--r--target/linux/brcm2708/patches-4.4/0333-drm-vc4-Kick-out-the-simplefb-framebuffer-before-we-.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0333-drm-vc4-Kick-out-the-simplefb-framebuffer-before-we-.patch b/target/linux/brcm2708/patches-4.4/0333-drm-vc4-Kick-out-the-simplefb-framebuffer-before-we-.patch
new file mode 100644
index 0000000000..8347338589
--- /dev/null
+++ b/target/linux/brcm2708/patches-4.4/0333-drm-vc4-Kick-out-the-simplefb-framebuffer-before-we-.patch
@@ -0,0 +1,53 @@
+From 8fde5a249d84674a92b4732def88cbc47f2bb530 Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric@anholt.net>
+Date: Tue, 19 Apr 2016 13:24:14 -0700
+Subject: [PATCH] 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>
+(cherry picked from commit b3a15f6d55fb584dd4d8baac5d1b6a398720620c)
+---
+ drivers/gpu/drm/vc4/vc4_drv.c | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+--- a/drivers/gpu/drm/vc4/vc4_drv.c
++++ b/drivers/gpu/drm/vc4/vc4_drv.c
+@@ -164,6 +164,24 @@ static void vc4_match_add_drivers(struct
+ }
+ }
+
++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);
+@@ -208,6 +226,8 @@ static int vc4_drm_bind(struct device *d
+ if (ret)
+ goto gem_destroy;
+
++ vc4_kick_out_firmware_fb();
++
+ ret = drm_dev_register(drm, 0);
+ if (ret < 0)
+ goto unbind_all;