Jump to content


Photo

Linux 3D GPU Access on PS3


  • Please log in to reply
11 replies to this topic

#1 PS3Scene

PS3Scene

    X-S Freak

  • Admin
  • 1,453 posts

Posted 29 November 2007 - 06:02 AM

Linux 3D GPU Access on PS3
Posted by XanTium | 29-11-2007 0:02 EST

 
From forums.ps2dev.org:


Here is a draft of the separate kernel module:
git clone http://mandos.homeli.../git/ps3rsx.git
I've updated the Xorg driver accordingly:
git clone http://mandos.homeli...6-video-ps3.git

It is not yet finished, and mostly untested, but it shows my plan for the interface with userspace. Basically we have two options to access the FIFO:
- exclusive: we disable framebuffer redraw, allocate a context, then use the FIFO workaround to start running the context's FIFO and use it until the application is over. No other application can use the GPU, and any blit from either the fb driver or another context would break the application in exclusive mode. That's how we've been using the RSX so far.
- shared: we allocate a context, then run the FIFO for some time using a fake blit (size 0x0). When commands are finished processing, a new fake blit is needed to kick the FIFO again and process more commands. In the meantime, other contexts (including FB driver) can use the GPU. Note that contexts are not preempted, so if we put FIFO in a loop, other contexts are not able to execute commands (and we get error -24 for FB blit). So this is cooperative sharing.

I want to be able to support both modes. The former is easier to use and more efficient (useful for e.g. 3D demo or game), while the latter allows mixing multiple users of the GPU (e.g. Desktop usage, with one context for Xorg, one for GLX, and one for VRAM used as swap). The current module provides those two modes, with one ioctl() to enter exclusive mode, and one ioctl for one-shot kicking of the fifo (shared mode). The Xorg driver still uses exclusive mode ATM; I've code for shared mode but it needs testing and benchmarking. My short term goal is usable Desktop usage (X is improved, now we need more RAM).

On the long term, my plan is to add RAMIN/VRAM memory management to the module, have libps3rsx provide the user space API for FIFO control and object instanciation. Also, Xorg driver should use libps3rsx to avoid code duplication. Maybe when can then move slowly from ps3rsx.ko/librsx to drm/libdrm API (but keep exclusive mode option in parallel). Sound good?


Full Story: forums.ps2dev.org (via eurasia.nu)






#2 mlmadmax

mlmadmax

    X-S Genius

  • Members
  • PipPipPipPip
  • 870 posts
  • Location:California
  • Xbox Version:v1.4
  • 360 version:v2 (zephyr)

Posted 29 November 2007 - 07:17 AM

Sweet I can't wait for this to come to fruition.

Just to clarify they have accesed the rsx but haven't compiled anything anyone can really use yet right?

#3 lmaolmao

lmaolmao

    X-S Member

  • Members
  • Pip
  • 120 posts

Posted 29 November 2007 - 10:59 AM

ooooh, i understand the title and odd words. but what i would like to see out of this is overlay in videolan or another media player. that would mean 1080p videos running smoothly would it not?!

#4 Ribs

Ribs

    X-S Enthusiast

  • Members
  • 2 posts

Posted 29 November 2007 - 11:35 AM

QUOTE(lmaolmao @ Nov 29 2007, 12:35 PM) View Post

ooooh, i understand the title and odd words. but what i would like to see out of this is overlay in videolan or another media player. that would mean 1080p videos running smoothly would it not?!

Not yet.

I've managed to compile the kernel module and the xorg driver. Once running, there is a lot of missing graphics, and everything is garbage mainly.

Video playback was not garbage, but no smoother than with the regular framebuffer driver. A disappointment for me, but these are *very* early days yet.

This time next year, we should really begin to see the fruits of all this hard work.

#5 openxdkman

openxdkman

    X-S Genius

  • Moderator
  • PipPipPipPip
  • 823 posts
  • Xbox Version:unk
  • 360 version:unknown

Posted 29 November 2007 - 11:39 AM

You can do a lot already, but you need serious linux skills. You need to fully control the custom source of your own linux kernel.

Don't despair, the graphic stuff itself will be reusable in many solutions. One of them is ps3link that will work just like ps2link. There will be also ready to install linux distros or even LiveCD soon.

I predict some incredible blooming of homebrew on ps3 in early 2008.



#6 Ribs

Ribs

    X-S Enthusiast

  • Members
  • 2 posts

Posted 29 November 2007 - 02:30 PM

QUOTE(openxdkman @ Nov 29 2007, 01:15 PM) View Post

You can do a lot already, but you need serious linux skills. You need to fully control the custom source of your own linux kernel.

Not really. That's the whole point of the module. The module exists so you don't have to patch the kernel anymore. I was able to get the module to build and install cleanly on the stock Ubuntu kernel. I did have to download the kernel headers, however (a simple apt-get).

I agree it's not in the hands of the linux 'noob' right now. But, like yourself, I predict that things will get a lot easier as time progresses. We are very much on the brink of some seriously cool stuff happening.

#7 the_nerdy

the_nerdy

    X-S Member

  • Members
  • Pip
  • 79 posts

Posted 29 November 2007 - 04:52 PM

My only concern is if this is going to really fully work, or if your going to work your way into a dead end. I mean, the console has been out for almost 1 year now and very little progress made. Even though if what you got is going to work fully, this is a huge step up. But once the graphics are going, what other aditions need to be fixed?

Sorry to be skeptical, I want to see the PS3 support homebrew before the Xbox360 does. I belive the homebrew scene for the ps3 is the only way sony is going to make it in the console business. And having XMBC on the PS3 would really kick consiering their is a blueray drive

So I'm just asking to make all possible fast, for the fact the X360 will be behind and devolpers will be concentrating just on the PS3 and put the 360 in it's place.



Would'nt you all rather have a more powerfull console for homebrew? SD card slot access smile.gif

Thanks RIBS!!!


Keep up the good work and tell your team to do the same

Very proud of you.

#8 bucko

bucko

    Super Moderator

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPip
  • 7,997 posts
  • Gender:Male
  • Location:England
  • Xbox Version:v1.6
  • 360 version:v5.0 (360S - trinity)

Posted 29 November 2007 - 06:38 PM

If only Sony would make it official mad.gif, hell i'd even buy it for a 5er or somet if Sony is scared of losing money on it.

#9 lmaolmao

lmaolmao

    X-S Member

  • Members
  • Pip
  • 120 posts

Posted 29 November 2007 - 11:30 PM

QUOTE(Ribs @ Nov 29 2007, 12:11 PM) View Post

Not yet.

I've managed to compile the kernel module and the xorg driver. Once running, there is a lot of missing graphics, and everything is garbage mainly.

Video playback was not garbage, but no smoother than with the regular framebuffer driver. A disappointment for me, but these are *very* early days yet.

This time next year, we should really begin to see the fruits of all this hard work.


thanks for the info. i cant wait for the day the ps3 has a xbmc functionality through linux. it maybe a pipe dream, but would be very nice indeed.

#10 d-range

d-range

    X-S Senior Member

  • Members
  • PipPip
  • 254 posts

Posted 30 November 2007 - 11:22 AM

QUOTE(the_nerdy @ Nov 29 2007, 06:28 PM) View Post

My only concern is if this is going to really fully work, or if your going to work your way into a dead end. I mean, the console has been out for almost 1 year now and very little progress made. Even though if what you got is going to work fully, this is a huge step up. But once the graphics are going, what other aditions need to be fixed?


I think 1 year to find a way to work around the security layer Sony implemented around the GPU & other hardware *and* write a preliminary driver that does blitting, textured triangles, etc. on an undocumented GPU is not long. The FIFO hole was only found a few months ago, and now it's already almost possible to write an accelerated Xv driver that enables smooth full HD movie playback.

If this will ever lead to a complete 3D driver that supports all sorts of shader programs, texture formats, etc, I seriously doubt that. But even the most basic stuff is already a huge step forward.

Edited by d-range, 30 November 2007 - 11:23 AM.


#11 XBLamer

XBLamer

    X-S Senior Member

  • Members
  • PipPip
  • 280 posts

Posted 01 December 2007 - 09:23 PM

I agree this is a huge break through and props to ironpeter for finding the hole but I have a few concerns

1) We are a long way off seeing opengl running (unless nvidea opens up the spec) at best all we have the limited functionality of the PS3 RSX project.

2) Sony can close the hole at any time and only those with a modded ps3 or who decide not to connect or run a game can avoid the fix.


Actually it makes me wonder why sony have not closed this yet. My only logic is they are watching to see the progress. If they could get an opengl prog that leverages the SPE's of the cell and limitedf functionality of the Nvidea they could use a lower cost GPU. The MIT licence the work is being done under would allow them reuse the code. Toshiba I would imagine are also watching this closely for similiar reasons.

It's early days yet but my bet is sony won't close this hole until there is significant progress and by that time the manufacture cost of ps3 will be more in line with sale price so they may just officially support the code. The only thing that would stop this is if the big game developers move to the open platform and sony stop getting their royalty kick backs.

Edited by XBLamer, 01 December 2007 - 09:25 PM.


#12 dotrat1989

dotrat1989

    X-S Young Member

  • Members
  • Pip
  • 44 posts

Posted 03 December 2007 - 04:54 AM

I know this gives us access to the RSX GPU through linux on the PS3 but will this potentionally lead us with true homebrew and beable to play backups? I mean I don't want to keep my PS3 in the basement to collect dust if I know I can't play PS3 games in the future...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users