aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/xorg-lib
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2010-06-22 20:30:30 +0200
committerKoen Kooi <koen@openembedded.org>2010-06-22 20:31:28 +0200
commite1a2447f2aed249ea38143b9c262f2d9c9b884b9 (patch)
tree0dbd2b8d3ff3383dd3704afb6fa4a38fe486cdb6 /recipes/xorg-lib
parentd6bf243f65efb44505092f8b4b43d0bb38f85a83 (diff)
downloadopenembedded-e1a2447f2aed249ea38143b9c262f2d9c9b884b9.tar.gz
pixman 0.18.2: add 2 more neon patches
Diffstat (limited to 'recipes/xorg-lib')
-rw-r--r--recipes/xorg-lib/pixman-0.18.2/565-over-neon.patch23
-rw-r--r--recipes/xorg-lib/pixman-0.18.2/neon-reverse-u.patch175
-rw-r--r--recipes/xorg-lib/pixman_0.18.2.bb4
3 files changed, 201 insertions, 1 deletions
diff --git a/recipes/xorg-lib/pixman-0.18.2/565-over-neon.patch b/recipes/xorg-lib/pixman-0.18.2/565-over-neon.patch
new file mode 100644
index 0000000000..c8156c4d78
--- /dev/null
+++ b/recipes/xorg-lib/pixman-0.18.2/565-over-neon.patch
@@ -0,0 +1,23 @@
+From d297443267de0f5fab49ec245df9055a0dddddaf Mon Sep 17 00:00:00 2001
+From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
+Date: Tue, 25 May 2010 17:21:26 +0000
+Subject: ARM: NEON: don't hit general path for r5g6b5 OVER r5g6b5 operation
+
+OVER can't be reduced to SRC because the source image is not
+considered opaque when repeat is set to PIXMAN_REPEAT_NONE.
+An additional fast path table entry solves the problem.
+---
+diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c
+index 64aa908..394dcea 100644
+--- a/pixman/pixman-arm-neon.c
++++ b/pixman/pixman-arm-neon.c
+@@ -246,6 +246,7 @@ static const pixman_fast_path_t arm_neon_fast_paths[] =
+ PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, x8b8g8r8, neon_composite_over_8888_8888),
+ PIXMAN_STD_FAST_PATH (OVER, x8r8g8b8, null, a8r8g8b8, neon_composite_src_x888_8888),
+ PIXMAN_STD_FAST_PATH (OVER, x8b8g8r8, null, a8b8g8r8, neon_composite_src_x888_8888),
++ PIXMAN_STD_FAST_PATH (OVER, r5g6b5, null, r5g6b5, neon_composite_src_0565_0565),
+ PIXMAN_STD_FAST_PATH (ADD, solid, a8, a8, neon_composite_add_n_8_8),
+ PIXMAN_STD_FAST_PATH (ADD, a8, a8, a8, neon_composite_add_8_8_8),
+ PIXMAN_STD_FAST_PATH (ADD, a8r8g8b8, a8r8g8b8, a8r8g8b8, neon_composite_add_8888_8888_8888),
+--
+cgit v0.8.3-6-g21f6
diff --git a/recipes/xorg-lib/pixman-0.18.2/neon-reverse-u.patch b/recipes/xorg-lib/pixman-0.18.2/neon-reverse-u.patch
new file mode 100644
index 0000000000..76726ce1ae
--- /dev/null
+++ b/recipes/xorg-lib/pixman-0.18.2/neon-reverse-u.patch
@@ -0,0 +1,175 @@
+From e0017c2a676b267900e48c6f32a6e973395c83d3 Mon Sep 17 00:00:00 2001
+From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
+Date: Mon, 31 May 2010 16:24:43 +0000
+Subject: ARM: 'neon_combine_out_reverse_u' combiner
+
+---
+diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S
+index f30869e..44fbfce 100644
+--- a/pixman/pixman-arm-neon-asm.S
++++ b/pixman/pixman-arm-neon-asm.S
+@@ -597,7 +597,7 @@ generate_composite_function_single_scanline \
+
+ /******************************************************************************/
+
+-.macro pixman_composite_over_8888_8888_process_pixblock_head
++.macro pixman_composite_out_reverse_8888_8888_process_pixblock_head
+ vmvn.8 d24, d3 /* get inverted alpha */
+ /* do alpha blending */
+ vmull.u8 q8, d24, d4
+@@ -606,7 +606,7 @@ generate_composite_function_single_scanline \
+ vmull.u8 q11, d24, d7
+ .endm
+
+-.macro pixman_composite_over_8888_8888_process_pixblock_tail
++.macro pixman_composite_out_reverse_8888_8888_process_pixblock_tail
+ vrshr.u16 q14, q8, #8
+ vrshr.u16 q15, q9, #8
+ vrshr.u16 q12, q10, #8
+@@ -615,6 +615,56 @@ generate_composite_function_single_scanline \
+ vraddhn.u16 d29, q15, q9
+ vraddhn.u16 d30, q12, q10
+ vraddhn.u16 d31, q13, q11
++.endm
++
++.macro pixman_composite_out_reverse_8888_8888_process_pixblock_tail_head
++ vld4.8 {d4, d5, d6, d7}, [DST_R, :128]!
++ vrshr.u16 q14, q8, #8
++ PF add PF_X, PF_X, #8
++ PF tst PF_CTL, #0xF
++ vrshr.u16 q15, q9, #8
++ vrshr.u16 q12, q10, #8
++ vrshr.u16 q13, q11, #8
++ PF addne PF_X, PF_X, #8
++ PF subne PF_CTL, PF_CTL, #1
++ vraddhn.u16 d28, q14, q8
++ vraddhn.u16 d29, q15, q9
++ PF cmp PF_X, ORIG_W
++ vraddhn.u16 d30, q12, q10
++ vraddhn.u16 d31, q13, q11
++ vld4.8 {d0, d1, d2, d3}, [SRC]!
++ PF pld, [PF_SRC, PF_X, lsl #src_bpp_shift]
++ vmvn.8 d22, d3
++ PF pld, [PF_DST, PF_X, lsl #dst_bpp_shift]
++ vst4.8 {d28, d29, d30, d31}, [DST_W, :128]!
++ PF subge PF_X, PF_X, ORIG_W
++ vmull.u8 q8, d22, d4
++ PF subges PF_CTL, PF_CTL, #0x10
++ vmull.u8 q9, d22, d5
++ PF ldrgeb DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
++ vmull.u8 q10, d22, d6
++ PF ldrgeb DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
++ vmull.u8 q11, d22, d7
++.endm
++
++generate_composite_function_single_scanline \
++ pixman_composite_scanline_out_reverse_asm_neon, 32, 0, 32, \
++ FLAG_DST_READWRITE | FLAG_DEINTERLEAVE_32BPP, \
++ 8, /* number of pixels, processed in a single block */ \
++ default_init, \
++ default_cleanup, \
++ pixman_composite_out_reverse_8888_8888_process_pixblock_head, \
++ pixman_composite_out_reverse_8888_8888_process_pixblock_tail, \
++ pixman_composite_out_reverse_8888_8888_process_pixblock_tail_head
++
++/******************************************************************************/
++
++.macro pixman_composite_over_8888_8888_process_pixblock_head
++ pixman_composite_out_reverse_8888_8888_process_pixblock_head
++.endm
++
++.macro pixman_composite_over_8888_8888_process_pixblock_tail
++ pixman_composite_out_reverse_8888_8888_process_pixblock_tail
+ vqadd.u8 q14, q0, q14
+ vqadd.u8 q15, q1, q15
+ .endm
+@@ -1416,7 +1466,7 @@ generate_composite_function_single_scanline \
+
+ /******************************************************************************/
+
+-.macro pixman_composite_over_8888_n_8888_process_pixblock_head
++.macro pixman_composite_out_reverse_8888_n_8888_process_pixblock_head
+ /* expecting source data in {d0, d1, d2, d3} */
+ /* destination data in {d4, d5, d6, d7} */
+ /* solid mask is in d15 */
+@@ -1442,7 +1492,7 @@ generate_composite_function_single_scanline \
+ vmull.u8 q11, d24, d7
+ .endm
+
+-.macro pixman_composite_over_8888_n_8888_process_pixblock_tail
++.macro pixman_composite_out_reverse_8888_n_8888_process_pixblock_tail
+ vrshr.u16 q14, q8, #8
+ vrshr.u16 q15, q9, #8
+ vrshr.u16 q12, q10, #8
+@@ -1451,6 +1501,49 @@ generate_composite_function_single_scanline \
+ vraddhn.u16 d29, q15, q9
+ vraddhn.u16 d30, q12, q10
+ vraddhn.u16 d31, q13, q11
++.endm
++
++.macro pixman_composite_out_reverse_8888_8888_8888_init
++ vpush {d8-d15}
++.endm
++
++.macro pixman_composite_out_reverse_8888_8888_8888_cleanup
++ vpop {d8-d15}
++.endm
++
++/* TODO: expand macros and do better instructions scheduling */
++.macro pixman_composite_out_reverse_8888_8888_8888_process_pixblock_tail_head
++ vld4.8 {d4, d5, d6, d7}, [DST_R, :128]!
++ pixman_composite_out_reverse_8888_n_8888_process_pixblock_tail
++ vld4.8 {d0, d1, d2, d3}, [SRC]!
++ cache_preload 8, 8
++ vld4.8 {d12, d13, d14, d15}, [MASK]!
++ pixman_composite_out_reverse_8888_n_8888_process_pixblock_head
++ vst4.8 {d28, d29, d30, d31}, [DST_W, :128]!
++.endm
++
++generate_composite_function_single_scanline \
++ pixman_composite_scanline_out_reverse_mask_asm_neon, 32, 32, 32, \
++ FLAG_DST_READWRITE | FLAG_DEINTERLEAVE_32BPP, \
++ 8, /* number of pixels, processed in a single block */ \
++ pixman_composite_out_reverse_8888_8888_8888_init, \
++ pixman_composite_out_reverse_8888_8888_8888_cleanup, \
++ pixman_composite_out_reverse_8888_n_8888_process_pixblock_head, \
++ pixman_composite_out_reverse_8888_n_8888_process_pixblock_tail, \
++ pixman_composite_out_reverse_8888_8888_8888_process_pixblock_tail_head \
++ 28, /* dst_w_basereg */ \
++ 4, /* dst_r_basereg */ \
++ 0, /* src_basereg */ \
++ 12 /* mask_basereg */
++
++/******************************************************************************/
++
++.macro pixman_composite_over_8888_n_8888_process_pixblock_head
++ pixman_composite_out_reverse_8888_n_8888_process_pixblock_head
++.endm
++
++.macro pixman_composite_over_8888_n_8888_process_pixblock_tail
++ pixman_composite_out_reverse_8888_n_8888_process_pixblock_tail
+ vqadd.u8 q14, q0, q14
+ vqadd.u8 q15, q1, q15
+ .endm
+diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c
+index 394dcea..1be9606 100644
+--- a/pixman/pixman-arm-neon.c
++++ b/pixman/pixman-arm-neon.c
+@@ -335,6 +335,7 @@ neon_combine_##name##_u (pixman_implementation_t *imp, \
+
+ BIND_COMBINE_U (over)
+ BIND_COMBINE_U (add)
++BIND_COMBINE_U (out_reverse)
+
+ void
+ pixman_fetch_scanline_r5g6b5_asm_neon (int width,
+@@ -382,6 +383,7 @@ _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;
++ imp->combine_32[PIXMAN_OP_OUT_REVERSE] = neon_combine_out_reverse_u;
+
+ _pixman_bits_override_accessors (PIXMAN_r5g6b5,
+ neon_fetch_scanline_r5g6b5,
+--
+cgit v0.8.3-6-g21f6
diff --git a/recipes/xorg-lib/pixman_0.18.2.bb b/recipes/xorg-lib/pixman_0.18.2.bb
index d07084015e..9b37cb3740 100644
--- a/recipes/xorg-lib/pixman_0.18.2.bb
+++ b/recipes/xorg-lib/pixman_0.18.2.bb
@@ -1,5 +1,5 @@
require pixman.inc
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
DEFAULT_PREFERENCE = "-1"
DEFAULT_PREFERENCE_angstrom = "2"
@@ -15,6 +15,8 @@ SRC_URI += "\
file://0005-ARM-added-NEON-optimizations-for-fetch-store-r5g6b5-.patch\
file://0006-A-copy-paste-version-of-16bpp-bilinear-scanline-fetc.patch\
file://0007-ARM-added-missing-cache-preload.patch\
+ file://565-over-neon.patch \
+ file://neon-reverse-u.patch \
"
NEON = " --disable-arm-neon "