====== 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 ===== - Why a new driver - Features - Challanges we must handle - 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_FORMAT|0x00000300|0x00|4| |PATTERN_FORMAT|0x00000300|0x02|1| |LINE_FORMAT |0x00000300|0x04|1| |RECT_FORMAT |0x00000300|0x06|1| |CLIPPING_RECT |0x00000300|0x03|2| == SURFACE_FORMAT == ^Name ^TAG ^Channel ^Size ^ |SURFACE_FORMAT|0x00000300|0x00|4| ^Reg ^Content^ |R1|format_type| |R2|line_length<<16 (or) line_length| |R3|unused| |R4|unused| == PATTERN_FORMAT == ^Name ^TAG ^Channel ^Size ^ |PATTERN_FORMAT|0x00000300|0x02|1| ^Reg ^Content^ |R1|pattern_format| == RECT_FORMAT == ^Name ^TAG ^Channel ^Size ^ |RECT_FORMAT |0x00000300|0x06|1| ^Reg ^Content^ |R1|rect_format| == LINE_FORMAT == ^Name ^TAG ^Channel ^Size ^ |LINE_FORMAT |0x00000300|0x04|1| ^Reg ^Content^ |R1|line_format| == CLIPPING_RECT == ^Name ^TAG ^Channel ^Size ^ |CLIPPING_RECT|0x00000300|0x03|2| ^Reg ^Content^ |R1|y<<16 (or) x| |R2|height<<16 (or) width| === Filling a rectangle === First setup the color ^Name ^TAG ^Channel ^Size ^ |RECT_SOLID_COLOR|0x000003FC|0x06|1| ^Reg ^Content^ |R1|color| Then we can paint some rects with the color ^Name ^TAG ^Channel ^Size ^ |RECT_SOLID_RECTS|0x00000400|0x06|2| ^Reg ^Content^ |R1| dy<<16 (or) dx | |R2| height<<16 (or) width |