All of lore.kernel.org
 help / color / mirror / Atom feed
* in-kernel DRM tree move around....
@ 2008-05-29  0:46 Dave Airlie
  2008-05-29  4:23 ` Sam Ravnborg
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Dave Airlie @ 2008-05-29  0:46 UTC (permalink / raw)
  To: kernel list, dri-devel

Hi,

So I've been growing more annoyed with the current layout of the drm
tree in the kernel,

a) it lives under char.
b) everything in one directory.
c) header files in one directory.
d) no header files exposed to userspace.

http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=commitdiff;h=7df9a948d0f849466e3de259cccb49bc54cbad68

is a proposal to create drivers/gpu/drm, (I may move AGP in there as
well later). It also creates per-driver subdirs.

This to me solves the a-d problems.

There is also an out-of-tree kernel drm which I'll probably give some
more thought later.

Dave.

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

* Re: in-kernel DRM tree move around....
  2008-05-29  0:46 in-kernel DRM tree move around Dave Airlie
@ 2008-05-29  4:23 ` Sam Ravnborg
  2008-05-29  5:23   ` Dave Airlie
  2008-05-29  8:20   ` Jan Engelhardt
  2008-05-29  9:05 ` Alexander van Heukelum
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 12+ messages in thread
From: Sam Ravnborg @ 2008-05-29  4:23 UTC (permalink / raw)
  To: Dave Airlie; +Cc: kernel list, dri-devel

On Thu, May 29, 2008 at 10:46:22AM +1000, Dave Airlie wrote:
> Hi,
> 
> So I've been growing more annoyed with the current layout of the drm
> tree in the kernel,
> 
> a) it lives under char.
> b) everything in one directory.
> c) header files in one directory.
> d) no header files exposed to userspace.
> 
> http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=commitdiff;h=7df9a948d0f849466e3de259cccb49bc54cbad68
> 
> is a proposal to create drivers/gpu/drm, (I may move AGP in there as
> well later). It also creates per-driver subdirs.

Like it.
> 
> This to me solves the a-d problems.
> 
> There is also an out-of-tree kernel drm which I'll probably give some
> more thought later.

Makefie bits:
5 EXTRA_CFLAGS = -Iinclude/drm
Use ccflags-y :=  -Iinclude/drm
I assume this is a temporary workaround and you plan to fix
up all includes to use "#include <drm/fo.h>"

6 drm-objs    :=  drm_auth.o drm_bufs.o drm_context.o drm_dma.o drm_drawable.o \
7                 drm_drv.o drm_fops.o drm_ioctl.o drm_irq.o \
8                 drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \
9                 drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \
10                 drm_sysfs.o drm_hashtab.o drm_sman.o drm_mm.o

Use drm-y := ....

11
12 ifeq ($(CONFIG_COMPAT),y)
13 drm-objs    += drm_ioc32.o
14 endif
So you can do:
drm-$(CONFIG_COMPAT) += drm_ioc32.o

Take the above as general input for all your Makefiles.


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

* Re: in-kernel DRM tree move around....
  2008-05-29  4:23 ` Sam Ravnborg
@ 2008-05-29  5:23   ` Dave Airlie
  2008-05-29  7:33     ` Sam Ravnborg
  2008-05-29  8:20   ` Jan Engelhardt
  1 sibling, 1 reply; 12+ messages in thread
From: Dave Airlie @ 2008-05-29  5:23 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: kernel list, dri-devel

On Thu, May 29, 2008 at 2:23 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
> On Thu, May 29, 2008 at 10:46:22AM +1000, Dave Airlie wrote:
>> Hi,
>>
>> So I've been growing more annoyed with the current layout of the drm
>> tree in the kernel,
>>
>> a) it lives under char.
>> b) everything in one directory.
>> c) header files in one directory.
>> d) no header files exposed to userspace.
>>
>> http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=commitdiff;h=7df9a948d0f849466e3de259cccb49bc54cbad68
>>
>> is a proposal to create drivers/gpu/drm, (I may move AGP in there as
>> well later). It also creates per-driver subdirs.
>
> Like it.
>>
>> This to me solves the a-d problems.
>>
>> There is also an out-of-tree kernel drm which I'll probably give some
>> more thought later.
>
> Makefie bits:
> 5 EXTRA_CFLAGS = -Iinclude/drm
> Use ccflags-y :=  -Iinclude/drm
> I assume this is a temporary workaround and you plan to fix
> up all includes to use "#include <drm/fo.h>"

I'd rather not do that due the fact that a lot of these files are
shared with other OSes upstream and I'd rather not diverge too far but
maybe later.

>
> 6 drm-objs    :=  drm_auth.o drm_bufs.o drm_context.o drm_dma.o drm_drawable.o \
> 7                 drm_drv.o drm_fops.o drm_ioctl.o drm_irq.o \
> 8                 drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \
> 9                 drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \
> 10                 drm_sysfs.o drm_hashtab.o drm_sman.o drm_mm.o
>
> Use drm-y := ....

cool.. I just re-used the old Makefiles so I'll fix that up in the new ones.

>
> 11
> 12 ifeq ($(CONFIG_COMPAT),y)
> 13 drm-objs    += drm_ioc32.o
> 14 endif
> So you can do:
> drm-$(CONFIG_COMPAT) += drm_ioc32.o
>
> Take the above as general input for all your Makefiles.

Also came from just reusing the old ones, will fix that bit up.

Dave.

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

* Re: in-kernel DRM tree move around....
  2008-05-29  5:23   ` Dave Airlie
@ 2008-05-29  7:33     ` Sam Ravnborg
  0 siblings, 0 replies; 12+ messages in thread
From: Sam Ravnborg @ 2008-05-29  7:33 UTC (permalink / raw)
  To: Dave Airlie; +Cc: kernel list, dri-devel

> >
> > Makefie bits:
> > 5 EXTRA_CFLAGS = -Iinclude/drm
> > Use ccflags-y :=  -Iinclude/drm
> > I assume this is a temporary workaround and you plan to fix
> > up all includes to use "#include <drm/fo.h>"
> 
> I'd rather not do that due the fact that a lot of these files are
> shared with other OSes upstream and I'd rather not diverge too far but
> maybe later.
Understood.

To be sure you did not miss it...
At least change EXTRA_CFLAGS to ccflags-y.

	Sam

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

* Re: in-kernel DRM tree move around....
  2008-05-29  4:23 ` Sam Ravnborg
  2008-05-29  5:23   ` Dave Airlie
@ 2008-05-29  8:20   ` Jan Engelhardt
  1 sibling, 0 replies; 12+ messages in thread
From: Jan Engelhardt @ 2008-05-29  8:20 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Dave Airlie, kernel list, dri-devel

On Thursday 2008-05-29 06:23, Sam Ravnborg wrote:
>On Thu, May 29, 2008 at 10:46:22AM +1000, Dave Airlie wrote:
>> Hi,
>> 
>> So I've been growing more annoyed with the current layout of the drm
>> tree in the kernel,
>> 
>> a) it lives under char.
>> b) everything in one directory.
>> c) header files in one directory.
>> d) no header files exposed to userspace.
>> 
>> http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=commitdiff;h=7df9a948d0f849466e3de259cccb49bc54cbad68
>> 
>> is a proposal to create drivers/gpu/drm, (I may move AGP in there as
>> well later). It also creates per-driver subdirs.
>
>Like it.

You have Makefile content in a file called "Kconfig":


diff --git a/drivers/char/drm/Kconfig b/drivers/gpu/drm/Kconfig
similarity index 100%
rename from drivers/char/drm/Kconfig
drivers/gpu/drm/Kconfig
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
new file mode 100644 (file)
index
0000000000000000000000000000000000000000..3f50d8fb25b915d66aef74b175e49fbb1964d6b1
--- a/drivers/char/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -0,0 +1,27 @@
+#
+# Makefile for the drm device driver.  This driver provides support for the
+# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
+
+EXTRA_CFLAGS = -Iinclude/drm
+drm-objs    := drm_auth.o drm_bufs.o drm_context.o drm_dma.o drm_drawable.o \
+               drm_drv.o drm_fops.o drm_ioctl.o drm_irq.o \
+               drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \
+               drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \
+               drm_sysfs.o drm_hashtab.o drm_sman.o drm_mm.o
+
+ifeq ($(CONFIG_COMPAT),y)
+drm-objs    += drm_ioc32.o
+endif
+
+obj-$(CONFIG_DRM)      += drm.o
+obj-$(CONFIG_DRM_TDFX) += tdfx/
+obj-$(CONFIG_DRM_R128) += r128/
+obj-$(CONFIG_DRM_RADEON)+= radeon/
+obj-$(CONFIG_DRM_MGA)  += mga/
+obj-$(CONFIG_DRM_I810) += i810/
+obj-$(CONFIG_DRM_I830) += i830/
+obj-$(CONFIG_DRM_I915)  += i915/
+obj-$(CONFIG_DRM_SIS)   += sis/
+obj-$(CONFIG_DRM_SAVAGE)+= savage/
+obj-$(CONFIG_DRM_VIA)  +=via/
+

In fact, since this happened for lots of files, I pulled the repo
with git, and like I suspected, it seems to be a gitweb issue.

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

* Re: in-kernel DRM tree move around....
  2008-05-29  0:46 in-kernel DRM tree move around Dave Airlie
  2008-05-29  4:23 ` Sam Ravnborg
@ 2008-05-29  9:05 ` Alexander van Heukelum
  2008-05-29 10:34   ` Alan Cox
  2008-05-29 11:02 ` David Woodhouse
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Alexander van Heukelum @ 2008-05-29  9:05 UTC (permalink / raw)
  To: Dave Airlie, kernel list, dri-devel

On Thu, 29 May 2008 10:46:22 +1000, "Dave Airlie" <airlied@gmail.com>
said:
> Hi,
> 
> So I've been growing more annoyed with the current layout of the drm
> tree in the kernel,
> 
> a) it lives under char.
> b) everything in one directory.
> c) header files in one directory.
> d) no header files exposed to userspace.
> 
> http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=commitdiff;h=7df9a948d0f849466e3de259cccb49bc54cbad68
> 
> is a proposal to create drivers/gpu/drm, (I may move AGP in there as
> well later). It also creates per-driver subdirs.

Looks like a lot more suitable place! I just wonder if drivers/video/drm
would be even more logical?

Greetings,
    Alexander

> This to me solves the a-d problems.
> 
> There is also an out-of-tree kernel drm which I'll probably give some
> more thought later.
> 
> Dave.
-- 
  Alexander van Heukelum
  heukelum@fastmail.fm

-- 
http://www.fastmail.fm - Does exactly what it says on the tin


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

* Re: in-kernel DRM tree move around....
  2008-05-29  9:05 ` Alexander van Heukelum
@ 2008-05-29 10:34   ` Alan Cox
  0 siblings, 0 replies; 12+ messages in thread
From: Alan Cox @ 2008-05-29 10:34 UTC (permalink / raw)
  To: Alexander van Heukelum; +Cc: Dave Airlie, kernel list, dri-devel

On Thu, 29 May 2008 11:05:08 +0200
"Alexander van Heukelum" <heukelum@fastmail.fm> wrote:

> On Thu, 29 May 2008 10:46:22 +1000, "Dave Airlie" <airlied@gmail.com>
> said:
> > Hi,
> > 
> > So I've been growing more annoyed with the current layout of the drm
> > tree in the kernel,
> > 
> > a) it lives under char.
> > b) everything in one directory.
> > c) header files in one directory.
> > d) no header files exposed to userspace.
> > 
> > http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=commitdiff;h=7df9a948d0f849466e3de259cccb49bc54cbad68
> > 
> > is a proposal to create drivers/gpu/drm, (I may move AGP in there as
> > well later). It also creates per-driver subdirs.
> 
> Looks like a lot more suitable place! I just wonder if drivers/video/drm
> would be even more logical?

I think gpu is better - we are seeing various GPU as CPU accelerator
toolkits appearing and assuming the AMD one ends up open source we will
end up with gpu/something that isn't video.

Remember GPU = Grahi^WGeneric Processing Unit ;)

Alan

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

* Re: in-kernel DRM tree move around....
  2008-05-29  0:46 in-kernel DRM tree move around Dave Airlie
  2008-05-29  4:23 ` Sam Ravnborg
  2008-05-29  9:05 ` Alexander van Heukelum
@ 2008-05-29 11:02 ` David Woodhouse
  2008-05-30  6:26   ` Dave Airlie
  2008-05-29 19:41 ` Eric Anholt
  2008-06-01 14:57 ` Pavel Machek
  4 siblings, 1 reply; 12+ messages in thread
From: David Woodhouse @ 2008-05-29 11:02 UTC (permalink / raw)
  To: Dave Airlie; +Cc: kernel list, dri-devel

On Thu, 2008-05-29 at 10:46 +1000, Dave Airlie wrote:
> Hi,
> 
> So I've been growing more annoyed with the current layout of the drm
> tree in the kernel,
> 
> a) it lives under char.
> b) everything in one directory.
> c) header files in one directory.
> d) no header files exposed to userspace.
> 
> http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=commitdiff;h=7df9a948d0f849466e3de259cccb49bc54cbad68
> 
> is a proposal to create drivers/gpu/drm, (I may move AGP in there as
> well later). It also creates per-driver subdirs.

Looks sane from the header export POV. Passes headers_check and doesn't
add any more instances of CONFIG_xxx visible to userspace (I'm coming
after those, soon).

-- 
dwmw2


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

* Re: in-kernel DRM tree move around....
  2008-05-29  0:46 in-kernel DRM tree move around Dave Airlie
                   ` (2 preceding siblings ...)
  2008-05-29 11:02 ` David Woodhouse
@ 2008-05-29 19:41 ` Eric Anholt
  2008-06-01 14:57 ` Pavel Machek
  4 siblings, 0 replies; 12+ messages in thread
From: Eric Anholt @ 2008-05-29 19:41 UTC (permalink / raw)
  To: Dave Airlie; +Cc: kernel list, dri-devel

[-- Attachment #1: Type: text/plain, Size: 1787 bytes --]

On Thu, 2008-05-29 at 10:46 +1000, Dave Airlie wrote:
> Hi,
> 
> So I've been growing more annoyed with the current layout of the drm
> tree in the kernel,
> 
> a) it lives under char.
> b) everything in one directory.
> c) header files in one directory.
> d) no header files exposed to userspace.
> 
> http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=commitdiff;h=7df9a948d0f849466e3de259cccb49bc54cbad68
> 
> is a proposal to create drivers/gpu/drm, (I may move AGP in there as
> well later). It also creates per-driver subdirs.
> 
> This to me solves the a-d problems.
> 
> There is also an out-of-tree kernel drm which I'll probably give some
> more thought later.

I like it.

For upstream DRM, my first thought was something like:

drm/src/i915/i915_*.[ch]
drm/src/r128/r128_*.[ch]
drm/src/drm.h
drm/src/bsd/drm_*.[ch]
drm/src/bsd/Makefile
drm/src/bsd/i915/Makefile
drm/src/bsd/r128/Makefile
drm/src/linux/drm_*.[ch]
drm/src/linux/Makefile

Get rid of the -core absurdity, and move the shared code to top-level of
the kernel instead of alongside other kernel code.

But maybe nicer for merging on both of our parts would be:

drm/linux/Makefile
drm/linux/drm*.[ch]
drm/linux/i915/Makefile
drm/linux/i915/i915_*.[ch]
drm/linux/i915/Makefile
drm/linux/r128/r128_*.[ch]
drm/bsd/drm.h -> ../linux/drm.h
drm/bsd/drm*.[ch]
drm/bsd/Makefile
drm/bsd/i915/Makefile
drm/bsd/i915/i915_drv.c
drm/bsd/i915/i915_*.[ch] -> ../../linux/i915/i915_*.[ch]
drm/bsd/r128/Makefile
drm/bsd/r128/r128_drv.c
drm/bsd/r128/r128_*.[ch] -> ../../linux/r128/r128_*.[ch]

-- 
Eric Anholt                             anholt@FreeBSD.org
eric@anholt.net                         eric.anholt@intel.com


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: in-kernel DRM tree move around....
  2008-05-29 11:02 ` David Woodhouse
@ 2008-05-30  6:26   ` Dave Airlie
  2008-05-30 16:58     ` Jesse Barnes
  0 siblings, 1 reply; 12+ messages in thread
From: Dave Airlie @ 2008-05-30  6:26 UTC (permalink / raw)
  To: kernel list; +Cc: Linus Torvalds, dri-devel, Andrew Morton

On Thu, May 29, 2008 at 9:02 PM, David Woodhouse <dwmw2@infradead.org> wrote:
> On Thu, 2008-05-29 at 10:46 +1000, Dave Airlie wrote:
>> Hi,
>>
>> So I've been growing more annoyed with the current layout of the drm
>> tree in the kernel,
>>
>> a) it lives under char.
>> b) everything in one directory.
>> c) header files in one directory.
>> d) no header files exposed to userspace.
>>
>> http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=commitdiff;h=7df9a948d0f849466e3de259cccb49bc54cbad68
>>
>> is a proposal to create drivers/gpu/drm, (I may move AGP in there as
>> well later). It also creates per-driver subdirs.
>
> Looks sane from the header export POV. Passes headers_check and doesn't
> add any more instances of CONFIG_xxx visible to userspace (I'm coming
> after those, soon).
>

So assuming I fixed up the kbuild issues, any ideas on when it would
be a good plan to upstream this sorta major movement.

Not many DRM patches don't come via me, and I can fix up the ones that
do before I merge them.

Linus? any ideas on when you would prefer to take a tree like this?
start of rc1?

Dave.

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

* Re: in-kernel DRM tree move around....
  2008-05-30  6:26   ` Dave Airlie
@ 2008-05-30 16:58     ` Jesse Barnes
  0 siblings, 0 replies; 12+ messages in thread
From: Jesse Barnes @ 2008-05-30 16:58 UTC (permalink / raw)
  To: dri-devel; +Cc: Dave Airlie, kernel list, Andrew Morton, Linus Torvalds

On Thursday, May 29, 2008 11:26 pm Dave Airlie wrote:
> On Thu, May 29, 2008 at 9:02 PM, David Woodhouse <dwmw2@infradead.org> 
wrote:
> > On Thu, 2008-05-29 at 10:46 +1000, Dave Airlie wrote:
> >> Hi,
> >>
> >> So I've been growing more annoyed with the current layout of the drm
> >> tree in the kernel,
> >>
> >> a) it lives under char.
> >> b) everything in one directory.
> >> c) header files in one directory.
> >> d) no header files exposed to userspace.
> >>
> >> http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=commitdi
> >>ff;h=7df9a948d0f849466e3de259cccb49bc54cbad68
> >>
> >> is a proposal to create drivers/gpu/drm, (I may move AGP in there as
> >> well later). It also creates per-driver subdirs.
> >
> > Looks sane from the header export POV. Passes headers_check and doesn't
> > add any more instances of CONFIG_xxx visible to userspace (I'm coming
> > after those, soon).
>
> So assuming I fixed up the kbuild issues, any ideas on when it would
> be a good plan to upstream this sorta major movement.
>
> Not many DRM patches don't come via me, and I can fix up the ones that
> do before I merge them.
>
> Linus? any ideas on when you would prefer to take a tree like this?
> start of rc1?

Yes please, as soon as the merge window opens.  Now if we could just convince 
you to host a full kernel tree for DRM development, with a separate, 
symlinked BSD dir at the top level, we'd be all set. :)

Jesse

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

* Re: in-kernel DRM tree move around....
  2008-05-29  0:46 in-kernel DRM tree move around Dave Airlie
                   ` (3 preceding siblings ...)
  2008-05-29 19:41 ` Eric Anholt
@ 2008-06-01 14:57 ` Pavel Machek
  4 siblings, 0 replies; 12+ messages in thread
From: Pavel Machek @ 2008-06-01 14:57 UTC (permalink / raw)
  To: Dave Airlie; +Cc: kernel list, dri-devel

On Thu 2008-05-29 10:46:22, Dave Airlie wrote:
> Hi,
> 
> So I've been growing more annoyed with the current layout of the drm
> tree in the kernel,
> 
> a) it lives under char.
> b) everything in one directory.
> c) header files in one directory.
> d) no header files exposed to userspace.
> 
> http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=commitdiff;h=7df9a948d0f849466e3de259cccb49bc54cbad68
> 
> is a proposal to create drivers/gpu/drm, (I may move AGP in there as
> well later). It also creates per-driver subdirs.

I'm unsure about agp... drivers/char/agp/*amd64* seems to contain gart/iommu
stuff that is shared by whole kernel...

							Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

end of thread, other threads:[~2008-06-03  0:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-29  0:46 in-kernel DRM tree move around Dave Airlie
2008-05-29  4:23 ` Sam Ravnborg
2008-05-29  5:23   ` Dave Airlie
2008-05-29  7:33     ` Sam Ravnborg
2008-05-29  8:20   ` Jan Engelhardt
2008-05-29  9:05 ` Alexander van Heukelum
2008-05-29 10:34   ` Alan Cox
2008-05-29 11:02 ` David Woodhouse
2008-05-30  6:26   ` Dave Airlie
2008-05-30 16:58     ` Jesse Barnes
2008-05-29 19:41 ` Eric Anholt
2008-06-01 14:57 ` Pavel Machek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.