[MPlayer-dev-eng] [PATCH] OMAPFB FBDev Workaround for Tearing during Playback
Grant Erickson
marathon96 at gmail.com
Sat Sep 17 23:14:46 CEST 2011
The attached patch works around tearing issues during playback in the
mplayer vo_fbdev.c wrapper for the TI OMAPFB fbdev driver. See
http://processors.wiki.ti.com/index.php/OMAP35x_Linux_-_DSS_FAQ
http://www.spinics.net/lists/linux-omap/msg40710.html
for more information.
Best,
Grant Erickson
----
--- a/configure 2011-09-15 16:36:13.487956217 -0700
+++ b/configure 2011-09-15 16:22:45.003976019 -0700
@@ -482,6 +482,7 @@
--enable-xshape enable XShape support [autodetect]
--disable-xss disable screensaver support via xss [autodetect]
--enable-fbdev enable FBDev video output [autodetect]
+ --enable-omapfb enable TI OMAP video output [autodetect]
--enable-mlib enable mediaLib video output (Solaris) [disable]
--enable-3dfx enable obsolete /dev/3dfx video output [disable]
--enable-tdfxfb enable tdfxfb video output [disable]
@@ -683,6 +684,7 @@
_svga=auto
_vesa=auto
_fbdev=auto
+_omapfb=auto
_dvb=auto
_dxr2=auto
_dxr3=auto
@@ -1047,6 +1049,8 @@
--disable-vesa) _vesa=no ;;
--enable-fbdev) _fbdev=yes ;;
--disable-fbdev) _fbdev=no ;;
+ --enable-omapfb) _omapfb=yes ;;
+ --disable-omapfb) _omapfb=no ;;
--enable-dvb) _dvb=yes ;;
--disable-dvb) _dvb=no ;;
--enable-dxr2) _dxr2=yes ;;
@@ -4686,7 +4690,23 @@
fi
echores "$_fbdev"
-
+echocheck "OMAPFB"
+if test "$_omapfb" = auto ; then
+ _omapfb=no
+ cat > $TMPC <<EOF
+#include <unistd.h>
+#include <sys/ioctl.h>
+#include <linux/omapfb.h>
+int main(void) { ioctl(0, OMAPFB_WAITFORGO, 0); return 0; }
+EOF
+ cc_check && _omapfb=yes
+fi
+if test "$_omapfb" = yes ; then
+ def_omapfb='#define CONFIG_OMAPFB 1'
+else
+ def_omapfb='#undef CONFIG_OMAPFB'
+fi
+echores "$_omapfb"
echocheck "DVB"
if test "$_dvb" = auto ; then
@@ -7952,6 +7972,7 @@
FAAD = $_faad
FASTMEMCPY = $_fastmemcpy
FBDEV = $_fbdev
+OMAPFB = $_omapfb
FREETYPE = $_freetype
FTP = $_ftp
GIF = $_gif
@@ -8490,6 +8511,7 @@
$def_dxr2
$def_dxr3
$def_fbdev
+$def_omapfb
$def_ggi
$def_ggiwmh
$def_gif
diff -aruN a/libvo/vo_fbdev.c b/libvo/vo_fbdev.c
--- a/libvo/vo_fbdev.c 2011-05-07 03:59:11.000000000 -0700
+++ b/libvo/vo_fbdev.c 2011-09-15 16:25:04.740695666 -0700
@@ -47,6 +47,10 @@
#include "libavutil/common.h"
#include "vo_fbdev.h"
+#if CONFIG_OMAPFB
+#include <linux/omapfb.h>
+#endif
+
static const vo_info_t info = {
"Framebuffer Device",
"fbdev",
@@ -1071,6 +1075,10 @@
fb_vinfo.yoffset = fb_page * fb_yres;
ioctl(fb_dev_fd, FBIOPAN_DISPLAY, &fb_vinfo);
+#if CONFIG_OMAPFB
+ ioctl(fb_dev_fd, OMAPFB_WAITFORGO, 0);
+#endif
+
center += page_delta * fb_yres * fb_line_len;
fb_page = next_page;
}
----
1.7.6
More information about the MPlayer-dev-eng
mailing list