From 5a8dd658727c82578771b2351dadc061c5f93b09 Mon Sep 17 00:00:00 2001 From: Enric Balletbo i Serra Date: Mon, 28 Sep 2009 10:30:49 +0200 Subject: xf86-video-omapfb: Add X.Org driver for TI OMAP framebuffers Sync with OE.dev Signed-off-by: Enric Balletbo i Serra Signed-off-by: Richard Purdie --- .../xorg-driver/xf86-video-omapfb/omapfb-neon.diff | 146 +++++++++++++++++++++ meta/packages/xorg-driver/xf86-video-omapfb_git.bb | 22 ++++ 2 files changed, 168 insertions(+) create mode 100644 meta/packages/xorg-driver/xf86-video-omapfb/omapfb-neon.diff create mode 100644 meta/packages/xorg-driver/xf86-video-omapfb_git.bb (limited to 'meta/packages') 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, + * Ilpo Ruotsalainen, + * Tuomas Kulve, ++ * Ian Rickards, + * + * + * 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> 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> 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 +} + -- cgit v1.2.3-54-g00ecf