public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* New proposed DRM interface design
@ 2004-09-04  0:12 Dave Airlie
  2004-09-04  0:44 ` Jon Smirl
                   ` (2 more replies)
  0 siblings, 3 replies; 111+ messages in thread
From: Dave Airlie @ 2004-09-04  0:12 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-kernel


Okay I've had some thoughts about the DRM interfaces and did some code
hacking (drmlib-0-0-1 branch on DRM CVS , very incomplete)

Below is my proposal for an interface that does introduce a major new
binary interface (the biggest issue with a straight core/personality split
for DRI developers, we have enough binary interfaces in our lives)...

Any comments are appreciated, the document is also available at:
http://dri.sourceforge.net/cgi-bin/moin.cgi/DRMRedesign

Dave.


This documents a proposed new design for the DRM internal kernel interfaces.

The current DRM suffers from a number of issues with multiple drivers in
the same kernel (the mess that is the drm_stub.h and parts of drm_drv.h)
along with the DRM() macros show this up. This design tries to address
this issue without introducing any major new binary interface.

I propose a 3 way code split-
	DRM core
	DRM library
	DRM driver

This is slightly along the lines of the fb where the core is fbmem + co,
the library is the cfb* object and the driver is the graphics chipset
specific.

What I would like to do for the DRM is not as extreme as the fb approach.
I propose the following type split:

	DRM core - just the stub registration procedure and handling any
shared resources like the device major number, and perhaps parts of sysfs
and class code. This interface gets set in stone as quickly as possible
and is as minimal as can be, (Jon Smirls dyn-minor patch will help a fair
bit also). All the core does is allow DRMs to register and de-register in
a nice easy fashion and not interfere with each other. This drmcore.o can
either be linked into the kernel (ala the fb core) or a module, but in
theory it should only really be shipped with the kernel - (for compat
reasons the DRM tree will ship it for older systems).

	DRM library - this contains all the non-card specific code, AGP
interface, buffers interface, memory allocation, context handling etc.
This is mostly stuff that is in templated header files now moved into C
files along the lines of what I've done in the drmlib-0-0-1-branch. This
file gets linked into each drm module, if you build two drivers into the
kernel it gets shared automatically as far as I can see, if you build as
modules they both end up with the code, for the DRM the single card is the
primary case so I don't mind losing some resources for having different
cards in a machine.

	DRM driver - the current driver files converted to the new
interfaces, I don't mind retaining some of the templating work, I like the
fact that we don't have 20 implementations of the drm probe or PCI tables
or anything like that, so I think some small uses of DRM() may still be
acceptable from a maintenance point of view.


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

end of thread, other threads:[~2004-09-08 11:04 UTC | newest]

Thread overview: 111+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-04  0:12 New proposed DRM interface design Dave Airlie
2004-09-04  0:44 ` Jon Smirl
2004-09-04  0:51   ` Dave Airlie
2004-09-04  1:20     ` Jon Smirl
2004-09-04  4:58       ` Dave Airlie
2004-09-04  9:29     ` Christoph Hellwig
2004-09-04  9:43       ` Dave Airlie
2004-09-04  9:47         ` Christoph Hellwig
2004-09-04  9:48         ` Arjan van de Ven
2004-09-04  9:50           ` Christoph Hellwig
2004-09-04  9:45       ` Keith Whitwell
2004-09-04  9:48         ` Christoph Hellwig
2004-09-04 10:23           ` Keith Whitwell
2004-09-04 10:25             ` Christoph Hellwig
2004-09-04 10:30               ` Keith Whitwell
2004-09-04 10:44                 ` Nick Piggin
2004-09-04 10:54                   ` Dave Airlie
2004-09-04 11:17                     ` Dave Jones
2004-09-04 12:58                     ` Sam Ravnborg
2004-09-04 21:06                     ` Lee Revell
2004-09-05 10:14                     ` Donnie Berkholz
2004-09-04 10:57                   ` Keith Whitwell
2004-09-04 11:03                 ` Christoph Hellwig
2004-09-04 11:12                   ` Dave Airlie
2004-09-04 11:13                     ` Christoph Hellwig
2004-09-04 11:24                       ` Dave Airlie
2004-09-04 11:26                         ` Christoph Hellwig
2004-09-04 21:34                           ` Lee Revell
2004-09-04 22:41                             ` viro
2004-09-04 23:33                               ` Lee Revell
2004-09-05  2:10                             ` Horst von Brand
2004-09-05  3:42                               ` Lee Revell
2004-09-04 11:42                     ` Dave Jones
2004-09-04 11:50                       ` Keith Whitwell
2004-09-04 21:35                       ` Lee Revell
2004-09-04 22:06                         ` Dave Airlie
2004-09-05 12:00                           ` Alan Cox
2004-09-04 11:18                   ` Keith Whitwell
2004-09-04 11:20                     ` Christoph Hellwig
2004-09-04 11:30                       ` Keith Whitwell
2004-09-04 11:33                         ` Christoph Hellwig
2004-09-04 11:44                           ` Keith Whitwell
2004-09-04 11:29                 ` Dave Jones
2004-09-04 11:41                   ` Keith Whitwell
2004-09-04 11:46                     ` Christoph Hellwig
2004-09-04 12:04                       ` Dave Airlie
2004-09-04 12:10                         ` Dave Jones
2004-09-04 12:35                           ` Keith Whitwell
2004-09-04 12:25                         ` Christoph Hellwig
2004-09-04 21:45                           ` Lee Revell
2004-09-04 16:39                         ` Alan Cox
2004-09-04 11:54                     ` Dave Jones
2004-09-04 12:08                       ` Keith Whitwell
2004-09-04 12:17                         ` Dave Airlie
2004-09-04 12:21                           ` Christoph Hellwig
2004-09-04 12:32                             ` Dave Airlie
2004-09-04 12:30                           ` Arjan van de Ven
2004-09-04 12:36                             ` Dave Airlie
2004-09-04 22:17                               ` Dave Airlie
2004-09-04 22:21                                 ` Christoph Hellwig
2004-09-04 23:08                                 ` Felix Kühling
2004-09-04 12:20                         ` Dave Jones
2004-09-04 13:52                           ` Keith Whitwell
2004-09-04 15:36                             ` Jon Smirl
2004-09-04 15:56                               ` Dieter Nützel
2004-09-04 17:43                               ` Keith Whitwell
2004-09-04 18:03                                 ` Jon Smirl
2004-09-05 12:07                                   ` Alan Cox
2004-09-05 15:05                                     ` Jon Smirl
2004-09-05 14:15                                       ` Alan Cox
2004-09-05 15:33                                         ` Jon Smirl
2004-09-05 14:44                                           ` Alan Cox
2004-09-05 14:58                                             ` Alan Cox
2004-09-05 16:05                                             ` Jon Smirl
2004-09-05 15:13                                               ` Alan Cox
2004-09-07  8:43                                               ` Helge Hafting
2004-09-07 14:04                                                 ` Jon Smirl
2004-09-08 11:09                                                   ` Helge Hafting
2004-09-06  6:06                                           ` Ryan Underwood
2004-09-05 15:31                                       ` Alan Cox
2004-09-05 17:27                                         ` Jesse Barnes
2004-09-05 21:12                                         ` Jon Smirl
2004-09-05 20:53                                           ` Alan Cox
2004-09-05 22:11                                             ` Jon Smirl
2004-09-05 22:59                                               ` Alan Cox
2004-09-06 20:58                                                 ` Hamie
2004-09-06 20:15                                                   ` Alan Cox
2004-09-06 21:38                                                     ` Hamie
2004-09-06 21:47                                                       ` Jon Smirl
2004-09-06 22:18                                                     ` Patrick McFarland
2004-09-07 19:21       ` Ian Romanick
2004-09-04  0:54 ` Alex Deucher
2004-09-04  0:59   ` Dave Airlie
2004-09-04  1:25     ` Jon Smirl
2004-09-04 19:03       ` Alex Deucher
2004-09-04  3:51     ` Jon Smirl
2004-09-04  4:52       ` Dave Airlie
2004-09-04  6:04         ` Jon Smirl
2004-09-04  7:36           ` Keith Whitwell
2004-09-04  7:53             ` Dave Airlie
2004-09-04  8:25               ` Keith Whitwell
2004-09-04  8:37                 ` Dave Airlie
2004-09-04  9:02                   ` Keith Whitwell
2004-09-04 16:01             ` Jon Smirl
2004-09-04 17:44               ` Keith Whitwell
2004-09-04  7:52           ` Dave Airlie
2004-09-04 15:46             ` Jon Smirl
     [not found]           ` <2191E8A1-FE89-11D8-BFDA-000A95F07A7A@fs.ei.tum.de>
2004-09-04 15:59             ` Jon Smirl
2004-09-04 21:35               ` Eric Anholt
2004-09-07 21:01               ` Ian Romanick
2004-09-04  9:27 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox