On Wed, Mar 27, 2002 at 10:25:18 -0800, Jeff Hartmann wrote: > Heres just a thought... > > When we added the usage of device specific ioctls we just linked them into > the drm library because that was convient at the time. I think keeping this > code os dependant is probably a good idea. This gives more flexibility, like > on another os where ioctl semantics are impossible. In such an os they > might want to use read/write to do message passing. In a clean > implementation of this case it won't even make sense to have a drmIOCTL at > all. Remember that each os can have their own drm library, even though I > think BSD basically uses the linux one. There really shouldn't be something > as os specific as an ioctl presented in the drm interface layer. It smells > of bad design. > > 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.) Why don't we just > make each device have its own xfree module for its os specific part? 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. 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. Also, DRM_IOCTL_RADEON_CP_INIT we really be just RADEON_CP_INIT. So it's now.... - if (drmRadeonInitCP(info->drmFD, &drmInfo) < 0) return FALSE; + if (drmCOMMAND(info->drmFD, RADEON_CP_INIT, &init) < 0) 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. Alan. _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel
