Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[howto] x-video extention for Xfree 4.3 and Mach64
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc
View previous topic :: View next topic  
Author Message
fidzysss
Tux's lil' helper
Tux's lil' helper


Joined: 16 Feb 2003
Posts: 109
Location: Paris (France)

PostPosted: Sat Oct 11, 2003 11:03 pm    Post subject: [howto] x-video extention for Xfree 4.3 and Mach64 Reply with quote

Yesterday, I finally installed mplayer on my good old Ultra5 with Mach64 on-board graphic card, and I noticed that I had no xv extention on my X server. After some research, I find a way (not the best I think ...) to install it quite quickly so I write this little howto.

Get and prepare the DRI source for Mach64
Code:
mkdir ~/DRI-CVS
cvs -z3 -d:pserver:anonymous@dri.freedesktop.org:/cvs/dri login
cvs -z3 -d:pserver:anonymous@dri.freedesktop.org:/cvs/dri co -rmach64-0-0-6-branch xc

get the patch from http://www.retinalburn.net/linux/dri-xv/mach64-dri-xv-20030331.diff.gz
and apply it
Code:
cd ~/DRI-CVS/xc/xc/programs/Xserver/hw/xfree86/drivers/ati
mv ~/mach64-dri-xv-20030331.diff.gz .
gunzip -c mach64-dri-xv-XXX.diff.gz | patch -p1

then prepare the source
Code:

cd ~/DRI-CVS
ln -s xc XFree40
mkdir build
cd build
lndir -silent -ignorelinks ../XFree40


Compiling the source
Once you have prepare the source, you just go in build/xc and compile the source
Code:
cd build/xc
make World


Copying library and XFree drivers
The last step is to copy the extention library and the XFree drivers (feel free to backup your old files)
Code:
cp ~/DRI-CVS/build/xc/exports/lib/modules/extensions/libextmod.a /usr/X11R6/lib/modules/extensions/
cp ~/DRI-CVS/build/xc/exports/lib/modules/drivers/ati_drv.o /usr/X11R6/lib/modules/drivers/
cp ~/DRI-CVS/build/xc/exports/lib/modules/drivers/atimisc_drv.o /usr/X11R6/lib/modules/drivers/



Now you can restart your X server and xvinfo should give you something like that
Code:

X-Video Extension version 2.2
screen #0
  Adaptor #0: "ATI mach64 Video Overlay"
    number of ports: 1
    port base: 53
    operations supported: PutImage
    supported visuals:
      depth 24, visualID 0x21
      depth 24, visualID 0x22
    number of attributes: 17
      "XV_DEVICE_ID" (range 0 to -1)
              client gettable attribute (current value is 89)
      "XV_LOCATION_ID" (range 0 to -1)
              client gettable attribute (current value is 90)
      "XV_INSTANCE_ID" (range 0 to -1)
              client gettable attribute (current value is 91)
      "XV_SET_DEFAULTS" (range 0 to 1)
              client settable attribute
      "XV_AUTOPAINT_COLORKEY" (range 0 to 1)
              client settable attribute
              client gettable attribute (current value is 1)
      "XV_COLORKEY" (range 0 to -1)
              client settable attribute
              client gettable attribute (current value is 197120)
      "XV_DOUBLE_BUFFER" (range 0 to 1)
              client settable attribute
              client gettable attribute (current value is 1)
      "XV_ENCODING" (range 0 to 12)
              client settable attribute
              client gettable attribute (current value is 1)
      "XV_FREQ" (range 0 to -1)
              client settable attribute
              client gettable attribute (current value is 1000)
      "XV_TUNER_STATUS" (range -1000 to 1000)
              client gettable attribute (current value is 4)
      "XV_MUTE" (range 0 to 1)
              client settable attribute
              client gettable attribute (current value is 1)
      "XV_VOLUME" (range -1000 to 1000)
              client settable attribute
              client gettable attribute (current value is -1000)
      "XV_BRIGHTNESS" (range -1000 to 1000)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_CONTRAST" (range -1000 to 1000)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_SATURATION" (range -1000 to 1000)
              client settable attribute
              client gettable attribute (current value is 16)
      "XV_COLOR" (range -1000 to 1000)
              client settable attribute
              client gettable attribute (current value is 16)
      "XV_HUE" (range -1000 to 1000)
              client settable attribute
              client gettable attribute (current value is 0)
    maximum XvImage size: 2048 x 2048
    Number of image formats: 4
      id: 0x32595559 (2YUY)
        guid: 59555932-0000-0010-8000-00aa00389b71
        bits per pixel: 16
        number of planes: 1
        type: YUV (packed)
      id: 0x59565955 (YVYU)
        guid: 55595659-0000-0010-8000-00aa00389b71
        bits per pixel: 16
        number of planes: 1
        type: YUV (packed)
      id: 0x32315659 (21VY)
        guid: 59563132-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 3
        type: YUV (planar)
      id: 0x30323449 (024I)
        guid: 49343230-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 3
        type: YUV (planar)


now I can watch video in fullscreen mode :)

Conclusion
There can be some other way to make xv work with the mach64, the most obvious is using the gatos drivers, but you will need to recompile the whole xfree to use them.
The other thing is that you should be able to make DRI for Mach64 with this tricks, but Mesa opengl seems to be broken on sparc (bug # 19776 )
Back to top
View user's profile Send private message
egthompson
n00b
n00b


Joined: 04 May 2003
Posts: 39
Location: Somerville, AL

PostPosted: Sun Oct 12, 2003 5:26 pm    Post subject: Reply with quote

Did you need to make any changes to XF86Config? Maybe if you can post it. I still can't get direct rendering to work on my mach 64 3d rage pro.
Back to top
View user's profile Send private message
fidzysss
Tux's lil' helper
Tux's lil' helper


Joined: 16 Feb 2003
Posts: 109
Location: Paris (France)

PostPosted: Sun Oct 12, 2003 6:26 pm    Post subject: Reply with quote

In fact, the tricks works only to get X-Video support. For DRI, there is some problems to fix :
the library libgl is broken on sparc with xfree 4.3, but there is a workaround (just tried it yesterday) : you rebuild a working libgl using the DRI-CVS tree and this workaround:
http://bugs.gentoo.org/show_bug.cgi?id=19776#c8
there is a problem with the sparc.c : it tries to include a file that is missing (but I can't remember the name of the file), just try and comment the #include statement in sparc.c and it should work
then to get DRI working, I have a problem too, I can build the mach64.o kernel module, but I can't insmod it (pb of unresolved symbol).
I'm still trying and will post if I get results
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum