aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-3.10/0167-bcm2708fb-Allow-swapping-of-red-blue-in-24-32-modes.patch
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2014-02-28 20:30:08 +0000
committerFlorian Fainelli <florian@openwrt.org>2014-02-28 20:30:08 +0000
commit800930b924c19a56b3a6e94ad351cd0715fb410d (patch)
tree70158d97f68604d69da8da779507469cf930bf07 /target/linux/brcm2708/patches-3.10/0167-bcm2708fb-Allow-swapping-of-red-blue-in-24-32-modes.patch
parent68c939ba0b0a0dda84e7a2ae370155be9a5593bc (diff)
downloadupstream-800930b924c19a56b3a6e94ad351cd0715fb410d.tar.gz
upstream-800930b924c19a56b3a6e94ad351cd0715fb410d.tar.bz2
upstream-800930b924c19a56b3a6e94ad351cd0715fb410d.zip
brcm2708: update against latest rpi-3.10.y branch
Update our copies of the brcm2708 patches to the latest rpi-3.10-y rebased against linux-3.10.y stable (3.10.32). This should hopefully make it easier for us in the future to leverage the raspberry/rpi-* branches. Signed-off-by: Florian Fainelli <florian@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39770 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm2708/patches-3.10/0167-bcm2708fb-Allow-swapping-of-red-blue-in-24-32-modes.patch')
-rw-r--r--target/linux/brcm2708/patches-3.10/0167-bcm2708fb-Allow-swapping-of-red-blue-in-24-32-modes.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-3.10/0167-bcm2708fb-Allow-swapping-of-red-blue-in-24-32-modes.patch b/target/linux/brcm2708/patches-3.10/0167-bcm2708fb-Allow-swapping-of-red-blue-in-24-32-modes.patch
new file mode 100644
index 0000000000..5636c44f21
--- /dev/null
+++ b/target/linux/brcm2708/patches-3.10/0167-bcm2708fb-Allow-swapping-of-red-blue-in-24-32-modes.patch
@@ -0,0 +1,57 @@
+From 4e0660161587681630da35f525cacf17bed58795 Mon Sep 17 00:00:00 2001
+From: popcornmix <popcornmix@gmail.com>
+Date: Wed, 12 Feb 2014 12:01:56 +0000
+Subject: [PATCH 167/174] bcm2708fb: Allow swapping of red/blue in 24/32 modes
+
+---
+ drivers/video/bcm2708_fb.c | 14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+--- a/drivers/video/bcm2708_fb.c
++++ b/drivers/video/bcm2708_fb.c
+@@ -53,6 +53,7 @@ static u32 dma_busy_wait_threshold = 1<<
+ module_param(dma_busy_wait_threshold, int, 0644);
+ MODULE_PARM_DESC(dma_busy_wait_threshold, "Busy-wait for DMA completion below this area");
+
++static int fbswap = 0; /* module parameter */
+
+ /* this data structure describes each frame buffer device we find */
+
+@@ -185,7 +186,12 @@ static int bcm2708_fb_set_bitfields(stru
+ * encoded in the pixel data. Calculate their position from
+ * the bitfield length defined above.
+ */
+- if (ret == 0 && var->bits_per_pixel >= 24) {
++ if (ret == 0 && var->bits_per_pixel >= 24 && fbswap) {
++ var->blue.offset = 0;
++ var->green.offset = var->blue.offset + var->blue.length;
++ var->red.offset = var->green.offset + var->green.length;
++ var->transp.offset = var->red.offset + var->red.length;
++ } else if (ret == 0 && var->bits_per_pixel >= 24) {
+ var->red.offset = 0;
+ var->green.offset = var->red.offset + var->red.length;
+ var->blue.offset = var->green.offset + var->green.length;
+@@ -618,8 +624,8 @@ static int bcm2708_fb_register(struct bc
+
+ fb_set_var(&fb->fb, &fb->fb.var);
+
+- print_debug("BCM2708FB: registering framebuffer (%dx%d@%d)\n", fbwidth,
+- fbheight, fbdepth);
++ print_debug("BCM2708FB: registering framebuffer (%dx%d@%d) (%d)\n", fbwidth
++ fbheight, fbdepth, fbswap);
+
+ ret = register_framebuffer(&fb->fb);
+ print_debug("BCM2708FB: register framebuffer (%d)\n", ret);
+@@ -746,6 +752,7 @@ module_exit(bcm2708_fb_exit);
+ module_param(fbwidth, int, 0644);
+ module_param(fbheight, int, 0644);
+ module_param(fbdepth, int, 0644);
++module_param(fbswap, int, 0644);
+
+ MODULE_DESCRIPTION("BCM2708 framebuffer driver");
+ MODULE_LICENSE("GPL");
+@@ -753,3 +760,4 @@ MODULE_LICENSE("GPL");
+ MODULE_PARM_DESC(fbwidth, "Width of ARM Framebuffer");
+ MODULE_PARM_DESC(fbheight, "Height of ARM Framebuffer");
+ MODULE_PARM_DESC(fbdepth, "Bit depth of ARM Framebuffer");
++MODULE_PARM_DESC(fbswap, "Swap order of red and blue in 24 and 32 bit modes");