lkml.org 
[lkml]   [1996]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: SVGA kernel chipset drivers.
Date
Linus Torvalds said:
>
>
> The server does a fork(), and the child does all the graphics stuff,
> exactly so that the parent can't be impacted by a buggy (or malicious)
> graphics program.
>
> Essentially, this already sets up the protection domains. The server is
> protected, yet the fork() inheritance is able to give the graphics
> program all the resources it needs, and nothing more.
>
> > simple: a kernel trap is currently the cheapest protection domain switch
>
> We don't need to switch protection domains more than once. We just need
> to set up the frame buffer, put it into graphics mode, and then the
> graphics program can just use it directly. This is all assuming the card
> has a sane frame buffer and doesn't need more than the map (and perhaps
> some IO port access, but that is also set up by the startup stuff).
>
> I mean, you've all been trying to say that all graphics cards have frame
> buffers, so why aren't you happy now that I gave you a protected
> frame-buffer without a line of kernel code? What more do you want?

Such a daemon already exists, it is called Xfree86.

As of Xfree86 3.1.2B you can use the call

XF86DGAGetVideo(display, screen, &addr, &width, &bank, &ram);

returns a pointer to the video ram (addr) the width of a scan line (width)
the size of a bank (bank) and the total ram size (ram). You don't even need
a linear frame buffer, as

XF86DGASetVidPage(display, screen, page) a

Allows you to do video ram paging (no very optimal as you always have read and
write mapped at the same address).

XF86DGADirectVideo(display, screen, XF86DGADirectGraphics)
^flag

Gives you write access to the display. You can even add XF86DGADirectMouse
and XF86DGADirectKeyb to the flags and get raw mouse mickeys and key repeats.

--
Jon. <jon@gte.esi.us.es, http://www.esi.us.es/~jon>


\
 
 \ /
  Last update: 2005-03-22 13:37    [from the cache]
©2003-2011 Jasper Spaans