Mike Mestnik wrote:
I think every thing Tomas Carnecky has said here about device driver design is valid and dose apply to the DRM/dri. He may not know every thing about system security, but we also all have our strangths and his strangth is oviously device design. One way of interpeting what he is trying to say is that the DRM should be even lower-level and get back to the basics. There are going tobe alot of gripes and grones, but it's UNIX not windows.
ioctl ONLY for registers, even mmaped ones. read/write for DMA. seek for changing where your DMAing or writing to the GART and video mem. select sleeping and waiting.
There is no versioning, invalid ioctls will be enuff to find out it's not supported by the card or driver. To identify the modual /proc/devices major number lookups. For security using diffrent minor numbers, 0 for mode setting, 1 for 2d, 2 for 3d, ext. Where 2 has the same modes as /dev/mem and games/users have to be setuid root they do directly access the hardware.
The idea is to reduce the kernel mod to nothing more then device enumeration and detection.
However you solve it.. I don't care about how the kernel driver <-->
userspace driver interface is defined or implemented. I just don't think
there should be one interface for all devices, as it is now with DRM.
The userspace dri driver is the only user of these kernel drivers.
As each device works differently, why don't adapt this interface to each
device.
With the current design, there are three interfaces: dri (in userspace),
drm (between kernel and userspace) and Mesa (opengl). Why don't define
only on interface (opengl) so each driver can be optimized as much as possible. Then make packages with kernel driver/userspace driver pairs
for each card that can be compiled separately (without any other
prerequisites).
-- wereHamster a.k.a. Tom Carnecky Emmen, Switzerland
(GC 3.1) GIT d+ s+: a--- C++ UL++ P L++ E- W++ N++ !o !K w ?O ?M ?V PS PE ?Y PGP t ?5 X R- tv b+ ?DI D+ G++ e-- h! !r !y+
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel