Author Topic: I Got Pxafb_overlay Working With Zpsx...  (Read 6531 times)

zodttd

  • Full Member
  • ***
  • Posts: 188
    • View Profile
I Got Pxafb_overlay Working With Zpsx...
« on: May 22, 2006, 06:31:46 pm »
I heard that the following loads the video acceleration for my C1000 in Beta 4:
modprobe pxafb_overlay

After using modprobe to load the module, you can use /dev/fb1 to access the video accelerated RGB framebuffer overlay. It's like BVDD but without the hassle.

Some issues I'm having with pxafb_overlay in my PSX emu:
- Is it possible to change pdaXrom's /dev/fb0 to 320x240, so the overlay isn't a small part of the screen. I prefer to keep 320x240 then scale up to 640x480, for performance reasons.
- Since this is an overlay, colors seem to "bleed" through each other depending on it's hue. Is there a way to prevent this from occuring with performance kept in mind?

ZPSX is coming along well. Now we have CPU Overclocking, and video acceleration. Once I get video acceleration working a release will be made.

Thanks,
ZodTTD
http://www.zodttd.com for all your psx4all needs (as in downloads and support). :)

CLICK HERE TO DONATE ANY AMOUNT VIA PAYPAL

Thanks for the support! I can hardly wait to get back into Zaurus development again. :)

flexibyte

  • Newbie
  • *
  • Posts: 26
    • View Profile
    • http://www.flexibyte.com
I Got Pxafb_overlay Working With Zpsx...
« Reply #1 on: May 22, 2006, 07:43:50 pm »
Great news!
Could you explain breifly how to actually use the frame buffer?
I read something somewhere about just setting the SDL_FBDEV variable like this:
export SDL_FBDEV=/dev/fb1

Is that it? After that all SDL apps will use the accelerated framebuffer automatically?
I tried this and didnt see any change to my already compiled SDL apps.
New UK/Europe Zaurus Seller - Website coming soon.

danboid

  • Hero Member
  • *****
  • Posts: 881
    • View Profile
    • http://
I Got Pxafb_overlay Working With Zpsx...
« Reply #2 on: May 22, 2006, 08:53:04 pm »
Is this it? Is the wait nearly over??

Have you tried mplayer in sdl video mode accelerated 640x480?

exciting stuff!
Zaurus SL-C3000 w/ MD swapped for a Kingston 32GB Ultimate 266X CF running ALARM
Banana Pi running ALARM on a WD Scorpio SATA II HD
System76 Gazelle Pro i7 laptop w/ SAMSUNG 840 EVO SSD running Arch x64

How to install Arch on your C3x00 Zaurus https://github.com/danboid/ZALARM-install

zodttd

  • Full Member
  • ***
  • Posts: 188
    • View Profile
I Got Pxafb_overlay Working With Zpsx...
« Reply #3 on: May 22, 2006, 09:12:10 pm »
I haven't tried the SDL_FBDEV trick though I suppose it should work. I didn't even think about that!

I actually do all the framebuffer work without the use of SDL. It gave about 10 more FPS in-game than without the overlay. I will compile with SDL and then use the SDL_FBDEV feature to see if it gives the same type of performance. Though, SDL might be doing a lot more work than needed in my case, as I can blit to the framebuffer already rotated, instead of writing to a surface, then having that surface rotated and placed in the framebuffer.

I will also try mplayer with the SDL_FBDEV and use SDL and see what the difference in framerate is...

BRB with some results...

Oh Flexibyte. Remember to do the following command once before running SDL apps using /dev/fb1 (RGB) or /dev/fb2 or 3 (YUV):
modprobe pxafb_overlay

If you don't do that command to install/load the overlay module, you won't have acceleration within SDL, as it will default to fb0.
http://www.zodttd.com for all your psx4all needs (as in downloads and support). :)

CLICK HERE TO DONATE ANY AMOUNT VIA PAYPAL

Thanks for the support! I can hardly wait to get back into Zaurus development again. :)

zodttd

  • Full Member
  • ***
  • Posts: 188
    • View Profile
I Got Pxafb_overlay Working With Zpsx...
« Reply #4 on: May 22, 2006, 09:35:34 pm »
Ahhh, I know why you didnt notice a difference in SDL...
Set the following to use /dev/fb1 in SDL, if it even will work:
modprobe pxafb_overlay
export SDL_FBDEV=/dev/fb1
export SDL_VIDEODRIVER=fbcon

Problem is, using fb1 isn't working for me. fb0 is. fb0 is faster than whatever the feed in beta 4 is defaulting to though. Only thing is, it's not rotated. The framebuffer needs to be rotated for landscape for Z's. So some SDL work will be needed. I could do a iwmmxt enhanced rotation in SDL and get 1.2.9 working with fb1 if needed.
http://www.zodttd.com for all your psx4all needs (as in downloads and support). :)

CLICK HERE TO DONATE ANY AMOUNT VIA PAYPAL

Thanks for the support! I can hardly wait to get back into Zaurus development again. :)

flexibyte

  • Newbie
  • *
  • Posts: 26
    • View Profile
    • http://www.flexibyte.com
I Got Pxafb_overlay Working With Zpsx...
« Reply #5 on: May 23, 2006, 07:16:20 am »
Quote
Ahhh, I know why you didnt notice a difference in SDL...
Set the following to use /dev/fb1 in SDL, if it even will work:
modprobe pxafb_overlay
export SDL_FBDEV=/dev/fb1
export SDL_VIDEODRIVER=fbcon

Problem is, using fb1 isn't working for me. fb0 is. fb0 is faster than whatever the feed in beta 4 is defaulting to though. Only thing is, it's not rotated. The framebuffer needs to be rotated for landscape for Z's. So some SDL work will be needed. I could do a iwmmxt enhanced rotation in SDL and get 1.2.9 working with fb1 if needed.
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]

Go for it
Yeah, the problem was - I didnt know what to set for SDL_VIDEODRIVER - fb0 works now and mplayer seems a little faster. It is rotated, but I could always encode sideways.
However - has anyone tried:

# mplayer -vo fbdev -fb /dev/fb0 myavi.avi

This plays it stretched accross your desktop sideways again but at FULL speed.
Without sdl or fbdev -> roughly 1-2fps
With SDL /dev/fb0 -> roughly 5fps
With -vo fbdev -> full speed (so thats about 25fps)

I am going to try encoding a video in 480x640 sideways and see if it goes full speed with -vo fbdev


EDIT: yep it works - see my new post: [a href=\"https://www.oesf.org/forums/index.php?showtopic=19543]https://www.oesf.org/forums/index.php?showtopic=19543[/url]
« Last Edit: May 23, 2006, 08:12:20 am by flexibyte »
New UK/Europe Zaurus Seller - Website coming soon.

zodttd

  • Full Member
  • ***
  • Posts: 188
    • View Profile
I Got Pxafb_overlay Working With Zpsx...
« Reply #6 on: May 23, 2006, 03:22:20 pm »
See the cpufreq patch for my fix to get 624MHz on beta 4 as well. Should help ZPSX. A new ZPSX is on it's way though!
http://www.zodttd.com for all your psx4all needs (as in downloads and support). :)

CLICK HERE TO DONATE ANY AMOUNT VIA PAYPAL

Thanks for the support! I can hardly wait to get back into Zaurus development again. :)

Dima202

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
I Got Pxafb_overlay Working With Zpsx...
« Reply #7 on: May 23, 2006, 06:33:34 pm »
Editing my previous post.
I tried the modprobe thing and I dont think it worked.
Running from console I actually so that it really did speed up things.
How do I make zpsx run from console not 640x480 resolution?
zodttd; can you please tell me so I don't get my hopes up.. will c860 work with zpsx?

Edit:
-vo fbdev -fb /dev/fb0
works same speed (I think) using just -vo fbdev on the c860
without -vo fbdev it just goes to 640x480 and I can't tell if it works slower or faster.
Tested with mplayer btw.
« Last Edit: May 23, 2006, 06:42:27 pm by Dima202 »

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
I Got Pxafb_overlay Working With Zpsx...
« Reply #8 on: May 23, 2006, 06:35:23 pm »
Cool stuff! Is it possible to

* control the alphablending between the layers?
* have access to the 2nd overlay layer?
* control the hardware cursor?

(the 27x pxafb can do all three and it would be ultracool to be able to use it from Linux)
« Last Edit: May 23, 2006, 06:35:40 pm by Mickeyl »
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.

zodttd

  • Full Member
  • ***
  • Posts: 188
    • View Profile
I Got Pxafb_overlay Working With Zpsx...
« Reply #9 on: May 23, 2006, 10:12:56 pm »
Hi Mickeyl...I have a feeling none of those are currently possible with Beta 4.
I would really like to control the alphablending between the layers but I don't know how to go about it. There are 3 framebuffer interface's from what I heard from sashz, fb1 is RGB only, fb2 is RGB and YUV, and fb3 is YUV. I didn't even know there was a hardware cursor for pxa27x. :x

I did a test with pxafb_overlay using my current build of ZPSX. Using fb1, it performed *at most* 1 or 2 FPS faster than fb0. It's so close to fb0, that I'm wondering what is needed to get the "acceleration".

I was thinking maybe "BVDD" only really helps YUV color modes such as that mplayer uses? And SDL users just noticed improved performance since they didn't use fbcon driver since it didn't rotate the framebuffer like BVDD did?

What I'm getting at is, does pxa27x overlay really make things faster, or is it just a sequence of events that lead to people thinking it was faster when it's just as fast as raw framebuffer access gets?

Would be nice if a further speed boost could be had from pxafb...
http://www.zodttd.com for all your psx4all needs (as in downloads and support). :)

CLICK HERE TO DONATE ANY AMOUNT VIA PAYPAL

Thanks for the support! I can hardly wait to get back into Zaurus development again. :)

flexibyte

  • Newbie
  • *
  • Posts: 26
    • View Profile
    • http://www.flexibyte.com
I Got Pxafb_overlay Working With Zpsx...
« Reply #10 on: May 24, 2006, 03:55:12 am »
Quote
I did a test with pxafb_overlay using my current build of ZPSX. Using fb1, it performed *at most* 1 or 2 FPS faster than fb0. It's so close to fb0, that I'm wondering what is needed to get the "acceleration".

How did you go about getting /dev/fb1 working?
New UK/Europe Zaurus Seller - Website coming soon.

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
I Got Pxafb_overlay Working With Zpsx...
« Reply #11 on: May 24, 2006, 06:17:31 am »
Quote
and fb3 is YUV. I didn't even know there was a hardware cursor for pxa27x.

I thought fb3 was the hardware cursor?

https://www.oesf.org/forums/index.php?showt...ndpost&p=128036

Si
« Last Edit: May 24, 2006, 06:21:34 am by lardman »
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

danboid

  • Hero Member
  • *****
  • Posts: 881
    • View Profile
    • http://
I Got Pxafb_overlay Working With Zpsx...
« Reply #12 on: May 24, 2006, 03:17:02 pm »
I'm disappointed to hear that for whatever reason the overlay isn't orientated properly- I should hope this is just a software problem at the moment? Yuk if not!

sashz definately said qvga overlay was working- you got 320x240 overlay to work yet zodttd?

Now I just try to be patient waiting for a new pdaxrom that supports the C3000
« Last Edit: May 24, 2006, 03:18:06 pm by danboid »
Zaurus SL-C3000 w/ MD swapped for a Kingston 32GB Ultimate 266X CF running ALARM
Banana Pi running ALARM on a WD Scorpio SATA II HD
System76 Gazelle Pro i7 laptop w/ SAMSUNG 840 EVO SSD running Arch x64

How to install Arch on your C3x00 Zaurus https://github.com/danboid/ZALARM-install