Playstation 3 next generaton framebuffer driver

The purpose of this page is to describe and document the development of a next generation framebuffer driver for the ps3

Content

  1. Why a new driver
  2. Features
  3. Challanges we must handle
  4. Things that would be nice

why a new driver

The ps3 otheros(linux) suffers from a huge lack of users compared to the amount of consoles out there as well as a huge lack of development interest. We hope to give users a greater experience and flexibility by improving support for desktop enviroments as well as video playback. By providing this interface we also provide the ability to develop code on the ps3 trough IDE’s and similar tools. This will hopefully give a more rapid production and test enviroment for cell(spu) developers wanting to take a peak at the unique cpu architecture the ps3 provides in its cell processor.

Features

under development

Challanges we must handle

  • How to create a generic ioctl based copy from xdr/drr_addr,x0,y0,x1,y1,stride to xdr/ddr_addr,x0,y0,x1,y1,stride.
  • How to create a generic ioctl based fill of xdr/ddr_addr,x0,y0,x1,y1.
  • How to create a generic ioctl based scale from xdr_addr,x0,y0,x1,y1,stride to xdr/ddr_addr,x0,y0,x1,y1,stride.
  • How to create a yuyv surface for video overlay
  • How to copy and scale the video overlay to framebuffer surface with proper timing and colorspace conversion
  • How to create a hardware cursor
  • How to copy the hardware cursor to the framebuffer surface with proper timing

Things that would be nice

  • Alpha blending to get transparency in X and in other applications
  • Allocation scheme to allow X to allocate vram surfaces as it desires
  • That more people than me ( kristian jerpetjoen aka unsolo ) worked on it

Discoveries thus far from a KISS perspective

A GPU Command is made up from the following pieces

Header

ps3rsxfb_begin_ring(priv, chan, tag, size)


  • Bits 0:12 TAG (Command)
  • Bits 13:18 Channel (Todo figure out max number of channels and if there is a direction bit)
  • Bits 18:32 Size tells you how many paramaters follows this command(Todo figure out max)

Params

ps3rsxfb_out_ring(priv, data)


  • 32 bit paramater

How to setup a surface from nvidia/nv_accel.c modified to the above

Setup needed

Once this setup is completed it should be possible to use these tags/channels

Name TAG Channel Size
SURFACE_FORMAT0×000003000×004
PATTERN_FORMAT0×000003000×021
LINE_FORMAT 0×000003000×041
RECT_FORMAT 0×000003000×061
CLIPPING_RECT 0×000003000×032

SURFACE_FORMAT
Name TAG Channel Size
SURFACE_FORMAT0×000003000×004
Reg Content
R1format_type
R2line_length«16 (or) line_length
R3unused
R4unused

PATTERN_FORMAT
Name TAG Channel Size
PATTERN_FORMAT0×000003000×021
Reg Content
R1pattern_format

RECT_FORMAT
Name TAG Channel Size
RECT_FORMAT 0×000003000×061
Reg Content
R1rect_format

LINE_FORMAT
Name TAG Channel Size
LINE_FORMAT 0×000003000×041
Reg Content
R1line_format

CLIPPING_RECT
Name TAG Channel Size
CLIPPING_RECT0×000003000×032
Reg Content
R1y«16 (or) x
R2height«16 (or) width

Filling a rectangle

First setup the color

Name TAG Channel Size
RECT_SOLID_COLOR0x000003FC0×061
Reg Content
R1color

Then we can paint some rects with the color

Name TAG Channel Size
RECT_SOLID_RECTS0×000004000×062
Reg Content
R1 dy«16 (or) dx
R2 height«16 (or) width

 
ps3/ps3rsxfb.txt · Last modified: 2009/03/15 18:19 by unsolo
 
Recent changes RSS feed Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki