pbuffers, extensions to DRM

Jon Smirl jonsmirl@yahoo.com
Sat, 6 Dec 2003 14:24:13 -0800 (PST)


Generic things we need in the next DRM rev:

1) Retrieve chip/vendor id, subsys ids

2) location of PCI resources. fb start/end, mmio start/end.

Should we do a new API on this one too? The only thing I use these for is to
pass them back into AddMap. Maybe we could modify AddMap(FBTYPE) to take zeros
for location/length and then have the driver fill them in. Same for MMIO. Now
the higher levels don't need to know the physical addresses. This would probably
help out on 64bit too since the driver could control the map location and 32bit
DMA access. This model would also allow the board to add more that two segments.
GetMap could be used to find these values if you really needed to know them.

2) A generic routine for retrieving the ROM contents.

3) FB memory allocators. Not sure these should go into the DRM system. It might
be better to put this into the library with init/mode support. Mesa would need
to be modified to use these allocation routines.  On the other hand these might
be better inside the DRM driver. Future hardware may not allow direct access to
the framebuffer. 

4) kernel call to pci_enable/disable_device(). The only reason this works right
now is becuase the Xfree 2D layer is playing with the PCI registers and enabling
the device.

5) General IOCTL clean up. For example the stats IOCTL structure should have
sizeof(buffer) as it's first member. Now we can expand the buffer with more
members. An old program would call with the small size and receive a subset of
the stats and a more data error. A new program would set the size to the size of
the extended structure. The way it is now we have to have a new IOCTL to change
the structure.

6) Next rev of the interface number we could remove the old IOCTLs and make them
return not_implemented. This will start paving the way for reuse.

7) Radeon specific - fix clears to not be hardwired to the visible framebuffer.

8) anything else?

-- Eric Anholt <eta@lclark.edu> wrote:
> Do you have the patch laying around?
I sent sample implementations for some of these to xserver and eta@lclark.edu. I
can send again.



=====
Jon Smirl
jonsmirl@yahoo.com

__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/