Keith Whitwell wrote:
>
> David Dawes wrote:
> >
> > I guess that if the HW-independent component is just a mechanism
> > for passing them transparently through to the kernel component (or
> > equivalent), then that is workable providing all different OS
> > implementations of the kernel component (for given HW) can accept
> > the same set of tokens and data structures. What hadn't been clear
> > to me is whether that's possible/feasible.
>
> Trivially, consider writing all new drm kernel modules with only a
> single ioctl (or whatever), which takes two arguments: this
> os-independent number and a pointer to a structure. It's overkill,
> but clearly it's possible and the overhead is trivial.
Agreed. This interface turned out to be very generic, much more than I
had originally hoped for.
> > I guess the HW dependencies in the current DRM library would be pushed
> > up into the video driver (and possibly down into the kernel module).
> >
> > >+/* Driver specific DRM command indices
> > >+ * NOTE: these are not OS specific, but they are driver specific
> > >+ */
> > >+#define DRM_RADEON_CP_INIT 0x00
> > >+#define DRM_RADEON_CP_START 0x01
> > >+#define DRM_RADEON_CP_STOP 0x02
> > >+#define DRM_RADEON_CP_RESET 0x03
> > >+#define DRM_RADEON_CP_IDLE 0x04
> > >+#define DRM_RADEON_RESET 0x05
> > >+#define DRM_RADEON_FULLSCREEN 0x06
> > >+#define DRM_RADEON_SWAP 0x07
> > >+#define DRM_RADEON_CLEAR 0x08
> > >+#define DRM_RADEON_VERTEX 0x09
> > >+#define DRM_RADEON_INDICES 0x0a
> > >+#define DRM_RADEON_STIPPLE 0x0c
> > >+#define DRM_RADEON_INDIRECT 0x0d
> > >+#define DRM_RADEON_TEXTURE 0x0e
> > >+#define DRM_RADEON_VERTEX2 0x0f
This is not as pretty as the C interface we use to have, but it is
definitely a very clean separation between OS specifics and HW
specifics.
Thanks to everyone who commented on this thread...I believe we will end
up with a better implementation based on all the constructive feedback.
I'll get a branch going off the trunk to get this implementation
started.
Regards,
Jens
-- /\
Jens Owen / \/\ _
[EMAIL PROTECTED] / \ \ \ Steamboat Springs, Colorado
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel