From: Keith Whitwell <keith@tungstengraphics.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Egbert Eich <eich@xfree86.org>, Jon Smirl <jonsmirl@yahoo.com>,
Eric Anholt <eta@lclark.edu>,
kronos@kronoz.cjb.net,
Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-fbdev-devel@lists.sourceforge.net,
dri-devel <dri-devel@lists.sourceforge.net>,
Jeff Garzik <jgarzik@pobox.com>
Subject: Re: [Dri-devel] Re: DRM and pci_driver conversion
Date: Mon, 27 Oct 2003 15:10:20 +0000 [thread overview]
Message-ID: <3F9D355C.8070103@tungstengraphics.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0310251116140.4083-100000@home.osdl.org>
Linus Torvalds wrote:
> On Sat, 25 Oct 2003, Egbert Eich wrote:
>
>>Speaking of XFree86: when I developed the PCI resource stuff in
>>XFree86 I was trying to get support from kernel folks to get the
>>appropriate user space interfaces into the kernel. When I got
>>nowhere I decided to do everything myself.
>
>
> There won't be any "user space interfaces". There are perfectly good
> in-kernel interfaces, and anybody who needs them needs to be in kernel
> space. Ie the kernel interfaces are for kernel modules, not for user space
> accesses.
>
> The kernel module can be a simple interface layer like DRI, but the thing
> is, it needs to be specific to some kind of hardware. I refuse to have
> some kind of crap "user space driver" interface - drivers in user space
> are a mistake.
>
>
>>Is there any API that allows one to do this from user space?
>
>
> No. And I don't really see any huge reason for it.
>
>
>>There are plenty of XFree86 drivers around that don't have a
>>DRM kernel module and it should be possible to run those which
>>do without DRI support, therefore it would be a good if the
>>XFree86 driver could do this registration itself.
>
>
> If you do this, do it _right_. Look at what X really needs, and make a
> driver for it. A _real_ driver. Not just a half-hearted "we want to do
> things in user space, but we can't".
>
> Face it, a good graphics driver needs more than just "set up the ROM". It
> needs DMA access, and the ability to use interrupts. It needs a real
> driver.
>
> It basically needs something like what the DRI modules tend to do.
>
> I'd be really happy to have real graphics drivers in the kernel, but quite
> frankly, so far the abstractions I've seen have sucked dead donkeys
> through a straw. "fbcon" does way too much (it's not a driver, it's more a
> text delivery system and a mode switcher). And DRI is too complex and
> fluid to be a good low-level driver.
>
> Quite frankly, I'd much rather see a low-level graphics driver that does
> _two_ things, and those things only:
>
> - basic hardware enumeration and setup (and no, "basic setup" does not
> mean "mode switching": it literally means things like doing the
> pci_enable_device() stuff.
>
> - serialization and arbitrary command queuing from a _trusted_ party (ie
> it could take command lists from the X server, but not from untrusted
> clients). This part basically boils down to "DMA and interrupts". This
> is the part that allows others to wait for command completion, "enough
> space in the ring buffers" etc. But it does _not_ know or care what the
> commands are.
>
> Then, fbcon and DRI and X could all three use these basics - and they'd be
> _so_ basic that the hardware layer could be really stable (unlike the DRI
> code that tends to have to upgrade for each new type of command that DRI
> adds - since it has to take care of untrusted clients. So DRI would
> basically use the low-level driver as a separate module, the way it
> already uses AGP).
That makes sense - the abstraction of dma engine away from the
security-providing gumpf that is so much of the DRM modules, to form a single
kernel-level "owner" of the graphics hardware.
This would also answer various questions that float around regarding who is
the ultimate "owner" of the graphics hardware - in particular, who is
responsible for virtualization of the graphics memory.
Of course, that's a trickier task because it is one which doesn't just rip
existing code out of various poorly-conceived modules.
Keith
-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community? Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
next prev parent reply other threads:[~2003-10-27 15:10 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1066703516.646.24.camel@leguin>
2003-10-23 19:04 ` DRM and pci_driver conversion Kronos
2003-10-23 21:10 ` [Linux-fbdev-devel] " Eric Anholt
2003-10-23 21:31 ` Jon Smirl
2003-10-23 23:23 ` [Dri-devel] " Linus Torvalds
2003-10-23 23:46 ` Eric Anholt
2003-10-24 1:19 ` [Dri-devel] " Jeff Garzik
2003-10-24 1:52 ` [Dri-devel] Re: [Linux-fbdev-devel] " Jon Smirl
2003-10-24 3:47 ` Multiple drivers for same hardware:, was: " Jon Smirl
2003-10-24 4:40 ` Linus Torvalds
2003-10-28 18:00 ` James Simmons
2003-10-24 16:44 ` [Dri-devel] " Linus Torvalds
2003-10-24 16:57 ` [Dri-devel] Re: [Linux-fbdev-devel] " Petr Vandrovec
2003-10-24 17:59 ` Linus Torvalds
2003-10-24 18:34 ` Jon Smirl
2003-10-24 19:45 ` [Dri-devel] " Ivan Kokshaysky
2003-10-24 19:08 ` Ivan Kokshaysky
2003-10-24 17:06 ` Jeff Garzik
2003-10-24 1:50 ` Jon Smirl
2003-10-25 17:29 ` Egbert Eich
2003-10-25 18:37 ` [Dri-devel] Re: [Linux-fbdev-devel] " Linus Torvalds
2003-10-25 19:17 ` [Dri-devel] " Jeff Garzik
2003-10-27 14:37 ` Ingo Oeser
2003-10-27 15:14 ` Keith Whitwell
2003-10-27 15:38 ` Jeff Garzik
[not found] ` <20031027153824.GA19711@gtf.org>
2003-10-27 15:50 ` Keith Whitwell
[not found] ` <200310271537.30435.ioe-lkml@rameria.de>
2003-10-27 15:43 ` Jeff Garzik
2003-10-28 10:53 ` [Dri-devel] Re: [Linux-fbdev-devel] " Ingo Oeser
2003-10-25 21:02 ` [Dri-devel] " Jon Smirl
2003-10-25 22:07 ` Benjamin Herrenschmidt
2003-10-27 15:10 ` Eric W. Biederman
2003-10-27 15:10 ` Keith Whitwell [this message]
[not found] ` <20031027114006.A66611@xfree86.org>
2003-10-27 19:38 ` Ian Romanick
2003-10-27 21:32 ` Linus Torvalds
2003-10-27 23:55 ` Benjamin Herrenschmidt
2003-10-28 2:13 ` Linus Torvalds
2003-10-28 3:27 ` Philip Brown
2003-10-28 19:40 ` James Simmons
2003-10-28 21:35 ` Benjamin Herrenschmidt
2003-10-28 22:09 ` Jon Smirl
2003-10-28 22:26 ` Benjamin Herrenschmidt
2003-10-28 22:54 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3F9D355C.8070103@tungstengraphics.com \
--to=keith@tungstengraphics.com \
--cc=dri-devel@lists.sourceforge.net \
--cc=eich@xfree86.org \
--cc=eta@lclark.edu \
--cc=jgarzik@pobox.com \
--cc=jonsmirl@yahoo.com \
--cc=kronos@kronoz.cjb.net \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).