Direct GPU frame buffer access

Investigation into how Linux on the PS3 might lead to homebrew development.

Moderators: cheriff, emoon

Post Reply
urchin
Posts: 121
Joined: Thu Jun 02, 2005 5:41 pm

Direct GPU frame buffer access

Post by urchin »

As noted by others, when allocating and mapping DDR, a chunk of memory at the beginning of the area seemed only to retain values for a suspiciously short period of time, presumably being overwritten by the frame buffer blit.

I've had ps3fb disabled in my kernel for the past week or so, but I've only just this evening got round to trying this out and can confirm that this does appear to be the case. I tried writing values to the area below 20MB - the values were retained and my TV screen turned a nice shade of purple :)

The pixel format is 32bit XRGB, where the X value has no effect on the displayed image. lv1_gpu_context_attribute(L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP) can be used to specify the offset in bytes from the start of the memory area that the GPU pulls pixel data from. I've not tested this extensively, but I was able to flip between displaying two different areas of memory filled with known values.

Disabling ps3fb is very straightforward - I replaced ps3fb.c with:

Code: Select all

#include <linux/module.h>

void ps3fb_flip_ctl&#40;int on&#41;
&#123;
&#125;
EXPORT_SYMBOL_GPL&#40;ps3fb_flip_ctl&#41;;

void ps3fb_cleanup&#40;void&#41;
&#123;
&#125;
EXPORT_SYMBOL_GPL&#40;ps3fb_cleanup&#41;;
Post Reply