Display specification
Adam Jackson
ajax at nwnk.net
Mon Mar 14 09:30:42 PST 2005
On Monday 14 March 2005 12:10, Brian Paul wrote:
> Adam Jackson wrote:
> > So we want a device specifier. Are PCI strings good enough?
> >
> > EGLDisplay dpy = eglGetDisplayForWidgetXXX("pci/0000:01:00.0");
> >
> > As long as there's a unique identifier for a device on a given bus, this
> > works, so basically that's everything except ISA. Not very GL-ish to
> > pass a string in as an argument, I suppose.
>
> The sample code I'm working on does something like that. I think it
> would be acceptable to pass a string. Could we also have a more
> general syntax, like "screen/0" or "screen/1"? That way we wouldn't
> tie the interface to PCI-based devices.
Sure, we probably should. The reason for the pci/ part was so we could map
this to other bus types. MCA, SBus, and NuBus have addressable slots. VLB
and ISA don't, but there you could just say isa/0 and just live with only
supporting on device on the ISA bus. (Not that I know of any NuBus cards
with 3D engines, but you may want to drive them with Mesa's swrast anyway.)
Bus-addresses are admittedly user-hostile. So we need a mapping between
'screen/0' and 'pci/01:00.0'. And we can't just push that down into the
driver because the driver we choose is based on the screen we're asking for.
Neither do I really want an implicit mapping that depends on the order you
walk the bus, because that can change (firmware upgrades, hotplugged cards,
USB and PCMCIA displays).
Maybe that means a config file somewhere. Anyway, nailing down the screen/ to
bus address mapping isn't necessarily something we need to formalize within
the API.
> The way I was thinking of it was:
> - each card corresponds to an EGLDisplay
> - an EGLDisplay may have one or more screens (i.e. pieces of glass)
> - each screen may be a view onto different surface, or the same surface.
That sounds right to me.
- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dri-egl/attachments/20050314/0c293a01/attachment.pgp
More information about the dri-egl
mailing list