summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnric Balletbo i Serra <eballetbo@iseebcn.com>2009-09-28 10:30:49 +0200
committerRichard Purdie <rpurdie@linux.intel.com>2009-10-14 16:16:04 +0100
commit5a8dd658727c82578771b2351dadc061c5f93b09 (patch)
tree80f2a5c645c60685be6a28f0633fbd70c563f63c
parent76425295541165421914ef354900a3f2534f59f2 (diff)
downloadopenembedded-core-5a8dd658727c82578771b2351dadc061c5f93b09.tar.gz
openembedded-core-5a8dd658727c82578771b2351dadc061c5f93b09.tar.bz2
openembedded-core-5a8dd658727c82578771b2351dadc061c5f93b09.zip
xf86-video-omapfb: Add X.Org driver for TI OMAP framebuffers
Sync with OE.dev Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r--meta/conf/distro/include/poky-fixed-revisions.inc1
-rw-r--r--meta/packages/xorg-driver/xf86-video-omapfb/omapfb-neon.diff146
-rw-r--r--meta/packages/xorg-driver/xf86-video-omapfb_git.bb22
3 files changed, 169 insertions, 0 deletions
diff --git a/meta/conf/distro/include/poky-fixed-revisions.inc b/meta/conf/distro/include/poky-fixed-revisions.inc
index a017e180ff..60092feef9 100644
--- a/meta/conf/distro/include/poky-fixed-revisions.inc
+++ b/meta/conf/distro/include/poky-fixed-revisions.inc
@@ -180,6 +180,7 @@ SRCREV_pn-xcb-proto-native ?= "d81ca233e98be8fa59e8c90d262c0516944c5a66"
SRCREV_pn-libxext ?= "49563f5d76637e2ca28fe0b91ce3114271c0955d"
SRCREV_pn-xf86-video-intel ?= "87ea531c5dc5b39809395b277c330854aaaaf019"
SRCREV_pn-xf86-video-intel-dri2 = "3dd7f0f9423bb891bc99cd3b77dc3d57e057a7ef"
+SRCREV_pn-xf86-video-omapfb = "5317aae587a2bf48f07a8c06bfaf7bcbfd23bafc"
SRCREV_pn-xf86-input-keyboard ?= "3e28d68b50d291938734e9684b8296ca864f3892"
SRCREV_pn-xf86-input-mouse ?= "ea5cfe804e112f320f14ad896c7802d53551d3e6"
SRCREV_pn-xf86-input-synaptics ?= "934bc0012f948c52aadc8eda912f7728fb7394a2"
diff --git a/meta/packages/xorg-driver/xf86-video-omapfb/omapfb-neon.diff b/meta/packages/xorg-driver/xf86-video-omapfb/omapfb-neon.diff
new file mode 100644
index 0000000000..325ca66f0c
--- /dev/null
+++ b/meta/packages/xorg-driver/xf86-video-omapfb/omapfb-neon.diff
@@ -0,0 +1,146 @@
+--- /tmp/image-format-conversions.h 2009-02-03 10:18:04.000000000 +0100
++++ git/src/image-format-conversions.h 2009-02-03 10:19:18.000000000 +0100
+@@ -30,6 +30,8 @@
+ /* Basic C implementation of YV12/I420 to UYVY conversion */
+ void uv12_to_uyvy(int w, int h, int y_pitch, int uv_pitch, uint8_t *y_p, uint8_t *u_p, uint8_t *v_p, uint8_t *dest);
+
++/* NEON implementation of YV12/I420 to UYVY conversion */
++void uv12_to_uyvy_neon(int w, int h, int y_pitch, int uv_pitch, uint8_t *y_p, uint8_t *u_p, uint8_t *v_p, uint8_t *dest);
+
+ #endif /* __IMAGE_FORMAT_CONVERSIONS_H__ */
+
+--- /tmp/image-format-conversions.c 2009-02-03 10:18:04.000000000 +0100
++++ git/src/image-format-conversions.c 2009-02-03 10:16:47.000000000 +0100
+@@ -2,6 +2,7 @@
+ * Copyright 2008 Kalle Vahlman, <zuh@iki.fi>
+ * Ilpo Ruotsalainen, <lonewolf@iki.fi>
+ * Tuomas Kulve, <tuomas.kulve@movial.com>
++ * Ian Rickards, <ian.rickards@arm.com>
+ *
+ *
+ * Permission to use, copy, modify, distribute and sell this software and its
+@@ -89,3 +90,104 @@
+ }
+ }
+
++void uv12_to_uyvy_neon(int w, int h, int y_pitch, int uv_pitch, uint8_t *y_p, uint8_t *u_p, uint8_t *v_p, uint8_t *dest)
++{
++ int x, y;
++ uint8_t *dest_even = dest;
++ uint8_t *dest_odd = dest + w * 2;
++ uint8_t *y_p_even = y_p;
++ uint8_t *y_p_odd = y_p + y_pitch;
++
++ /*ErrorF("in uv12_to_uyvy, w: %d, pitch: %d\n", w, pitch);*/
++ if (w<16)
++ {
++ for (y=0; y<h; y+=2)
++ {
++ for (x=0; x<w; x+=2)
++ {
++ /* Output two 2x1 macroblocks to form a 2x2 block from input */
++ uint8_t u_val = *u_p++;
++ uint8_t v_val = *v_p++;
++
++ /* Even row, first pixel */
++ *dest_even++ = u_val;
++ *dest_even++ = *y_p_even++;
++
++ /* Even row, second pixel */
++ *dest_even++ = v_val;
++ *dest_even++ = *y_p_even++;
++
++ /* Odd row, first pixel */
++ *dest_odd++ = u_val;
++ *dest_odd++ = *y_p_odd++;
++
++ /* Odd row, second pixel */
++ *dest_odd++ = v_val;
++ *dest_odd++ = *y_p_odd++;
++ }
++
++ dest_even += w * 2;
++ dest_odd += w * 2;
++
++ u_p += ((uv_pitch << 1) - w) >> 1;
++ v_p += ((uv_pitch << 1) - w) >> 1;
++
++ y_p_even += (y_pitch - w) + y_pitch;
++ y_p_odd += (y_pitch - w) + y_pitch;
++ }
++ }
++ else
++ {
++ for (y=0; y<h; y+=2)
++ {
++ x=w;
++ do {
++ // avoid using d8-d15 (q4-q7) aapcs callee-save registers
++ asm volatile (
++ "1:\n\t"
++ "vld1.u8 {d0}, [%[u_p]]!\n\t"
++ "sub %[x],%[x],#16\n\t"
++ "cmp %[x],#16\n\t"
++ "vld1.u8 {d1}, [%[v_p]]!\n\t"
++ "vld1.u8 {q1}, [%[y_p_even]]!\n\t"
++ "vzip.u8 d0, d1\n\t"
++ "vld1.u8 {q2}, [%[y_p_odd]]!\n\t"
++ // use 2-element struct stores to zip up y with y&v
++ "vst2.u8 {q0,q1}, [%[dest_even]]!\n\t"
++ "vmov.u8 q1, q2\n\t"
++ "vst2.u8 {q0,q1}, [%[dest_odd]]!\n\t"
++ "bhs 1b\n\t"
++ : [u_p] "+r" (u_p), [v_p] "+r" (v_p), [y_p_even] "+r" (y_p_even), [y_p_odd] "+r" (y_p_odd),
++ [dest_even] "+r" (dest_even), [dest_odd] "+r" (dest_odd),
++ [x] "+r" (x)
++ :
++ : "cc", "memory", "d0","d1","d2","d3","d4","d5"
++ );
++ if (x!=0)
++ {
++ // overlap final 16-pixel block to process requested width exactly
++ x = 16-x;
++ u_p -= x/2;
++ v_p -= x/2;
++ y_p_even -= x;
++ y_p_odd -= x;
++ dest_even -= x*2;
++ dest_odd -= x*2;
++ x = 16;
++ // do another 16-pixel block
++ }
++ }
++ while (x!=0);
++
++ dest_even += w * 2;
++ dest_odd += w * 2;
++
++ u_p += ((uv_pitch << 1) - w) >> 1;
++ v_p += ((uv_pitch << 1) - w) >> 1;
++
++ y_p_even += (y_pitch - w) + y_pitch;
++ y_p_odd += (y_pitch - w) + y_pitch;
++ }
++ }
++}
++
+--- /tmp/omapfb-xv-generic.c 2009-02-03 10:52:18.000000000 +0100
++++ git/src/omapfb-xv-generic.c 2009-02-03 10:52:24.000000000 +0100
+@@ -240,7 +240,7 @@
+ uint8_t *yb = buf;
+ uint8_t *ub = yb + (src_y_pitch * src_h);
+ uint8_t *vb = ub + (src_uv_pitch * (src_h / 2));
+- uv12_to_uyvy(src_w & ~15,
++ uv12_to_uyvy_neon(src_w & ~15,
+ src_h & ~15,
+ src_y_pitch,
+ src_uv_pitch,
+@@ -256,7 +256,7 @@
+ uint8_t *yb = buf;
+ uint8_t *vb = yb + (src_y_pitch * src_h);
+ uint8_t *ub = vb + (src_uv_pitch * (src_h / 2));
+- uv12_to_uyvy(src_w & ~15,
++ uv12_to_uyvy_neon(src_w & ~15,
+ src_h & ~15,
+ src_y_pitch,
+ src_uv_pitch,
diff --git a/meta/packages/xorg-driver/xf86-video-omapfb_git.bb b/meta/packages/xorg-driver/xf86-video-omapfb_git.bb
new file mode 100644
index 0000000000..a14ab220ea
--- /dev/null
+++ b/meta/packages/xorg-driver/xf86-video-omapfb_git.bb
@@ -0,0 +1,22 @@
+require xf86-driver-common.inc
+
+DESCRIPTION = "X.Org X server -- OMAP display driver"
+DEPENDS += "virtual/libx11"
+
+PE = "1"
+PR = "r0"
+PV = "0.1.1+git${SRCPV}"
+
+SRC_URI = "git://git.pingu.fi/xf86-video-omapfb.git;protocol=http \
+ "
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF_armv7a = " --enable-neon "
+CFLAGS += " -I${STAGING_INCDIR}/xorg "
+
+# Use overlay 2 on omap3 to enable other apps to use overlay 1 (e.g. dmai or omapfbplay)
+do_compile_prepend_armv7a () {
+ sed -i -e s:fb1:fb2:g ${S}/src/omapfb-xv.c
+}
+