aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2010-05-23 11:53:47 +0200
committerKoen Kooi <koen@openembedded.org>2010-05-23 11:53:47 +0200
commita018d190495f51b31f3b577026d3cd196c229c6f (patch)
tree4c830c4cc4d5a9b01d5f4c58df5c53a6e0a4976f
parent104b91c471125482eb83893425fb031557e892b4 (diff)
downloadopenembedded-a018d190495f51b31f3b577026d3cd196c229c6f.tar.gz
openembedded-a018d190495f51b31f3b577026d3cd196c229c6f.tar.bz2
openembedded-a018d190495f51b31f3b577026d3cd196c229c6f.zip
pixman 0.18.0: add NEON fix
pixman 0.18.2: add recipe and rediff patches, make default for angstrom
-rw-r--r--recipes/xorg-lib/pixman-0.18.0/missing-cache-preload.diff28
-rw-r--r--recipes/xorg-lib/pixman-0.18.2/0001-Generic-C-implementation-of-pixman_blt-with-overlapp.patch114
-rw-r--r--recipes/xorg-lib/pixman-0.18.2/0002-Support-of-overlapping-src-dst-for-pixman_blt_mmx.patch91
-rw-r--r--recipes/xorg-lib/pixman-0.18.2/0003-Support-of-overlapping-src-dst-for-pixman_blt_sse2.patch91
-rw-r--r--recipes/xorg-lib/pixman-0.18.2/0004-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch94
-rw-r--r--recipes/xorg-lib/pixman-0.18.2/0005-ARM-added-NEON-optimizations-for-fetch-store-r5g6b5-.patch169
-rw-r--r--recipes/xorg-lib/pixman-0.18.2/0006-A-copy-paste-version-of-16bpp-bilinear-scanline-fetc.patch261
-rw-r--r--recipes/xorg-lib/pixman-0.18.2/0007-ARM-added-missing-cache-preload.patch32
-rw-r--r--recipes/xorg-lib/pixman_0.18.0.bb4
-rw-r--r--recipes/xorg-lib/pixman_0.18.2.bb23
10 files changed, 905 insertions, 2 deletions
diff --git a/recipes/xorg-lib/pixman-0.18.0/missing-cache-preload.diff b/recipes/xorg-lib/pixman-0.18.0/missing-cache-preload.diff
new file mode 100644
index 0000000000..475bb35495
--- /dev/null
+++ b/recipes/xorg-lib/pixman-0.18.0/missing-cache-preload.diff
@@ -0,0 +1,28 @@
+From 4f45c7688e6b767a5f7b7f5cced51b4797a3c288 Mon Sep 17 00:00:00 2001
+From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
+Date: Fri, 21 May 2010 13:31:03 +0000
+Subject: ARM: added missing cache preload
+
+---
+diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S
+index 51bc347..a99555a 100644
+--- a/pixman/pixman-arm-neon-asm.S
++++ b/pixman/pixman-arm-neon-asm.S
+@@ -388,6 +388,7 @@ generate_composite_function \
+ vld1.16 {d4, d5}, [DST_R, :128]!
+ vst1.16 {d28, d29}, [DST_W, :128]!
+ pixman_composite_over_n_0565_process_pixblock_head
++ cache_preload 8, 8
+ .endm
+
+ .macro pixman_composite_over_n_0565_init
+@@ -660,6 +661,7 @@ generate_composite_function_single_scanline \
+ vld4.8 {d4, d5, d6, d7}, [DST_R, :128]!
+ vst4.8 {d28, d29, d30, d31}, [DST_W, :128]!
+ pixman_composite_over_8888_8888_process_pixblock_head
++ cache_preload 8, 8
+ .endm
+
+ .macro pixman_composite_over_n_8888_init
+--
+cgit v0.8.3-6-g21f6
diff --git a/recipes/xorg-lib/pixman-0.18.2/0001-Generic-C-implementation-of-pixman_blt-with-overlapp.patch b/recipes/xorg-lib/pixman-0.18.2/0001-Generic-C-implementation-of-pixman_blt-with-overlapp.patch
new file mode 100644
index 0000000000..b2488de4dd
--- /dev/null
+++ b/recipes/xorg-lib/pixman-0.18.2/0001-Generic-C-implementation-of-pixman_blt-with-overlapp.patch
@@ -0,0 +1,114 @@
+From 05875eca09ee23ea04ccb32f87c7c355fd1b88f3 Mon Sep 17 00:00:00 2001
+From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
+Date: Tue, 16 Mar 2010 16:55:28 +0100
+Subject: [PATCH 1/7] Generic C implementation of pixman_blt with overlapping support
+
+Uses memcpy/memmove functions to copy pixels, can handle the
+case when both source and destination areas are in the same
+image (this is useful for scrolling).
+
+It is assumed that copying direction is only important when
+using the same image for both source and destination (and
+src_stride == dst_stride). Copying direction is undefined
+for the images with different source and destination stride
+which happen to be in the overlapped areas (but this is an
+unrealistic case anyway).
+---
+ pixman/pixman-general.c | 21 ++++++++++++++++++---
+ pixman/pixman-private.h | 43 +++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 61 insertions(+), 3 deletions(-)
+
+diff --git a/pixman/pixman-general.c b/pixman/pixman-general.c
+index bddf79a..f525744 100644
+--- a/pixman/pixman-general.c
++++ b/pixman/pixman-general.c
+@@ -285,9 +285,24 @@ general_blt (pixman_implementation_t *imp,
+ int width,
+ int height)
+ {
+- /* We can't blit unless we have sse2 or mmx */
+-
+- return FALSE;
++ uint8_t *dst_bytes = (uint8_t *)dst_bits;
++ uint8_t *src_bytes = (uint8_t *)src_bits;
++ int bpp;
++
++ if (src_bpp != dst_bpp || src_bpp & 7)
++ return FALSE;
++
++ bpp = src_bpp >> 3;
++ width *= bpp;
++ src_stride *= 4;
++ dst_stride *= 4;
++ pixman_blt_helper (src_bytes + src_y * src_stride + src_x * bpp,
++ dst_bytes + dst_y * dst_stride + dst_x * bpp,
++ src_stride,
++ dst_stride,
++ width,
++ height);
++ return TRUE;
+ }
+
+ static pixman_bool_t
+diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
+index d5767af..eeb677d 100644
+--- a/pixman/pixman-private.h
++++ b/pixman/pixman-private.h
+@@ -10,6 +10,7 @@
+
+ #include "pixman.h"
+ #include <time.h>
++#include <string.h>
+ #include <assert.h>
+ #include <stdio.h>
+ #include <string.h>
+@@ -867,4 +868,46 @@ void pixman_timer_register (pixman_timer_t *timer);
+
+ #endif /* PIXMAN_TIMERS */
+
++/* a helper function, can blit 8-bit images with src/dst overlapping support */
++static inline void
++pixman_blt_helper (uint8_t *src_bytes,
++ uint8_t *dst_bytes,
++ int src_stride,
++ int dst_stride,
++ int width,
++ int height)
++{
++ /*
++ * The second part of this check is not strictly needed, but it prevents
++ * unnecessary upside-down processing of areas which belong to different
++ * images. Upside-down processing can be slower with fixed-distance-ahead
++ * prefetch and perceived as having more tearing.
++ */
++ if (src_bytes < dst_bytes + width &&
++ src_bytes + src_stride * height > dst_bytes)
++ {
++ src_bytes += src_stride * height - src_stride;
++ dst_bytes += dst_stride * height - dst_stride;
++ dst_stride = -dst_stride;
++ src_stride = -src_stride;
++ /* Horizontal scrolling to the left needs memmove */
++ if (src_bytes + width > dst_bytes)
++ {
++ while (--height >= 0)
++ {
++ memmove (dst_bytes, src_bytes, width);
++ dst_bytes += dst_stride;
++ src_bytes += src_stride;
++ }
++ return;
++ }
++ }
++ while (--height >= 0)
++ {
++ memcpy (dst_bytes, src_bytes, width);
++ dst_bytes += dst_stride;
++ src_bytes += src_stride;
++ }
++}
++
+ #endif /* PIXMAN_PRIVATE_H */
+--
+1.6.6.1
+
diff --git a/recipes/xorg-lib/pixman-0.18.2/0002-Support-of-overlapping-src-dst-for-pixman_blt_mmx.patch b/recipes/xorg-lib/pixman-0.18.2/0002-Support-of-overlapping-src-dst-for-pixman_blt_mmx.patch
new file mode 100644
index 0000000000..ca6a3c5220
--- /dev/null
+++ b/recipes/xorg-lib/pixman-0.18.2/0002-Support-of-overlapping-src-dst-for-pixman_blt_mmx.patch
@@ -0,0 +1,91 @@
+From 8aca14948a43f5cfd478e22cef745e55960d68cb Mon Sep 17 00:00:00 2001
+From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
+Date: Thu, 22 Oct 2009 05:45:47 +0300
+Subject: [PATCH 2/7] Support of overlapping src/dst for pixman_blt_mmx
+
+---
+ pixman/pixman-mmx.c | 55 +++++++++++++++++++++++++++++---------------------
+ 1 files changed, 32 insertions(+), 23 deletions(-)
+
+diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
+index d51b40c..6e0296b 100644
+--- a/pixman/pixman-mmx.c
++++ b/pixman/pixman-mmx.c
+@@ -2996,34 +2996,43 @@ pixman_blt_mmx (uint32_t *src_bits,
+ {
+ uint8_t * src_bytes;
+ uint8_t * dst_bytes;
+- int byte_width;
++ int bpp;
+
+- if (src_bpp != dst_bpp)
++ if (src_bpp != dst_bpp || src_bpp & 7)
+ return FALSE;
+
+- if (src_bpp == 16)
+- {
+- src_stride = src_stride * (int) sizeof (uint32_t) / 2;
+- dst_stride = dst_stride * (int) sizeof (uint32_t) / 2;
+- src_bytes = (uint8_t *)(((uint16_t *)src_bits) + src_stride * (src_y) + (src_x));
+- dst_bytes = (uint8_t *)(((uint16_t *)dst_bits) + dst_stride * (dst_y) + (dst_x));
+- byte_width = 2 * width;
+- src_stride *= 2;
+- dst_stride *= 2;
+- }
+- else if (src_bpp == 32)
++ bpp = src_bpp >> 3;
++ width *= bpp;
++ src_stride *= 4;
++ dst_stride *= 4;
++ src_bytes = (uint8_t *)src_bits + src_y * src_stride + src_x * bpp;
++ dst_bytes = (uint8_t *)dst_bits + dst_y * dst_stride + dst_x * bpp;
++
++ if (src_bpp != 16 && src_bpp != 32)
+ {
+- src_stride = src_stride * (int) sizeof (uint32_t) / 4;
+- dst_stride = dst_stride * (int) sizeof (uint32_t) / 4;
+- src_bytes = (uint8_t *)(((uint32_t *)src_bits) + src_stride * (src_y) + (src_x));
+- dst_bytes = (uint8_t *)(((uint32_t *)dst_bits) + dst_stride * (dst_y) + (dst_x));
+- byte_width = 4 * width;
+- src_stride *= 4;
+- dst_stride *= 4;
++ pixman_blt_helper (src_bytes, dst_bytes, src_stride, dst_stride,
++ width, height);
++ return TRUE;
+ }
+- else
++
++ if (src_bytes < dst_bytes && src_bytes + src_stride * height > dst_bytes)
+ {
+- return FALSE;
++ src_bytes += src_stride * height - src_stride;
++ dst_bytes += dst_stride * height - dst_stride;
++ dst_stride = -dst_stride;
++ src_stride = -src_stride;
++
++ if (src_bytes + width > dst_bytes)
++ {
++ /* TODO: reverse scanline copy using MMX */
++ while (--height >= 0)
++ {
++ memmove (dst_bytes, src_bytes, width);
++ dst_bytes += dst_stride;
++ src_bytes += src_stride;
++ }
++ return TRUE;
++ }
+ }
+
+ while (height--)
+@@ -3033,7 +3042,7 @@ pixman_blt_mmx (uint32_t *src_bits,
+ uint8_t *d = dst_bytes;
+ src_bytes += src_stride;
+ dst_bytes += dst_stride;
+- w = byte_width;
++ w = width;
+
+ while (w >= 2 && ((unsigned long)d & 3))
+ {
+--
+1.6.6.1
+
diff --git a/recipes/xorg-lib/pixman-0.18.2/0003-Support-of-overlapping-src-dst-for-pixman_blt_sse2.patch b/recipes/xorg-lib/pixman-0.18.2/0003-Support-of-overlapping-src-dst-for-pixman_blt_sse2.patch
new file mode 100644
index 0000000000..faeb6e67ab
--- /dev/null
+++ b/recipes/xorg-lib/pixman-0.18.2/0003-Support-of-overlapping-src-dst-for-pixman_blt_sse2.patch
@@ -0,0 +1,91 @@
+From 56c446d6912936eabcc6bdd583f37ee1209eff8c Mon Sep 17 00:00:00 2001
+From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
+Date: Thu, 22 Oct 2009 05:45:54 +0300
+Subject: [PATCH 3/7] Support of overlapping src/dst for pixman_blt_sse2
+
+---
+ pixman/pixman-sse2.c | 55 +++++++++++++++++++++++++++++--------------------
+ 1 files changed, 32 insertions(+), 23 deletions(-)
+
+diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c
+index d5349d7..aa34012 100644
+--- a/pixman/pixman-sse2.c
++++ b/pixman/pixman-sse2.c
+@@ -5328,34 +5328,43 @@ pixman_blt_sse2 (uint32_t *src_bits,
+ {
+ uint8_t * src_bytes;
+ uint8_t * dst_bytes;
+- int byte_width;
++ int bpp;
+
+- if (src_bpp != dst_bpp)
++ if (src_bpp != dst_bpp || src_bpp & 7)
+ return FALSE;
+
+- if (src_bpp == 16)
+- {
+- src_stride = src_stride * (int) sizeof (uint32_t) / 2;
+- dst_stride = dst_stride * (int) sizeof (uint32_t) / 2;
+- src_bytes =(uint8_t *)(((uint16_t *)src_bits) + src_stride * (src_y) + (src_x));
+- dst_bytes = (uint8_t *)(((uint16_t *)dst_bits) + dst_stride * (dst_y) + (dst_x));
+- byte_width = 2 * width;
+- src_stride *= 2;
+- dst_stride *= 2;
+- }
+- else if (src_bpp == 32)
++ bpp = src_bpp >> 3;
++ width *= bpp;
++ src_stride *= 4;
++ dst_stride *= 4;
++ src_bytes = (uint8_t *)src_bits + src_y * src_stride + src_x * bpp;
++ dst_bytes = (uint8_t *)dst_bits + dst_y * dst_stride + dst_x * bpp;
++
++ if (src_bpp != 16 && src_bpp != 32)
+ {
+- src_stride = src_stride * (int) sizeof (uint32_t) / 4;
+- dst_stride = dst_stride * (int) sizeof (uint32_t) / 4;
+- src_bytes = (uint8_t *)(((uint32_t *)src_bits) + src_stride * (src_y) + (src_x));
+- dst_bytes = (uint8_t *)(((uint32_t *)dst_bits) + dst_stride * (dst_y) + (dst_x));
+- byte_width = 4 * width;
+- src_stride *= 4;
+- dst_stride *= 4;
++ pixman_blt_helper (src_bytes, dst_bytes, src_stride, dst_stride,
++ width, height);
++ return TRUE;
+ }
+- else
++
++ if (src_bytes < dst_bytes && src_bytes + src_stride * height > dst_bytes)
+ {
+- return FALSE;
++ src_bytes += src_stride * height - src_stride;
++ dst_bytes += dst_stride * height - dst_stride;
++ dst_stride = -dst_stride;
++ src_stride = -src_stride;
++
++ if (src_bytes + width > dst_bytes)
++ {
++ /* TODO: reverse scanline copy using SSE2 */
++ while (--height >= 0)
++ {
++ memmove (dst_bytes, src_bytes, width);
++ dst_bytes += dst_stride;
++ src_bytes += src_stride;
++ }
++ return TRUE;
++ }
+ }
+
+ cache_prefetch ((__m128i*)src_bytes);
+@@ -5368,7 +5377,7 @@ pixman_blt_sse2 (uint32_t *src_bits,
+ uint8_t *d = dst_bytes;
+ src_bytes += src_stride;
+ dst_bytes += dst_stride;
+- w = byte_width;
++ w = width;
+
+ cache_prefetch_next ((__m128i*)s);
+ cache_prefetch_next ((__m128i*)d);
+--
+1.6.6.1
+
diff --git a/recipes/xorg-lib/pixman-0.18.2/0004-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch b/recipes/xorg-lib/pixman-0.18.2/0004-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch
new file mode 100644
index 0000000000..d56fd99c6f
--- /dev/null
+++ b/recipes/xorg-lib/pixman-0.18.2/0004-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch
@@ -0,0 +1,94 @@
+From 80c1eae677a6ea10d67bb7328230626cd8fce08e Mon Sep 17 00:00:00 2001
+From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
+Date: Wed, 18 Nov 2009 06:08:48 +0200
+Subject: [PATCH 4/7] Support of overlapping src/dst for pixman_blt_neon
+
+---
+ pixman/pixman-arm-neon.c | 62 +++++++++++++++++++++++++++++++++++++--------
+ 1 files changed, 51 insertions(+), 11 deletions(-)
+
+diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c
+index 6808b36..7feee1d 100644
+--- a/pixman/pixman-arm-neon.c
++++ b/pixman/pixman-arm-neon.c
+@@ -168,26 +168,66 @@ pixman_blt_neon (uint32_t *src_bits,
+ int width,
+ int height)
+ {
+- if (src_bpp != dst_bpp)
++ uint8_t * src_bytes;
++ uint8_t * dst_bytes;
++ int bpp;
++
++ if (src_bpp != dst_bpp || src_bpp & 7)
+ return FALSE;
+
++ bpp = src_bpp >> 3;
++ width *= bpp;
++ src_stride *= 4;
++ dst_stride *= 4;
++ src_bytes = (uint8_t *)src_bits + src_y * src_stride + src_x * bpp;
++ dst_bytes = (uint8_t *)dst_bits + dst_y * dst_stride + dst_x * bpp;
++
++ if (src_bpp != 16 && src_bpp != 32)
++ {
++ pixman_blt_helper (src_bytes, dst_bytes, src_stride, dst_stride,
++ width, height);
++ return TRUE;
++ }
++
++ if (src_bytes < dst_bytes && src_bytes + src_stride * height > dst_bytes)
++ {
++ src_bytes += src_stride * height - src_stride;
++ dst_bytes += dst_stride * height - dst_stride;
++ dst_stride = -dst_stride;
++ src_stride = -src_stride;
++
++ if (src_bytes + width > dst_bytes)
++ {
++ /* TODO: reverse scanline copy using NEON */
++ while (--height >= 0)
++ {
++ memmove (dst_bytes, src_bytes, width);
++ dst_bytes += dst_stride;
++ src_bytes += src_stride;
++ }
++ return TRUE;
++ }
++ }
++
+ switch (src_bpp)
+ {
+ case 16:
+ pixman_composite_src_0565_0565_asm_neon (
+- width, height,
+- (uint16_t *)(((char *) dst_bits) +
+- dst_y * dst_stride * 4 + dst_x * 2), dst_stride * 2,
+- (uint16_t *)(((char *) src_bits) +
+- src_y * src_stride * 4 + src_x * 2), src_stride * 2);
++ width >> 1,
++ height,
++ (uint16_t *) dst_bytes,
++ dst_stride >> 1,
++ (uint16_t *) src_bytes,
++ src_stride >> 1);
+ return TRUE;
+ case 32:
+ pixman_composite_src_8888_8888_asm_neon (
+- width, height,
+- (uint32_t *)(((char *) dst_bits) +
+- dst_y * dst_stride * 4 + dst_x * 4), dst_stride,
+- (uint32_t *)(((char *) src_bits) +
+- src_y * src_stride * 4 + src_x * 4), src_stride);
++ width >> 2,
++ height,
++ (uint32_t *) dst_bytes,
++ dst_stride >> 2,
++ (uint32_t *) src_bytes,
++ src_stride >> 2);
+ return TRUE;
+ default:
+ return FALSE;
+--
+1.6.6.1
+
diff --git a/recipes/xorg-lib/pixman-0.18.2/0005-ARM-added-NEON-optimizations-for-fetch-store-r5g6b5-.patch b/recipes/xorg-lib/pixman-0.18.2/0005-ARM-added-NEON-optimizations-for-fetch-store-r5g6b5-.patch
new file mode 100644
index 0000000000..39eda8b546
--- /dev/null
+++ b/recipes/xorg-lib/pixman-0.18.2/0005-ARM-added-NEON-optimizations-for-fetch-store-r5g6b5-.patch
@@ -0,0 +1,169 @@
+From 2f5774db49521e990c5e9f7cac684a06f4e67a43 Mon Sep 17 00:00:00 2001
+From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
+Date: Thu, 10 Dec 2009 00:51:50 +0200
+Subject: [PATCH 5/7] ARM: added NEON optimizations for fetch/store r5g6b5 scanline
+
+---
+ pixman/pixman-access.c | 23 ++++++++++++++++++++++-
+ pixman/pixman-arm-neon-asm.S | 20 ++++++++++++++++++++
+ pixman/pixman-arm-neon.c | 41 +++++++++++++++++++++++++++++++++++++++++
+ pixman/pixman-private.h | 5 +++++
+ 4 files changed, 88 insertions(+), 1 deletions(-)
+
+diff --git a/pixman/pixman-access.c b/pixman/pixman-access.c
+index fa0a267..5bb3e09 100644
+--- a/pixman/pixman-access.c
++++ b/pixman/pixman-access.c
+@@ -2748,7 +2748,7 @@ typedef struct
+ store_scanline_ ## format, store_scanline_generic_64 \
+ }
+
+-static const format_info_t accessors[] =
++static format_info_t accessors[] =
+ {
+ /* 32 bpp formats */
+ FORMAT_INFO (a8r8g8b8),
+@@ -2891,6 +2891,27 @@ _pixman_bits_image_setup_raw_accessors (bits_image_t *image)
+ setup_accessors (image);
+ }
+
++void
++_pixman_bits_override_accessors (pixman_format_code_t format,
++ fetch_scanline_t fetch_func,
++ store_scanline_t store_func)
++{
++ format_info_t *info = accessors;
++
++ while (info->format != PIXMAN_null)
++ {
++ if (info->format == format)
++ {
++ if (fetch_func)
++ info->fetch_scanline_raw_32 = fetch_func;
++ if (store_func)
++ info->store_scanline_raw_32 = store_func;
++ return;
++ }
++ info++;
++ }
++}
++
+ #else
+
+ void
+diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S
+index 51bc347..f30869e 100644
+--- a/pixman/pixman-arm-neon-asm.S
++++ b/pixman/pixman-arm-neon-asm.S
+@@ -458,6 +458,16 @@ generate_composite_function \
+ pixman_composite_src_8888_0565_process_pixblock_tail, \
+ pixman_composite_src_8888_0565_process_pixblock_tail_head
+
++generate_composite_function_single_scanline \
++ pixman_store_scanline_r5g6b5_asm_neon, 32, 0, 16, \
++ FLAG_DST_WRITEONLY | FLAG_DEINTERLEAVE_32BPP, \
++ 8, /* number of pixels, processed in a single block */ \
++ default_init, \
++ default_cleanup, \
++ pixman_composite_src_8888_0565_process_pixblock_head, \
++ pixman_composite_src_8888_0565_process_pixblock_tail, \
++ pixman_composite_src_8888_0565_process_pixblock_tail_head
++
+ /******************************************************************************/
+
+ .macro pixman_composite_src_0565_8888_process_pixblock_head
+@@ -493,6 +503,16 @@ generate_composite_function \
+ pixman_composite_src_0565_8888_process_pixblock_tail, \
+ pixman_composite_src_0565_8888_process_pixblock_tail_head
+
++generate_composite_function_single_scanline \
++ pixman_fetch_scanline_r5g6b5_asm_neon, 16, 0, 32, \
++ FLAG_DST_WRITEONLY | FLAG_DEINTERLEAVE_32BPP, \
++ 8, /* number of pixels, processed in a single block */ \
++ default_init, \
++ default_cleanup, \
++ pixman_composite_src_0565_8888_process_pixblock_head, \
++ pixman_composite_src_0565_8888_process_pixblock_tail, \
++ pixman_composite_src_0565_8888_process_pixblock_tail_head
++
+ /******************************************************************************/
+
+ .macro pixman_composite_add_8000_8000_process_pixblock_head
+diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c
+index 7feee1d..fda7a09 100644
+--- a/pixman/pixman-arm-neon.c
++++ b/pixman/pixman-arm-neon.c
+@@ -375,6 +375,43 @@ neon_combine_##name##_u (pixman_implementation_t *imp, \
+ BIND_COMBINE_U (over)
+ BIND_COMBINE_U (add)
+
++void
++pixman_fetch_scanline_r5g6b5_asm_neon (int width,
++ uint32_t *buffer,
++ const uint16_t *pixel);
++void
++pixman_store_scanline_r5g6b5_asm_neon (int width,
++ uint16_t *pixel,
++ const uint32_t *values);
++
++static void
++neon_fetch_scanline_r5g6b5 (pixman_image_t *image,
++ int x,
++ int y,
++ int width,
++ uint32_t * buffer,
++ const uint32_t *mask,
++ uint32_t mask_bits)
++{
++ const uint32_t *bits = image->bits.bits + y * image->bits.rowstride;
++ const uint16_t *pixel = (const uint16_t *)bits + x;
++
++ pixman_fetch_scanline_r5g6b5_asm_neon (width, buffer, pixel);
++}
++
++static void
++neon_store_scanline_r5g6b5 (bits_image_t * image,
++ int x,
++ int y,
++ int width,
++ const uint32_t *values)
++{
++ uint32_t *bits = image->bits + image->rowstride * y;
++ uint16_t *pixel = ((uint16_t *) bits) + x;
++
++ pixman_store_scanline_r5g6b5_asm_neon (width, pixel, values);
++}
++
+ pixman_implementation_t *
+ _pixman_implementation_create_arm_neon (void)
+ {
+@@ -385,6 +422,10 @@ _pixman_implementation_create_arm_neon (void)
+ imp->combine_32[PIXMAN_OP_OVER] = neon_combine_over_u;
+ imp->combine_32[PIXMAN_OP_ADD] = neon_combine_add_u;
+
++ _pixman_bits_override_accessors (PIXMAN_r5g6b5,
++ neon_fetch_scanline_r5g6b5,
++ neon_store_scanline_r5g6b5);
++
+ imp->blt = arm_neon_blt;
+ imp->fill = arm_neon_fill;
+
+diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
+index eeb677d..ba2d401 100644
+--- a/pixman/pixman-private.h
++++ b/pixman/pixman-private.h
+@@ -220,6 +220,11 @@ void
+ _pixman_bits_image_setup_raw_accessors (bits_image_t *image);
+
+ void
++_pixman_bits_override_accessors (pixman_format_code_t format,
++ fetch_scanline_t fetch_func,
++ store_scanline_t store_func);
++
++void
+ _pixman_image_get_scanline_generic_64 (pixman_image_t *image,
+ int x,
+ int y,
+--
+1.6.6.1
+
diff --git a/recipes/xorg-lib/pixman-0.18.2/0006-A-copy-paste-version-of-16bpp-bilinear-scanline-fetc.patch b/recipes/xorg-lib/pixman-0.18.2/0006-A-copy-paste-version-of-16bpp-bilinear-scanline-fetc.patch
new file mode 100644
index 0000000000..dd0e0f6d4e
--- /dev/null
+++ b/recipes/xorg-lib/pixman-0.18.2/0006-A-copy-paste-version-of-16bpp-bilinear-scanline-fetc.patch
@@ -0,0 +1,261 @@
+From fc24a2d8d0039cd10de4175da40bb784e2c3bf49 Mon Sep 17 00:00:00 2001
+From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
+Date: Fri, 4 Dec 2009 16:49:19 +0000
+Subject: [PATCH 6/7] A copy-paste version of 16bpp bilinear scanline fetcher
+
+---
+ pixman/pixman-bits-image.c | 228 +++++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 223 insertions(+), 5 deletions(-)
+
+diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c
+index 3d78ff0..1656975 100644
+--- a/pixman/pixman-bits-image.c
++++ b/pixman/pixman-bits-image.c
+@@ -535,6 +535,212 @@ bits_image_fetch_bilinear_no_repeat_8888 (pixman_image_t * ima,
+ *buffer++ = 0;
+ }
+
++static void
++bits_image_fetch_bilinear_no_repeat_0565 (pixman_image_t * ima,
++ int offset,
++ int line,
++ int width,
++ uint32_t * buffer,
++ const uint32_t * mask,
++ uint32_t mask_bits)
++{
++ bits_image_t *bits = &ima->bits;
++ pixman_fixed_t x_top, x_bottom, x;
++ pixman_fixed_t ux_top, ux_bottom, ux;
++ pixman_vector_t v;
++ uint32_t top_mask, bottom_mask;
++ uint16_t *top_row;
++ uint16_t *bottom_row;
++ uint32_t *end;
++ uint16_t zero[2] = { 0, 0 };
++ int y, y1, y2;
++ int disty;
++ int mask_inc;
++ int w;
++
++ /* reference point is the center of the pixel */
++ v.vector[0] = pixman_int_to_fixed (offset) + pixman_fixed_1 / 2;
++ v.vector[1] = pixman_int_to_fixed (line) + pixman_fixed_1 / 2;
++ v.vector[2] = pixman_fixed_1;
++
++ if (!pixman_transform_point_3d (bits->common.transform, &v))
++ return;
++
++ ux = ux_top = ux_bottom = bits->common.transform->matrix[0][0];
++ x = x_top = x_bottom = v.vector[0] - pixman_fixed_1/2;
++
++ y = v.vector[1] - pixman_fixed_1/2;
++ disty = (y >> 8) & 0xff;
++
++ /* Load the pointers to the first and second lines from the source
++ * image that bilinear code must read.
++ *
++ * The main trick in this code is about the check if any line are
++ * outside of the image;
++ *
++ * When I realize that a line (any one) is outside, I change
++ * the pointer to a dummy area with zeros. Once I change this, I
++ * must be sure the pointer will not change, so I set the
++ * variables to each pointer increments inside the loop.
++ */
++ y1 = pixman_fixed_to_int (y);
++ y2 = y1 + 1;
++
++ if (y1 < 0 || y1 >= bits->height)
++ {
++ top_row = zero;
++ x_top = 0;
++ ux_top = 0;
++ }
++ else
++ {
++ top_row = bits->bits + y1 * bits->rowstride;
++ x_top = x;
++ ux_top = ux;
++ }
++
++ if (y2 < 0 || y2 >= bits->height)
++ {
++ bottom_row = zero;
++ x_bottom = 0;
++ ux_bottom = 0;
++ }
++ else
++ {
++ bottom_row = bits->bits + y2 * bits->rowstride;
++ x_bottom = x;
++ ux_bottom = ux;
++ }
++
++ /* Instead of checking whether the operation uses the mast in
++ * each loop iteration, verify this only once and prepare the
++ * variables to make the code smaller inside the loop.
++ */
++ if (!mask)
++ {
++ mask_inc = 0;
++ mask_bits = 1;
++ mask = &mask_bits;
++ }
++ else
++ {
++ /* If have a mask, prepare the variables to check it */
++ mask_inc = 1;
++ }
++
++ /* If both are zero, then the whole thing is zero */
++ if (top_row == zero && bottom_row == zero)
++ {
++ memset (buffer, 0, width * sizeof (uint32_t));
++ return;
++ }
++ else
++ {
++ if (top_row == zero)
++ {
++ top_mask = 0;
++ bottom_mask = 0xff000000;
++ }
++ else if (bottom_row == zero)
++ {
++ top_mask = 0xff000000;
++ bottom_mask = 0;
++ }
++ else
++ {
++ top_mask = 0xff000000;
++ bottom_mask = 0xff000000;
++ }
++ }
++
++ end = buffer + width;
++
++ /* Zero fill to the left of the image */
++ while (buffer < end && x < pixman_fixed_minus_1)
++ {
++ *buffer++ = 0;
++ x += ux;
++ x_top += ux_top;
++ x_bottom += ux_bottom;
++ mask += mask_inc;
++ }
++
++ /* Left edge
++ */
++ while (buffer < end && x < 0)
++ {
++ uint32_t tr, br;
++ int32_t distx;
++
++ tr = CONVERT_0565_TO_0888 (top_row[pixman_fixed_to_int (x_top) + 1]) | top_mask;
++ br = CONVERT_0565_TO_0888 (bottom_row[pixman_fixed_to_int (x_bottom) + 1]) | bottom_mask;
++
++ distx = (x >> 8) & 0xff;
++
++ *buffer++ = bilinear_interpolation (0, tr, 0, br, distx, disty);
++
++ x += ux;
++ x_top += ux_top;
++ x_bottom += ux_bottom;
++ mask += mask_inc;
++ }
++
++ /* Main part */
++ w = pixman_int_to_fixed (bits->width - 1);
++
++ while (buffer < end && x < w)
++ {
++ if (*mask)
++ {
++ uint32_t tl, tr, bl, br;
++ int32_t distx;
++
++ tl = CONVERT_0565_TO_0888 (top_row [pixman_fixed_to_int (x_top)]) | top_mask;
++ tr = CONVERT_0565_TO_0888 (top_row [pixman_fixed_to_int (x_top) + 1]) | top_mask;
++ bl = CONVERT_0565_TO_0888 (bottom_row [pixman_fixed_to_int (x_bottom)]) | bottom_mask;
++ br = CONVERT_0565_TO_0888 (bottom_row [pixman_fixed_to_int (x_bottom) + 1]) | bottom_mask;
++
++ distx = (x >> 8) & 0xff;
++
++ *buffer = bilinear_interpolation (tl, tr, bl, br, distx, disty);
++ }
++
++ buffer++;
++ x += ux;
++ x_top += ux_top;
++ x_bottom += ux_bottom;
++ mask += mask_inc;
++ }
++
++ /* Right Edge */
++ w = pixman_int_to_fixed (bits->width);
++ while (buffer < end && x < w)
++ {
++ if (*mask)
++ {
++ uint32_t tl, bl;
++ int32_t distx;
++
++ tl = CONVERT_0565_TO_0888 (top_row [pixman_fixed_to_int (x_top)]) | top_mask;
++ bl = CONVERT_0565_TO_0888 (bottom_row [pixman_fixed_to_int (x_bottom)]) | bottom_mask;
++
++ distx = (x >> 8) & 0xff;
++
++ *buffer = bilinear_interpolation (tl, 0, bl, 0, distx, disty);
++ }
++
++ buffer++;
++ x += ux;
++ x_top += ux_top;
++ x_bottom += ux_bottom;
++ mask += mask_inc;
++ }
++
++ /* Zero fill to the left of the image */
++ while (buffer < end)
++ *buffer++ = 0;
++}
++
+ static force_inline uint32_t
+ bits_image_fetch_pixel_convolution (bits_image_t *image,
+ pixman_fixed_t x,
+@@ -917,14 +1123,26 @@ bits_image_property_changed (pixman_image_t *image)
+ (bits->common.filter == PIXMAN_FILTER_BILINEAR ||
+ bits->common.filter == PIXMAN_FILTER_GOOD ||
+ bits->common.filter == PIXMAN_FILTER_BEST) &&
+- bits->common.repeat == PIXMAN_REPEAT_NONE &&
+- (bits->format == PIXMAN_a8r8g8b8 ||
+- bits->format == PIXMAN_x8r8g8b8))
++ bits->common.repeat == PIXMAN_REPEAT_NONE)
+ {
+ image->common.get_scanline_64 =
+ _pixman_image_get_scanline_generic_64;
+- image->common.get_scanline_32 =
+- bits_image_fetch_bilinear_no_repeat_8888;
++
++ if (bits->format == PIXMAN_a8r8g8b8 || bits->format == PIXMAN_x8r8g8b8)
++ {
++ image->common.get_scanline_32 =
++ bits_image_fetch_bilinear_no_repeat_8888;
++ }
++ else if (bits->format == PIXMAN_r5g6b5)
++ {
++ image->common.get_scanline_32 =
++ bits_image_fetch_bilinear_no_repeat_0565;
++ }
++ else
++ {
++ image->common.get_scanline_32 =
++ bits_image_fetch_transformed;
++ }
+ }
+ else
+ {
+--
+1.6.6.1
+
diff --git a/recipes/xorg-lib/pixman-0.18.2/0007-ARM-added-missing-cache-preload.patch b/recipes/xorg-lib/pixman-0.18.2/0007-ARM-added-missing-cache-preload.patch
new file mode 100644
index 0000000000..f601d2ce26
--- /dev/null
+++ b/recipes/xorg-lib/pixman-0.18.2/0007-ARM-added-missing-cache-preload.patch
@@ -0,0 +1,32 @@
+From af8a33d3b132c0192d59c47426bb3a201cb64b32 Mon Sep 17 00:00:00 2001
+From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
+Date: Fri, 21 May 2010 13:31:03 +0000
+Subject: [PATCH 7/7] ARM: added missing cache preload
+
+---
+ pixman/pixman-arm-neon-asm.S | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S
+index f30869e..dc7fd69 100644
+--- a/pixman/pixman-arm-neon-asm.S
++++ b/pixman/pixman-arm-neon-asm.S
+@@ -388,6 +388,7 @@ generate_composite_function \
+ vld1.16 {d4, d5}, [DST_R, :128]!
+ vst1.16 {d28, d29}, [DST_W, :128]!
+ pixman_composite_over_n_0565_process_pixblock_head
++ cache_preload 8, 8
+ .endm
+
+ .macro pixman_composite_over_n_0565_init
+@@ -680,6 +681,7 @@ generate_composite_function_single_scanline \
+ vld4.8 {d4, d5, d6, d7}, [DST_R, :128]!
+ vst4.8 {d28, d29, d30, d31}, [DST_W, :128]!
+ pixman_composite_over_8888_8888_process_pixblock_head
++ cache_preload 8, 8
+ .endm
+
+ .macro pixman_composite_over_n_8888_init
+--
+1.6.6.1
+
diff --git a/recipes/xorg-lib/pixman_0.18.0.bb b/recipes/xorg-lib/pixman_0.18.0.bb
index b4fba422ef..783625bfa8 100644
--- a/recipes/xorg-lib/pixman_0.18.0.bb
+++ b/recipes/xorg-lib/pixman_0.18.0.bb
@@ -1,9 +1,8 @@
require pixman.inc
-PR = "${INC_PR}.2"
+PR = "${INC_PR}.3"
DEFAULT_PREFERENCE = "-1"
DEFAULT_PREFERENCE_shr = "2"
-DEFAULT_PREFERENCE_angstrom = "2"
SRC_URI += "\
file://0001-Generic-C-implementation-of-pixman_blt-with-overlapp.patch;patch=1 \
@@ -14,6 +13,7 @@ SRC_URI += "\
file://calloc.patch;patch=1 \
file://tls.patch;patch=1 \
file://565-scanline.patch;patch=1 \
+ file://missing-cache-preload.diff;patch=1 \
"
SRC_URI[archive.md5sum] = "a4fb870fc325be258089f1683642e976"
diff --git a/recipes/xorg-lib/pixman_0.18.2.bb b/recipes/xorg-lib/pixman_0.18.2.bb
new file mode 100644
index 0000000000..caac38b0af
--- /dev/null
+++ b/recipes/xorg-lib/pixman_0.18.2.bb
@@ -0,0 +1,23 @@
+require pixman.inc
+PR = "${INC_PR}.0"
+
+DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE_angstrom = "2"
+
+SRC_URI[archive.md5sum] = "5d1378fa61610dd5d3c7e0111b2c5253"
+SRC_URI[archive.sha256sum] = "80aee833b429d105d2c7593ef96993da04441b3b747084f1f3bfd7be594e1c45"
+
+SRC_URI += "\
+ file://0001-Generic-C-implementation-of-pixman_blt-with-overlapp.patch;patch=1\
+ file://0002-Support-of-overlapping-src-dst-for-pixman_blt_mmx.patch;patch=1\
+ file://0003-Support-of-overlapping-src-dst-for-pixman_blt_sse2.patch;patch=1\
+ file://0004-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch;patch=1\
+ file://0005-ARM-added-NEON-optimizations-for-fetch-store-r5g6b5-.patch;patch=1\
+ file://0006-A-copy-paste-version-of-16bpp-bilinear-scanline-fetc.patch;patch=1\
+ file://0007-ARM-added-missing-cache-preload.patch;patch=1\
+"
+
+NEON = " --disable-arm-neon "
+NEON_armv7a = " "
+
+EXTRA_OECONF = "${NEON} --disable-gtk"