Bug 5067 - more Wrapper and Via XvMC fixes.
Summary: more Wrapper and Via XvMC fixes.
Status: RESOLVED DUPLICATE of bug 4720
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Via (show other bugs)
Version: 6.99.99.902 (7.0 RC2)
Hardware: x86 (IA32) Linux (All)
: high major
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 1690
  Show dependency treegraph
 
Reported: 2005-11-17 01:22 UTC by Cedric Berger
Modified: 2005-11-28 00:19 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Clean Patch to Via Driver (2.04 KB, patch)
2005-11-18 06:50 UTC, Cedric Berger
no flags Details | Splinter Review
libXvMC Wrapper Patch (622 bytes, patch)
2005-11-18 07:01 UTC, Cedric Berger
no flags Details | Splinter Review

Description Cedric Berger 2005-11-17 01:22:45 UTC
With the following three little patches, I'm able to see Accelerated DVD
with my Via EPIA SP8000 on Gentoo / Xorg modular build.

First (and this is not strictly related to Via), libXvMCW is currently 
miscompiled, because the C source code expect its version number to start
with a ".". The following fixes that:

diff -u libXvMC-0.99.1/work/libXvMC-0.99.1/src/Makefile.am
libXvMC-0.99.1.patched/work/libXvMC-0.99.1/src/Makefile.am
--- libXvMC-0.99.1/work/libXvMC-0.99.1/src/Makefile.am  2005-08-03
05:28:03.000000000 +0200
+++ libXvMC-0.99.1.patched/work/libXvMC-0.99.1/src/Makefile.am  2005-11-16
15:47:41.000000000 +0100
@@ -15,8 +15,8 @@
        @XVMC_CFLAGS@                           \
        -I$(top_srcdir)/include                 \
        -DXVMC_CONFIGDIR=XConfigDir             \
-       -DXVMC_SOVERSION=\"1.0\"                \
-       -DXV_SOVERSION=\"1.0\"
+       -DXVMC_SOVERSION=\".1.0\"               \
+       -DXV_SOVERSION=\".1.0\"

 libXvMC_la_LDFLAGS = -version-number 1:0:0 -no-undefined
 libXvMCW_la_LDFLAGS = -version-number 1:0:0

Second, if XVMC is defined, then the Via driver need to be
compiled with XvExtension defined. The following fixes that:
(this does take care of the case where we would need Xv without
XvMC, but that can be fixed later. Obviously, XvMC need Xv)

diff -ur
xf86-video-via-0.1.32_p20051115.orig/work/xf86-video-via-0.1.32_p20051115/src/Makefile.am
xf86-video-via-0.1.32_p20051115/work/xf86-video-via-0.1.32_p20051115/src/Makefile.am
---
xf86-video-via-0.1.32_p20051115.orig/work/xf86-video-via-0.1.32_p20051115/src/Makefile.am
  2005-09-28 16:58:41.000000000 +0200
+++
xf86-video-via-0.1.32_p20051115/work/xf86-video-via-0.1.32_p20051115/src/Makefile.am
       2005-11-16 15:41:55.000000000 +0100
@@ -68,3 +68,7 @@
          via_dri.h \
          via_drmclient.h
 endif
+
+if XVMC
+AM_CFLAGS += -DXvExtension
+endif

Finally, both libviaXvMC and libviaXvMCPro need to be linked with -ldrm, and
the following patchlet fixes that:

diff -ur
xf86-video-via-0.1.32_p20051115.orig/work/xf86-video-via-0.1.32_p20051115/src/xvmc/unichrome/Makefile.am
xf86-video-via-0.1.32_p20051115/work/xf86-video-via-0.1.32_p20051115/src/xvmc/unichrome/Makefile.am
---
xf86-video-via-0.1.32_p20051115.orig/work/xf86-video-via-0.1.32_p20051115/src/xvmc/unichrome/Makefile.am
   2005-09-14 21:09:11.000000000 +0200
+++
xf86-video-via-0.1.32_p20051115/work/xf86-video-via-0.1.32_p20051115/src/xvmc/unichrome/Makefile.am
2005-11-16 16:24:32.000000000 +0100
@@ -8,4 +8,4 @@
        ../xf86dri.c

 libviaXvMC_la_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ -I$(top_srcdir)/src
-I$(top_srcdir)/src/xvmc -DTRUE=1 -DFALSE=0
-libviaXvMC_la_LDFLAGS = -version-number 1:0:0
+libviaXvMC_la_LDFLAGS = @DRI_LIBS@ -version-number 1:0:0
diff -ur
xf86-video-via-0.1.32_p20051115.orig/work/xf86-video-via-0.1.32_p20051115/src/xvmc/unichromeProA/Makefile.am
xf86-video-via-0.1.32_p20051115/work/xf86-video-via-0.1.32_p20051115/src/xvmc/unichromeProA/Makefile.am
---
xf86-video-via-0.1.32_p20051115.orig/work/xf86-video-via-0.1.32_p20051115/src/xvmc/unichromeProA/Makefile.am
       2005-09-14 21:09:12.000000000 +0200
+++
xf86-video-via-0.1.32_p20051115/work/xf86-video-via-0.1.32_p20051115/src/xvmc/unichromeProA/Makefile.am
    2005-11-16 16:40:11.000000000 +0100
@@ -8,4 +8,4 @@
        ../xf86dri.c

 libviaXvMCPro_la_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ -I$(top_srcdir)/src
-I$(top_srcdir)/src/xvmc -DTRUE=1 -DFALSE=0
-libviaXvMCPro_la_LDFLAGS = -version-number 1:0:0
+libviaXvMCPro_la_LDFLAGS = @DRI_LIBS@ -version-number 1:0:0


With these 3 fixes, on a fanless 800MHz Via, I can see DVDs easily with
stock xine 1.1.1. Yahoo!

cn400 ~ # top
top - 17:26:37 up  7:22,  4 users,  load average: 0.68, 0.51, 0.47
Tasks:  61 total,   1 running,  60 sleeping,   0 stopped,   0 zombie
Cpu(s): 12.0% us,  7.2% sy,  0.0% ni, 78.4% id,  1.6% wa,  0.8% hi,  0.0% si
Mem:    189532k total,   186632k used,     2900k free,    94708k buffers
Swap:   995988k total,      204k used,   995784k free,    10352k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 8188 root      15   0  189m  26m 4820 S  9.7 14.1   3:17.46 xine
 8189 root      15   0  189m  26m 4820 S  4.8 14.1   1:49.38 xine
 8217 root      16   0  2004 1044  820 R  1.6  0.6   0:00.05 top
 8197 root      15   0  189m  26m 4820 S  0.8 14.1   0:23.23 xine
Comment 1 Cedric Berger 2005-11-17 01:24:25 UTC
Sorry for the grabled patch, but this is so simple it can be applied
"by hand". automake need to be run afterward too.
Comment 2 Cedric Berger 2005-11-17 05:20:31 UTC
I'm adding these simple changes to the TODO list for Xorg 7.0
Comment 3 Cedric Berger 2005-11-18 06:50:04 UTC
Created attachment 3835 [details] [review]
Clean Patch to Via Driver

Here is the unscrambled Via patch. Patch to XvMCW will follow shortly...
Comment 4 Cedric Berger 2005-11-18 07:01:24 UTC
Created attachment 3836 [details] [review]
libXvMC Wrapper Patch

And here is a clean patch to the wrapper library.
Comment 5 Thomas Hellström 2005-11-27 08:19:48 UTC
Comment on attachment 3835 [details] [review]
Clean Patch to Via Driver

Commited Attachment #3835 [details] except for the -DXvExtension.
Comment 6 Thomas Hellström 2005-11-27 08:21:16 UTC
Comment on attachment 3836 [details] [review]
libXvMC Wrapper Patch

Commited Attachment #3836 [details]
Comment 7 Thomas Hellström 2005-11-27 08:28:35 UTC
The remaining -DXvExtension is really a duplicate of 4720. Assuming it's not
correct setting -DXvExtension here without verifying that Xv is actually being
built even if the XvMC drivers are being built. 


*** This bug has been marked as a duplicate of 4720 ***
Comment 8 Cedric Berger 2005-11-28 19:19:41 UTC
Thanks Thomas!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.