Jeff Hartmann wrote:
> The basic point of this exercise is to make it so we can hot swap driver
> suites (or at least I'm pretty sure this is your goal.)
Yes.
> Why don't we just
> make each device have its own xfree module for its os specific part?
In an ideal world, we would have N OS independent drivers and M device
independent platforms for drivers to plug into. That is a total of M+N
modules to support. When we have device spefics and OS specifics in the
same module, we have M*N modules to support. To push portability, you
have to stay away from combining device specifics and OS specifics in
the same module. I realize we have already crossed this line, but we
should be doing everything we can to pull back and fix these areas and
at least keep from adding to the M*N support burden we have today.
M+N: Good
M*N: Bad
> > That
> > way we can add/subtract/upgrade driver suites, and not upset the apple cart.
> > Just seems like a whole lot easier solution to the problem.
> >
> > Adding another module load into each driver just sounds like a cleaner
> > implementation, and it solves your problem.
> >
> The code specifically we're talking about is this kind of thing....
>
> - if (drmRadeonInitCP(info->drmFD, &drmInfo) < 0) return FALSE;
> + if (drmIOCTL(info->drmFD, DRM_IOCTL_RADEON_CP_INIT, &init) < 0)
>
> We're passing exactly the same information, apart from now, we're
> passing a specific command.
Alan Hourihane wrote:
> We could rename drmIOCTL to drmCOMMAND and make it clear that it's
> not an IOCTL we are calling, it just happens to be an IOCTL in the
> linux layer.
> The drmCOMMAND can be anything that the OS supports to do, and it
> knows what we're are trying to do by passing RADEON_CP_INIT, then
> processes the &init data by understanding that command.
This morning, before reading this e-mail thread, I was working on this
very issue, and did manage to remove the Linux specific semantics.
I now have a generic mechanism, which includes explicit data passing
information. I'll use your suggestion of naming it drmCOMMAND, except
we'll have 4 verisions depending on data transfer type: drmCommandNone,
drmCommandRead, drmCommandWrite, drmCommandWriteRead. The
drmRadeonInitCP example becomes:
- if (drmRadeonInitCP(info->drmFD, &drmInfo) < 0) return FALSE;
+ if (drmCommandWrite(info->drmFD, RADEON_INIT_CP,
+ &drmInfo, sizeof(drmRadeonInit)) < 0)
-- /\
Jens Owen / \/\ _
[EMAIL PROTECTED] / \ \ \ Steamboat Springs, Colorado
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel