linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Current discussion about the future of free software graphics
@ 2004-05-11 18:09 sottek
  2004-05-11 19:55 ` James Simmons
                   ` (4 more replies)
  0 siblings, 5 replies; 28+ messages in thread
From: sottek @ 2004-05-11 18:09 UTC (permalink / raw)
  To: eich, agd5f, michel, keithp, jonsmirl, jsimmons
  Cc: linux-fbdev-devel, dri-devel

Can we wrap this up the discussion and try to get to a consensus on
design requirements? I think most of the opinions are starting to
solidify enough to start hashing out the requirements and actual
design.

Also, we probably want to drop the communication down to just one
list? I think dri-devel seems to have the widest group of subscribers.

To start the ball rolling here is a few requirements that I have. We
can build up the list and veto as needed to try and get to a working 
set.

1: Design must provide a mechanism for basic mode setting in a
device independent manner from an application with user level
permissions. ("Basic" to be defined)
2: Design must provide a mechanism for any number of driver dependent
extensions.
3: Design must provide a mechanism to allow the kernel to draw oops
or console messages to the screen in any mode.
4: Design must insure that user applications may not set the hardware
into an unstable state that could lead to lockup or damage display
devices.
5: Design must incorporate a bi-direction API versioning system. The
application must indicate the API version it is expecting first,
followed by the driver's reply.

And some that may require some discussion:
6: Design must provide a mechnism by which the driver can inform a
user application of acceptable modes that may later be applied to
hardware.
7: Design must provide a mechnism for user level applications to
use rendering features of hardware in a secure manner.
8: Design must provide a mechanism for multi-framebuffer and
multi-display per framebuffer devices to be controlled.



-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3

^ permalink raw reply	[flat|nested] 28+ messages in thread
* RE: [Linux-fbdev-devel] Current discussion about the future of free software graphics
@ 2004-05-11  0:11 Sottek, Matthew J
  2004-05-11  2:20 ` Adam Jackson
  0 siblings, 1 reply; 28+ messages in thread
From: Sottek, Matthew J @ 2004-05-11  0:11 UTC (permalink / raw)
  To: Michel Dänzer, xserver, mesa3d-dev, dri-devel,
	linux-fbdev-devel


>It does, or the ioctl must verify the register data, which could require
>about the same amount of code as computing it in the kernel in the first
>place (possibly even more; the problem changes from computing a valid
>combination of register values for a specific requested mode to limiting
>the huge number of register value combinations to those that don't lock
>up the chip or worse). I've pointed this out several times before, but
>nobody has presented a solution yet. Will the userspace code live in a
>daemon that runs as root? Or will only privileged processes be allowed
>to change display properties?

I am in agreement with Michel on this point.
There is a privilege problem.
Either you trust the data coming from user-space to kernel-space
implicitly which means the user-space process now must be privileged,
or you don't trust user-space and you have to re-validate the data coming
into the kernel.
The former doesn't buy you much. Now you have another root running deamon
floating around to be a security problem.
The latter's protocol and re-validation is difficult to the point of being
a complete waste of effort.

I have conceded that I am fine with a user-space mode setting API
as long as there is no imposed user/kernel split. For those who's chips
would require too much code to revalidate, they can just put the whole
mode setting in the kernel. I think we will discover that many of the
more advanced drivers will end up taking this route.

In the end I think this design is more complicated than is necessary. The
end goal should be to minimize privileged code, not just kernel code. When
you go with a split design you are forcing more privileged code than if
all the code lived in the same place.



-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3

^ permalink raw reply	[flat|nested] 28+ messages in thread
[parent not found: <1084205711.804.43.camel@thor.asgaard.local>]
* Current discussion about the future of free software graphics
@ 2004-05-10 16:15 Michel Dänzer
  0 siblings, 0 replies; 28+ messages in thread
From: Michel Dänzer @ 2004-05-10 16:15 UTC (permalink / raw)
  To: xserver, mesa3d-dev, dri-devel, linux-fbdev-devel


[ Apologies for the broad cross-post; I'd like to reach anyone
potentially interested ]


First of all, it should be fairly obvious to anyone that ideally only a
single kernel driver should muck with the hardware directly. However,
I'd like to point out again that it doesn't follow that the DRM and the
framebuffer device must merge to a single entity (which 'has to be' the
DRM if you ask some people, the framebuffer device if you ask
others...). E.g., they could both use the same mini-driver which deals
with the hardware. Let's try and keep our minds open to all possible
solutions.


I'd also like to comment on some points I noticed in the
ksummit-2004-discuss archives:

In http://thunk.org/pipermail/ksummit-2004-discuss/2004-May/000388.html,
Jim Gettys wrote:

> In short, the X server would put a sequence of commands into a piece
> of memory also visible by the graphics card, set up the DMA
> transfer, tell it to go, and then continue setting up a second buffer,
> and call into the UNIX kernel with the transfer address of the
> second buffer, that transfer to be initiated at interrupt time
> when the first buffer's commands had been processed; this then blocked
> the X server, so it had good "interactive" behavior under many
> circumstances.
> 
> It may be that system calls are now cheap enough to do this rather than
> having to do it in user space [...]

Yes, that's basically what the r128 and radeon X drivers do when the DRI
is enabled, and it's considerably faster than direct register banging.


In http://thunk.org/pipermail/ksummit-2004-discuss/2004-May/000391.html,
Jon Smirl wrote:

> The modelines would be passed into the plug-in libs which would turn them into
> register values. Finally the plug-in lib would use a private IOCTL to set the
> state into the video hardware. 
> 
> There are numerous pros and cons for both a both schemes. The user space code is
> swappable, easier to debug, and does not need to be run as root.

It does, or the ioctl must verify the register data, which could require
about the same amount of code as computing it in the kernel in the first
place (possibly even more; the problem changes from computing a valid
combination of register values for a specific requested mode to limiting
the huge number of register value combinations to those that don't lock
up the chip or worse). I've pointed this out several times before, but
nobody has presented a solution yet. Will the userspace code live in a
daemon that runs as root? Or will only privileged processes be allowed
to change display properties?


-- 
Earthling Michel Dänzer      |     Debian (powerpc), X and DRI developer
Libre software enthusiast    |   http://svcs.affero.net/rm.php?r=daenzer



-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2004-05-13 10:39 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-11 18:09 Current discussion about the future of free software graphics sottek
2004-05-11 19:55 ` James Simmons
2004-05-11 20:46   ` Ian Romanick
2004-05-12  3:30     ` Jon Smirl
2004-05-12 14:41       ` Richard Smith
2004-05-12 17:56         ` James Simmons
2004-05-12 18:56           ` Geert Uytterhoeven
2004-05-12 19:11             ` James Simmons
2004-05-12 19:40               ` Geert Uytterhoeven
2004-05-12 21:09                 ` James Simmons
2004-05-12 19:23           ` Richard Smith
2004-05-12 20:45           ` Richard Smith
2004-05-12 16:45       ` James Simmons
2004-05-12 19:00         ` Geert Uytterhoeven
2004-05-12 22:45       ` Nicolas Souchu
2004-05-13 10:39       ` Michel Dänzer
2004-05-12  8:48     ` [Dri-devel] Re: " Keith Whitwell
2004-05-12 17:09       ` James Simmons
2004-05-13  3:32       ` Keith Packard
2004-05-12 14:14   ` Alan Cox
2004-05-11 20:07 ` Geert Uytterhoeven
2004-05-11 23:10   ` James Simmons
2004-05-11 23:15 ` Nicolas Souchu
2004-05-12 13:34 ` Michel Dänzer
2004-05-12 13:54 ` Egbert Eich
  -- strict thread matches above, loose matches on Subject: below --
2004-05-11  0:11 [Linux-fbdev-devel] " Sottek, Matthew J
2004-05-11  2:20 ` Adam Jackson
     [not found]   ` <200405102120.48640.ajax-TAsg7VrFCGc@public.gmane.org>
2004-05-11 13:24     ` Michel Dänzer
     [not found] <1084205711.804.43.camel@thor.asgaard.local>
2004-05-10 23:45 ` James Simmons
2004-05-10 16:15 Michel Dänzer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).