The hunt for HV's FIFO/Push buffer...

Technical discussion on the newly released and hard to find PS3.

Moderators: cheriff, emoon

Post Reply
IronPeter
Posts: 207
Joined: Mon Aug 06, 2007 12:46 am
Contact:

Post by IronPeter »

Hi, guys. It is better idea to move into other topic. Live driver support and FIFO hunting must be separated :).
anthraxx
Posts: 27
Joined: Sun Nov 11, 2007 12:14 am

Re: Gentoo ebuild wanted

Post by anthraxx »

d-range wrote:
Audball wrote:d-range.
A gentoo ebuild would be GREAT! even if it's not accepted into portage.
me interested 2!

/me moves to the other thread
Last edited by anthraxx on Wed Dec 12, 2007 6:06 am, edited 1 time in total.
Akta77
Posts: 40
Joined: Sun Dec 09, 2007 9:57 pm
Location: France (Paris)

Post by Akta77 »

IronPeter wrote:Hi, guys. It is better idea to move into other topic. Live driver support and FIFO hunting must be separated :).
I totally agree!

Please, go to :


http://forums.ps2dev.org/viewtopic.php?p=61910 for binary package related stuff.
greenail
Posts: 2
Joined: Wed Dec 12, 2007 9:51 am

Post by greenail »

Hello,

Great work on this, fantastic stuff.

I had a few questions. I was able to insmod the kernel mod, and wanted to ask exactly what was being accelerated. I tried a 720P h.264 file sample and it did not play well. I am looking forward to being able to run h.265 content in X, and from reading the thread I"m not sure what is needed to be done, or how far the module currently is. Can you fill me in? Also, will any integration between this and mplayer-ps3 be planned?
dom
Posts: 29
Joined: Tue Oct 05, 2004 7:20 pm

Post by dom »

Hello,
Panajev2001a wrote:

Code: Select all

ps3rsx: PS3 RSX access module, 1.0.0
ps3rsx: reserved XDR memory is @c000000002100000, len 9437184
ps3rsx: 254MB of DDR video ram at 0x700190000000 mapped at d000080080780000 handle 5a5a5a5b
ps3rsx: context 0x55555554 dma=440000381000 driver=4000001a4000 reports=4800006d0000 reports_size=10000
ps3rsx: ctrl=d00008008010e000 drv=d0000800905c0000 reports=d0000800804e0000
ps3rsx: version 2.11 RSX rev17 0MB RAM channel 1 core 500MHz mem 650MHz
ps3rsx: remapped XDR apperture at c000000002100000 size 9216kB to RSX
I have the same rsx revision on pal 60Go (bundle) ps3 (purchased in october).

Code: Select all

ps3rsx: PS3 RSX access module, 1.0.0
ps3rsx: reserved XDR memory is @c000000002100000, len 18874368
ps3rsx: 254MB of DDR video ram at 0x700260000000 mapped at d000080080780000 handle 5a5a5a5b
ps3rsx: context 0x55555554 dma=440000521000 driver=400000274000 reports=480000a10000 reports_size=10000
ps3rsx: ctrl=d00008008010e000 drv=d0000800905c0000 reports=d0000800804e0000
ps3rsx: version 2.11 RSX rev17 0MB RAM channel 1 core 500MHz mem 650MHz
ps3rsx: remapped XDR apperture at c000000002100000 size 18432kB to RSX
ps3rsx: context 0x55555557 dma=440000522000 driver=400000278000 reports=480000a20000 reports_size=10000
ps3rsx: ctrl=d00008008011c000 drv=d000080090600000 reports=d0000800805e0000
ps3rsx: version 2.11 RSX rev17 0MB RAM channel 2 core 500MHz mem 650MHz
ps3rsx: remapped XDR apperture at c000000002100000 size 18432kB to RSX
I tried out the examples from libps3rsx and got X freeze : black screen + trash pixels at the top of the screen. I am using av connector to rgb output with video=ps3fb:mode:163 rgb in kboot (35:720p + 128 for fullscreen).

I got in xorg log a lot of

Code: Select all

Notifier timeout!
N/2001 = 0x00000000/0x00000000/0x00000000/0x01000000
PS3ExaDoneCopy_2: failed
and

Code: Select all

(II) PS3(0): Fifo dump (lockup 0x07a7,0x088f):
(II) PS3(0): [0x0793] 0x005f0146
... a lot of dump
(II) PS3(0): End of fifo dump
Fatal server error:
DMA queue hang: dmaPut=88f, put=88f get=7a7
Is this related to a screen size issue ?

I'm using the Glaurung git kernel given in this topic + ps3rsx and X driver.

Code: Select all

Linux ps3-redfisher 2.6.24-rc3-gddd4ee6d #1 SMP Mon Dec 10 23:06:51 UTC 2007 ppc64 Cell Broadband Engine, altivec supported GNU/Linux
Note that the demos are working in console mode (troll+triangles)
@+
dom
Ocelot
Posts: 11
Joined: Sat Dec 08, 2007 9:58 pm

Re: Binary for Ubuntu

Post by Ocelot »

Akta77 wrote:My first ubuntu package is available here :

http://www.choeursdaromes.com/ps3rsx-1.0-1.deb

This will install the kernel module for 2.6.22-14-cell & the Xorg 7.2 driver.

You still have to modify your xorg.conf.

The package adds a line to /etc/modules

Regards

PS: Glaurung & IronPeter, great job!
thank you very much!everything works perfectly on ubuntu 7.10.
IronPeter
Posts: 207
Joined: Mon Aug 06, 2007 12:46 am
Contact:

libps3rsx

Post by IronPeter »

I've refactored code a bit. Now simple_dxt example ( it shows textured 3D model of troll ) uses only hi-level functions. There are few magic constant to clean up. Also I want to commit GPU-CPU sync stuff ( and probably pixel shader constant stuff ) before the New Year.

Some example with RSX-SPU interaction will be great but I can not plan my time right before the New Year.
wHack
Posts: 1
Joined: Sat Dec 15, 2007 1:59 am

Post by wHack »

This question is a bit off topic but I did not know a better place to ask it. I've been a heavy user of XBMC (Xbox Media Center) for some time now. Which if you aren't familiar with it is an astounding open source media center that runs on hacked Xbox 1 hardware. It was originally written to use Xbox DirectX but recently the team has gone through great efforts to port it to Linux using OpenGL 2.0, and have gotten alot of the functionality ported over. Now there is a large part of the user base that would love to see it ported over to ps3 but the lack of OpenGL in the ps3 linux environment has been noted as the reason why it can't be done. They currently use OpenGL primarily for the rendering of the GUI which includes slide in and fade in effects and layered alphablended menu's and objects that display on top of video and many other nice hardware accelerated 2d content. They also use some 3d stuff for screen savers and visualizations for music. They also use OpenGL for scaling and de-interlacing and color conversion. I was wondering in your opinion do you think that it would be feasible to port the project to ps3 linux using your drivers and direct rsx calls as well as a not too un-reasonable amount of code in place of the OpenGL commands they currently use?? I know there are many people who would love a good informed guess about this.
Compound
Posts: 48
Joined: Thu May 12, 2005 10:29 am

Post by Compound »

XBMC uses mplayer as its basis, so id imagine if u can get mplayer working it wont be too hard to port over or recreate some elements

after asking a few q's opengl supports a long way off, graphics functionality has to use some very specific commands / techniques to get it running
ArtVandelae
Posts: 3
Joined: Thu Nov 08, 2007 11:39 pm

Post by ArtVandelae »

Compound wrote:XBMC uses mplayer as its basis, so id imagine if u can get mplayer working it wont be too hard to port over or recreate some elements

after asking a few q's opengl supports a long way off, graphics functionality has to use some very specific commands / techniques to get it running
Only the Xbox version uses mplayer for video playback. The Linux version uses an internally developed video player.

Given what I have seen from libps3rsx and the XBMC code the RSX currently has all of the required functionality accessible to make XBMC work, but someone who is familiar with both pieces of work would need to spend some time writing an RSX specific render path for XBMC which, from the responses I have seen on the XBMC boards, the developers seem loathe to do.
Compound
Posts: 48
Joined: Thu May 12, 2005 10:29 am

Post by Compound »

yeah i could have seen that one coming a mile off lol.... im sure xbmc is built using parts of the xdk isnt it? hence the source only releases

edit: doh, yeh im missing the point slightly haha


Regardlessly of this though, with the media lib stuff in progress it might make sense to create a completely new thing for the ps3 which utilises the cell fully and has functionality for loading own apps etc
User avatar
boxbuilder
Posts: 15
Joined: Sat Nov 17, 2007 3:13 pm

Post by boxbuilder »

Kernel patch works until reboot on 2.6.23-20071023 (geoff's kernel) on fedora7 (gcc4.1.2-20070925) on an NTSC, 80gb PS3 with silver trim (I think that means no emotion engine, and still 90nm cell) it works with fw 1.8, and 2.01.

screenshot of multiple translucent windows w/ "mplayer -xv" using hardware zoom (I think) is here: http://bayimg.com/aAioMaAbd (note the low cpu use in the blue graph, top right)

had to run: yum install xorg-x11-server-sdk
first.

I experienced a bug when I restarted it, xorg froze the gpu. rerunning "insmod ps3rsx.ko" before startx fixes it (I know what the first line in startx is going to say ;-)

using ctrl+alt+f1 makes the gpu freak, but that's a minor issue at the moment.

Excellent work Glaurung; you made the ps3 desktop usable.

Still haven't gotten Ironpeter's troll or triangle to work, it says:

Code: Select all

ioctl32(ps3gpu:24808): Unknown cmd fd(3) cmd(40047208){t:'r';sz:4} arg(ffb56748) on /dev/fb0
ioctl: Invalid argument
Failed to retreve GPU info
trying to compile the simple_dxt says:

Code: Select all

../../src/fifo/utils.c:228: error: storage size of 'info' isn't known.
EDIT: this is because I tried to use the "old" libps3rsx with the new kernel module.

I'll keep tinkering with it, probably missing some little program or something.

edit: libps3rsx rev. 186
Last edited by boxbuilder on Tue Dec 18, 2007 5:16 am, edited 1 time in total.
eldridge
Posts: 3
Joined: Mon Dec 17, 2007 11:47 am

Post by eldridge »

boxbuilder wrote: had to run: yum install xorg-x11-server-sdk
On FC7 2.6.23 here, using the addon source.

I had to update the symbolic links in /lib/modules/2.6.23 to point to the kernel source as well and do a kernel build - if that helps anyone in building the new modules.
boxbuilder wrote: Still haven't gotten Ironpeter's troll or triangle to work, it says:

Code: Select all

ioctl32(ps3gpu:24808): Unknown cmd fd(3) cmd(40047208){t:'r';sz:4} arg(ffb56748) on /dev/fb0
ioctl: Invalid argument
Failed to retreve GPU info
trying to compile the simple_dxt says:

Code: Select all

../../src/fifo/utils.c:228: error: storage size of 'info' isn't known.
I'll keep tinkering with it, probably missing some little program or something.

edit: libps3rsx rev. 186
Yeah same problem here, the cmd suggests the IOCTL does not exist this means to me that these examples work (and someone please correct me if I am wrong) with the patched ps3fb, I think they will need to be changed to work with the new modules?

The same reason that you get the error code "storage size of 'info'" as the structure is not defined in the default version of ps3fb appears to be replaced in the new kernel module's header, but if you fix that the IOCTL's become undefined. Does anyone have any samples of using the new modules for rsx 3D, or do you still need the patched ps3fb?

Could be missing something here can't see how to open the new module from via opening something in /dev - likely my issue will try some more.

Want to get some geom/textures flowing from the SPU's and give the rsx some _stress_. This new kernel module is looks much cleaner that patching ps3fb.

BTW great stuff Glaurung & Ironpeter, many thanks.
IronPeter
Posts: 207
Joined: Mon Aug 06, 2007 12:46 am
Contact:

Post by IronPeter »

>Yeah same problem here, the cmd suggests the IOCTL does not exist this means to me that these examples work (and someone please correct me if I am wrong) with the patched ps3fb, I think they will need to be changed to work with the new modules?


Yes, Glaurung promised to make some patch to libps3rsx in order to work with common kernel module.

I can commit these changes myself but is better to wait for Glaurungs patch.
User avatar
boxbuilder
Posts: 15
Joined: Sat Nov 17, 2007 3:13 pm

Post by boxbuilder »

It compiles on the patched kernel but I still can't see the triangle. It screws up the screen for a second if using ps3videomode -v 3 or ps3videomode -v 4 I tinkered with ps3gpu.c line 560 width and height, trying 1280x720 and 1136x644. I'm using a component-->VGA box which doesn't allow ps3videomode -v 12 (1280x1024) is that still hard coded?
Which video mode(s) work?

Thanx
IronPeter
Posts: 207
Joined: Mon Aug 06, 2007 12:46 am
Contact:

Post by IronPeter »

All fullscreen videomodes must work.

It is hard to fix bugs remotely but it seems like 3d initialization was not completed. You can try to tweak init.c file and investigate RAMIN after initialization.
Xagire
Posts: 2
Joined: Tue Dec 11, 2007 5:46 pm

Post by Xagire »

Someone has tested that the rsx access is still working with 2.10 firmware?
mitran
Posts: 19
Joined: Fri Nov 30, 2007 6:03 am

Post by mitran »

2.10 ends RSX !
after updateing to 2.10 linux do not boot !
it starts the kboot promt I hit enter linux boots, screen goes blank, stays that way for 10 min , after some time the sceen blanks , and reblanks and so on , after some time , but noting more.
is it posibel to uninstall the RSX driver and change back to the old driver from the Kboot promt ?
Sdw
Posts: 29
Joined: Tue Jul 17, 2007 9:50 am

Post by Sdw »

That really sucks, my interest in picking up a PS3 really dropped now. Even if it still is possible to buy a 2.00 PS3, having to stay at an older firmware is just so impractical since you won't be able to play games or use any of the new FW features like DivX.

Good going Sony...NOT!!!
IronPeter
Posts: 207
Joined: Mon Aug 06, 2007 12:46 am
Contact:

Post by IronPeter »

I do not know yet if is RSX blocked in FW 2.1

I know that many linux clean Geoff kernels do not boot with FW 2.1. I do not want to make FW upgrade to investigate this problem.
Compound
Posts: 48
Joined: Thu May 12, 2005 10:29 am

Post by Compound »

damn i really hope not, bought my ps3 yesterday, was planning on buying warhawk today, ah well its sonys own fault that they wont get my cash. would test this out, but really need rsx access lol
billb
Posts: 32
Joined: Wed Dec 12, 2007 5:52 am

Post by billb »

mitran wrote:2.10 ends RSX !
after updateing to 2.10 linux do not boot !
it starts the kboot promt I hit enter linux boots, screen goes blank, stays that way for 10 min , after some time the sceen blanks , and reblanks and so on , after some time , but noting more.
I have had the same experience with my Fedora 7 install ... I changed to a different bootloader as described in this post and it boots again.

@ IronPeter, if there is something specific you want to see/test re: the new firmware just let us know.
Akta77
Posts: 40
Joined: Sun Dec 09, 2007 9:57 pm
Location: France (Paris)

Post by Akta77 »

billb wrote:
mitran wrote:2.10 ends RSX !
after updateing to 2.10 linux do not boot !
it starts the kboot promt I hit enter linux boots, screen goes blank, stays that way for 10 min , after some time the sceen blanks , and reblanks and so on , after some time , but noting more.
I have had the same experience with my Fedora 7 install ... I changed to a different bootloader as described in this post and it boots again.

@ IronPeter, if there is something specific you want to see/test re: the new firmware just let us know.
It's a good point: As some of us have made the upgrade, maybe some ps3's upgraded owners could give "ssh" access to their box to IronPeter & Glaurung in order to test the "new" hypothetic restrictions of the Hypervisor.
d-range
Posts: 60
Joined: Fri Oct 26, 2007 8:22 pm

Post by d-range »

billb wrote:
mitran wrote:2.10 ends RSX !
after updateing to 2.10 linux do not boot !
it starts the kboot promt I hit enter linux boots, screen goes blank, stays that way for 10 min , after some time the sceen blanks , and reblanks and so on , after some time , but noting more.
I have had the same experience with my Fedora 7 install ... I changed to a different bootloader as described in this post and it boots again.

@ IronPeter, if there is something specific you want to see/test re: the new firmware just let us know.
So does that mean you have a booting FC7 with the ps3rsx module and FW2.10? Confirming that would already be extremely useful. If so, you could post the dmesg output related to the ps3rsx module.

I won't be updating before this is confirmed. If they really plugged the hole beyond workaround I guess that means my PS3 will just stay at 2.01 and be a linux development machine and I'll just stick with buying 360 games...
billb
Posts: 32
Joined: Wed Dec 12, 2007 5:52 am

Post by billb »

d-range wrote:So does that mean you have a booting FC7 with the ps3rsx module and FW2.10? Confirming that would already be extremely useful. If so, you could post the dmesg output related to the ps3rsx module.
I have a booting F7 with FW2.1 but the ps3rsx module doesn't work -- I posted partial dmesg output here. I'll edit that in a minute to include the full output.
IronPeter
Posts: 207
Joined: Mon Aug 06, 2007 12:46 am
Contact:

test

Post by IronPeter »

Test is very simple. Try in the kernel mode

u64 a = 0, b = 0;
lv1_gpu_memory_allocate( 0, 0, 0, 0, 0, &a, &b );
printk( "%8x %8x %8x %8x \n", (u32)a, (u32)(a>>32), (u32)b, (u32)(b>>32) );

It is better to try that call before any RSX stuff ( for example in the ps3fb.c ).

Peter.
d-range
Posts: 60
Joined: Fri Oct 26, 2007 8:22 pm

Re: test

Post by d-range »

IronPeter wrote:Test is very simple. Try in the kernel mode

u64 a = 0, b = 0;
lv1_gpu_memory_allocate( 0, 0, 0, 0, 0, &a, &b );
printk( "%8x %8x %8x %8x \n", (u32)a, (u32)(a>>32), (u32)b, (u32)(b>>32) );

It is better to try that call before any RSX stuff ( for example in the ps3fb.c ).

Peter.
What would it mean for the RSX module if it cannot do lv1_gpu_memory_allocate with zero size parameter anymore? Is it essential to the way the RSX is accessed? Or would a non-zero allocate still enable you to get to the FIFO/RAMIN/etc?
IronPeter
Posts: 207
Joined: Mon Aug 06, 2007 12:46 am
Contact:

Post by IronPeter »

It is for direct RAMIN access. I can init 3D only with this call ( but I am pretty sure that there are undocumented HV calls for 3D initialization ).
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

This is the problem with new kernels and 2.10:
http://git.kernel.org/?p=linux/kernel/g ... -2.10.diff
Geert Uytterhoeven wrote:Subject: ps3fb: Update for firmware 2.10

ps3fb: Update for firmware 2.10

As of PS3 firmware version 2.10, the GPU command buffer size must be at least 2
MiB large. Since we use only a small part of the GPU command buffer and don't
want to waste precious XDR memory, move the GPU command buffer back to the
start of the XDR memory reserved for ps3fb and let the unused part overlap with
the actual frame buffer.
LoaderDude
Posts: 2
Joined: Wed Dec 19, 2007 10:54 am

Post by LoaderDude »

Well, I took the leap and upgraded my Gutsy + ps3rsx to 2.10.

Petitboot came up but failed while attempting to start the X-server.
Backing off to fbdev still works with the same old (painful) performance. Needless to say, the rsx is sorely missed.

I'm ready to pull down source and start tinkering.
Give me a shout if there's something you'd like me to try.
- </\\/\\> -
Post Reply