[haiku] Re: nv_driver in kernel mode, but media kit not?

  • From: "Star's seed" <starsseed@xxxxxxx>
  • To: <haiku@xxxxxxxxxxxxx>
  • Date: Mon, 26 Jul 2010 20:36:33 +0200

Monday, July 26, 2010 1:10 AM "Ingo Weinhold" <ingo_weinhold@xxxxxx> wrote
I actually always wondered why Be went with this split for graphics drivers
instead of defining a generic ioctl interface (like they did for multi
audio).

There are two main advantages.
- First, If your graphic driver runs in Ring2*, you don't need to switch contexts
between user-land and kernel-land. (SYSCALL/SYSRET) and so, you can
save many CPU cycles.
- Second, graphics drivers are much complex and so, may contain many bugs.
If the most advanced functions run in user-land, the kernel-land driver is then
as simple as it can, and so more safe for the kernel. At worst, only the
application crashes.

Linux(DRI) VistaSeven and MAC OS X, all of them, have now graphics
drivers in two parts.
(Once again, Be was right 10 years ahead)
;-))

Regards

* http://en.wikipedia.org/wiki/Ring_%28computer_security%29

Other related posts: