Xv driver

"A collection of spu programs to accelerate media related applications for the CellBE ( PS3 ) platform" - unsolo

Moderator: unsolo

Locked
unsolo
Posts: 155
Joined: Mon Apr 16, 2007 2:39 am
Location: OSLO Norway

Xv driver

Post by unsolo »

So i eventually started to think of all the people using X

And started to poke around in Xv.
I cant belive im doing this Xv is painful for me.

Anyhow i have gotten to the stage where i at least have something registered in X when i start it up.

Please not that we are still only using spu's here and that everything below is just empty at this point of time.

If there are any X or Xv experts out there willing to help let us know.

To be continued

Code: Select all

X-Video Extension version 2.2
screen #0
  Adaptor #0: "SPU Video Acelleration Layer"
    number of ports: 1
    port base: 60
    operations supported: PutImage
    supported visuals:
      depth 24, visualID 0x22
      depth 24, visualID 0x23
      depth 24, visualID 0x24
      depth 24, visualID 0x25
    number of attributes: 4
      "XV_COLORKEY" (range 0 to 16777215)
              client settable attribute
              client gettable attribute (current value is 1)
      "XV_BRIGHTNESS" (range -64 to 63)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_SATURATION" (range 0 to 31)
              client settable attribute
              client gettable attribute (current value is 16)
      "XV_DOUBLE_BUFFER" (range 0 to 1)
              client gettable attribute (current value is 1)
    maximum XvImage size: 1920 x 1080
    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)
Don't do it alone.
unsolo
Posts: 155
Joined: Mon Apr 16, 2007 2:39 am
Location: OSLO Norway

Post by unsolo »

Added the Xv driver to svn working on making it user friendly to install.

Disclaimer:
This is very very experimental but i got it working for 1080p playback with X running without making a complete mess out of everything..

scaling also seems to work

If it doesnt update properly after fullscreen press f a couple of more times in lets say mplayer.
using the mouse can cuse it to lock up etc etc etc..

You might have to kill -9 X :) if it gets stuck.

You will not be able to run this driver yet w/o loads of knowledge about these kind of things as i have not yet fixed the install guideline.


To be found here:
http://svn.ps2dev.org/listing.php?repna ... rev=0&sc=0

requires spu-medialib libspe2 and pthreads.
Don't do it alone.
toxicer
Posts: 17
Joined: Wed Apr 18, 2007 8:38 pm

Post by toxicer »

Hi unsolo,

I got the driver compiled but if I'm adding it as spu_fbdev_drv into the xorg.conf X can't start.
Could you post me your device section of your xorg.conf?
Thanks.
toxicer
Posts: 17
Joined: Wed Apr 18, 2007 8:38 pm

Post by toxicer »

got it. ubuntu is using a different path for the drivers.
however, X stops with a backtrace.
I added spu_fbdev into the xorg device section:

Section "Device"
Identifier "Generic Video Card"
Driver "spu_fbdev"
Option "UseFBDev" "true"
EndSection

startx output:

root@localhost:/etc/X11# startx
xauth: creating new authority file /home/birdman/.serverauth.23599

X: warning; process set to priority -1 instead of requested priority 0

X Window System Version 1.3.0
Release Date: 19 April 2007
X Protocol Version 11, Revision 0, Release 1.3
Build Operating System: Linux Ubuntu (xorg-server 2:1.3.0.0.dfsg-12ubuntu8)
Current Operating System: Linux localhost 2.6.22-14-cell #1 SMP Sun Oct 14 23:42:29 GMT 2007 ppc64
Build Date: 29 September 2007
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Thu Nov 1 17:56:41 2007
(==) Using config file: "/etc/X11/xorg.conf"
(EE) AIGLX: Screen 0 is not DRI capable
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning: Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
> Ignoring extra symbols
Errors from xkbcomp are not fatal to the X server

Backtrace:
XIO: fatal IO error 104 (Connection reset by peer) on X server ":0.0"
after 0 requests (0 known processed) with 0 events remaining.
unsolo
Posts: 155
Joined: Mon Apr 16, 2007 2:39 am
Location: OSLO Norway

Post by unsolo »

I think this driver also has a 32 bit issue tho..

Section "Device"
Identifier "Videocard0"
Driver "spu_fbdev"
Option "ShadowFB" "false"
EndSection
Don't do it alone.
toxicer
Posts: 17
Joined: Wed Apr 18, 2007 8:38 pm

Post by toxicer »

So would it make more sense compiling it iwth 64bit?
jonathan
Posts: 23
Joined: Fri Sep 21, 2007 12:18 pm
Location: Tasmania, Australia

Post by jonathan »

32bit works for me.

For some reason, my xorg-server didn't like the _ in the driver name (kept looking for spufbdev), and renaming the driver to spufbdev_drv.so didn't work as the entry point is derived from the file name, so I replaced all spu_fb with spufb (and SPU_FB with SPUFB) in spu_fbdev.c

Also, I fixed the spelling of 'Acceleration' in spu_video.c so xvinfo output is nicer ;)
jonathan
Posts: 23
Joined: Fri Sep 21, 2007 12:18 pm
Location: Tasmania, Australia

Post by jonathan »

Also, xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Image Processed\n"); in spu_video.c results in a lot of noise in /var/log/Xorg.0.log
unsolo
Posts: 155
Joined: Mon Apr 16, 2007 2:39 am
Location: OSLO Norway

Post by unsolo »

Thanks did you commit it as well ?
if not please supply a patch

thanks :)
Don't do it alone.
zefie
Posts: 6
Joined: Tue Feb 12, 2008 1:31 pm

Post by zefie »

This is a nice driver but i wish when it crashed it was as simple as X locking up or crashing. Instead the entire framebuffer locks up, as well as all USB input devices. Keyboard and mouse refuse to respond (even pressing numlock does nothing (no light on or off)). System will gracefully shutdown from the power button on PS3 though, but I wonder what could cause this driver to be killing the USB input as well.
Locked