summaryrefslogtreecommitdiff
path: root/hardware/libhardware/libhardware.git-2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'hardware/libhardware/libhardware.git-2.patch')
-rw-r--r--hardware/libhardware/libhardware.git-2.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/hardware/libhardware/libhardware.git-2.patch b/hardware/libhardware/libhardware.git-2.patch
new file mode 100644
index 0000000..081c0f3
--- /dev/null
+++ b/hardware/libhardware/libhardware.git-2.patch
@@ -0,0 +1,40 @@
+From 3181e83bf7588a53e69dbe0135c82b72f9c61514 Mon Sep 17 00:00:00 2001
+From: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
+Date: Wed, 23 Nov 2011 11:24:12 +0059
+Subject: [PATCH] gralloc: Fix inverted colors on BRGA
+
+Don't assume any 32bpp mode is RGBX.
+This is a forward-port of
+commit f50b075a8b88eff482628e8ab62a04539117c7ea
+
+Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
+Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
+---
+ modules/gralloc/framebuffer.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/modules/gralloc/framebuffer.cpp b/modules/gralloc/framebuffer.cpp
+index e0831df..b7ba3b1 100644
+--- a/modules/gralloc/framebuffer.cpp
++++ b/modules/gralloc/framebuffer.cpp
+@@ -98,7 +98,7 @@ static int fb_post(struct framebuffer_device_t* dev, buffer_handle_t buffer)
+ m->info.activate = FB_ACTIVATE_VBL;
+ m->info.yoffset = offset / m->finfo.line_length;
+ if (ioctl(m->framebuffer->fd, FBIOPAN_DISPLAY, &m->info) == -1) {
+- LOGE("FBIOPAN_DISPLAY failed");
++ ALOGE("FBIOPAN_DISPLAY failed");
+ m->base.unlock(&m->base, buffer);
+ return -errno;
+ }
+@@ -330,7 +330,7 @@ int fb_device_open(hw_module_t const* module, const char* name,
+ if (status >= 0) {
+ int stride = m->finfo.line_length / (m->info.bits_per_pixel >> 3);
+ int format = (m->info.bits_per_pixel == 32)
+- ? HAL_PIXEL_FORMAT_RGBX_8888
++ ? (m->info.red.offset ? HAL_PIXEL_FORMAT_BGRA_8888 : HAL_PIXEL_FORMAT_RGBX_8888)
+ : HAL_PIXEL_FORMAT_RGB_565;
+ const_cast<uint32_t&>(dev->device.flags) = 0;
+ const_cast<uint32_t&>(dev->device.width) = m->info.xres;
+--
+1.7.9.5
+