[Cbe-oss-dev] [RFC/PATCH] ps3vram: new driver for accessing PS3 video RAM as MTD

Jim Paris jim at jtan.com
Tue Apr 29 09:12:13 EST 2008


Hi,

Vivien Chappelier wrote:
> Earlier versions of ps3fb used to allocate zero bytes of video
> memory. So the next context would start at the beginning of VRAM
> too. Newer versions of ps3fb allocate video memory correctly (a zero
> allocation would be rejected by FW >= 2.10 anyway), so the extra
> skipping should not be needed anymore.

Aah, of course.  I've updated the patch to not reserve any VRAM and it
looks OK.

If we can get ps3vram to work when it is loaded before ps3fb, it would
be useful to have ps3vram not allocate all 256 MiB by default.  I've
added support for a '-' suffix on the ps3vram.size parameter, which
means to subtract off ps3fb_videomemory.size from the specified value.
This way the default in ps3vram can be "256M-" and then only the
ps3fb= option is needed for the user to divide things up differently.

I tried to look into why ps3vram doesn't work by itself but didn't
reach any conclusions.  I suspect it requires that a framebuffer has
been set up with L1GPU_CONTEXT_ATTRIBUTE_FB_SETUP in order for the
L1GPU_CONTEXT_ATTRIUTE_FB_BLIT kick to work.

> My initial idea was to map the whole RAM too, but this does not work
> either as the HV will reject mapping of more than 128MB. This might
> come from the fact that 'physical' memory as seen by Linux is
> actually allocated from the HV in two sets, one big chunk of 128MB
> 'real' memory, plus a second allocation for the rest.

Could we use two contexts, one with the boot region mapped and one
with the hotplug region mapped?

Geoff Levand wrote:
> I merged these changes and some others into ps3vram-driver.patch
> in ps3-linux.git.  If possible, please base any updates on
> ps3-linux.git.

Will do, thanks!  I'll follow up with some patches I have left over,
once I figure out git-send-email :)

-jim



More information about the cbe-oss-dev mailing list