http://people.freebsd.org/~anholt/dri/files/drm-unique-2.diff

Here's my first shot at the changes for unique handling in the DRI.  It
includes a new ioctl, DRM_IOCTL_SET_VERSION.  This takes in a struct
containing numbers for the major/minor version of the device independent
DRM interface and major/minor of the device dependent interface version
(the version numbers we're familiar with for the DRM modules).  If the
DI interface version is 1.1, we set the busid based off of the PCI
device we probed as.  It's in the pci:oooo:bb:dd.f format as Linus
requested.  The *_dri.c in the DDX have been converted to use a new
libdri function DRICreatePCIBusID which also creates a busid in that
format.  libdrm understands both of these formats.  If the DI interface
version doesn't get set, then the DRM behaves in the same way as before
(haven't tested it again to be sure yet).  Nothing uses the DD interface
version number yet, but there's a simple hook in there for it.  The
setversion ioctl returns the actual versions of the DI and DD interfaces
in the structure that was passed to it.

Things I'm thinking about:
- What should the DRM do if the minor number for either DI or DD
interface is greater than the DRM knows about?
- Need to limit setting of the general interface version to root (X
Server) probably.  Not an issue with the current version, though.
- Can we deprecate SET_UNIQUE?  My idea is that the ioctl would still
function, but call set_busid like the new interface version does and
then return an error if the unique being set is not equivalent to the
device's.  This would break some DRI setups with multiple cards of a
single type in a system with an old X Server.
- Do we want to put some reserved fields in the SET_VERSION ioctl in
case we want to extend it in some manner in the future?
- Do we want to create an ioctl to get the PCI ID from the DRM?  If we
do, I would also like to put the IRQ number in there, too.  I want to
deprecate the irq-from-busid feature (particularly given the concerns
about domains), at least lobotomizing it to only check that the busid
info passed in matches the device's and then return the irq for the
device.
- Should the libdri minor version be bumped for the new
DRICreatePCIBusID function?  Is using xf86LoaderCheckSymbol the way to
see if it's available, and does it need to be in the symbol lists for
the drivers?
- I would like to move xf86drm.c to shared/drm/ (it's a shared file
anyway).  Is there any value in the /proc/ support in it any more?
- drm.h should probably get re-merged and put into shared/

-- 
Eric Anholt                                [EMAIL PROTECTED]          
http://people.freebsd.org/~anholt/         [EMAIL PROTECTED]




-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to