]> Pileus Git - ~andy/sunrise/commitdiff
x11-base/nouveau-drm: fix building against kernel 2.6.30
authorChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
Thu, 11 Jun 2009 00:18:46 +0000 (00:18 +0000)
committerChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
Thu, 11 Jun 2009 00:18:46 +0000 (00:18 +0000)
svn path=/sunrise/; revision=8641

x11-base/nouveau-drm/ChangeLog
x11-base/nouveau-drm/Manifest
x11-base/nouveau-drm/files/drm-fix-building-with-2.6.30.patch [new file with mode: 0644]
x11-base/nouveau-drm/nouveau-drm-20090514.ebuild

index 42de7402196c9f5f2f3175e12a0f9731e32b0d53..bc2bc2e367a119b5e8a68c512a17c31cb7ff9fb2 100644 (file)
@@ -2,6 +2,11 @@
 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  11 Jun 2009; Chi-Thanh Christopher Nguyen (chithead)
+  <chithanh@cs.tu-berlin.de> +files/drm-fix-building-with-2.6.30.patch,
+  nouveau-drm-20090514.ebuild:
+  fix building against kernel 2.6.30
+
   15 May 2009; Chi-Thanh Christopher Nguyen (chithead)
   <chithanh@cs.tu-berlin.de> -nouveau-drm-20090510.ebuild,
   +nouveau-drm-20090514.ebuild:
index 39b3cc75d8563dd2d88452a65990288e2a474559..aaecddff05a355f6271e3c358c751c9f9dfd254b 100644 (file)
@@ -1,3 +1,4 @@
-EBUILD nouveau-drm-20090514.ebuild 6335 RMD160 b804c58ab4a70a2a36e79fa1186d89b749210484 SHA1 437a9b0c1c30da5ddd4c9644c484bbe5fb9d2bee SHA256 bf79ad5e67dda767b04a0daa43c51345385a82460ae3e82ad055211b654a144a
-MISC ChangeLog 1441 RMD160 8bd6e5fb160678295b9b60c3cf1899af173ed6e8 SHA1 f577450fd3fc60cf493f95e813c6968ccec4803e SHA256 3861429479633b83676e84f5f79f226897ea70447bf9102d590a92f27317ac5d
+AUX drm-fix-building-with-2.6.30.patch 1898 RMD160 a2854bf09c0d1dccea4bbda0ad72c3778f551e7c SHA1 e598be2ab1de1ed7dc127891186efa64fe0963a3 SHA256 7db3ff139a65cfaf79046d6314056dc69689b7194c57f54487e0597365f7d500
+EBUILD nouveau-drm-20090514.ebuild 6401 RMD160 3649a887de7c8895114b29ef54455f2935a4ac1b SHA1 32cfe270790e07ad2325692b0a73241af1590405 SHA256 0d4b2f7ec346b5f58206ccf6968644a604031178e210d76213c384222386ff42
+MISC ChangeLog 1637 RMD160 be5ddc50fce954c92d79415a4baed1649ef4964d SHA1 bcdecef682390750d821f197dec08dd73f600fcc SHA256 0235136804ff5f343e2f00f2cf9708810dd03bba5cd89e6028f5972c01e5d852
 MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42
diff --git a/x11-base/nouveau-drm/files/drm-fix-building-with-2.6.30.patch b/x11-base/nouveau-drm/files/drm-fix-building-with-2.6.30.patch
new file mode 100644 (file)
index 0000000..106fc2c
--- /dev/null
@@ -0,0 +1,65 @@
+From 651e3dc6dd58a79c90db7513ee2fb28360a4560d Mon Sep 17 00:00:00 2001
+From: Michael Buesch <mb@bu3sch.de>
+Date: Sun, 10 May 2009 22:21:14 +0000
+Subject: drm: Fix compilation on 2.6.30
+
+This fixes DRM compilation of nouveau.ko on kernel 2.6.30.
+
+Signed-off-by: Michael Buesch <mb@bu3sch.de>
+---
+diff --git a/linux-core/drm_os_linux.h b/linux-core/drm_os_linux.h
+index f58296b..be5e099 100644
+--- a/linux-core/drm_os_linux.h
++++ b/linux-core/drm_os_linux.h
+@@ -32,12 +32,29 @@
+ /** IRQ handler arguments and return type and values */
+ #define DRM_IRQ_ARGS          int irq, void *arg
+ /** backwards compatibility with old irq return values */
+-#ifndef IRQ_HANDLED
++#if !defined(IRQ_HANDLED) && LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,29)
+ typedef void irqreturn_t;
+ #define IRQ_HANDLED           /* nothing */
+ #define IRQ_NONE              /* nothing */
+ #endif
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,25)
++static inline const char *dev_name(const struct device *dev)
++{
++      return dev->bus_id;
++}
++static inline int dev_set_name(struct device *dev, const char *name, ...)
++{
++      va_list vargs;
++
++      va_start(vargs, name);
++      vsnprintf(dev->bus_id, sizeof(dev->bus_id), name, vargs);
++      va_end(vargs);
++
++      return 0;
++}
++#endif
++
+ /** AGP types */
+ #if __OS_HAS_AGP
+ #define DRM_AGP_MEM           struct agp_memory
+diff --git a/linux-core/drm_sysfs.c b/linux-core/drm_sysfs.c
+index 6de9367..e9e7a31 100644
+--- a/linux-core/drm_sysfs.c
++++ b/linux-core/drm_sysfs.c
+@@ -168,8 +168,12 @@ int drm_sysfs_device_add(struct drm_minor *minor)
+       minor->kdev.release = drm_sysfs_device_release;
+       minor->kdev.devt = minor->device;
+       minor_str = "card%d";
+-      
+-      snprintf(minor->kdev.bus_id, BUS_ID_SIZE, minor_str, minor->index);
++
++      err = dev_set_name(&minor->kdev, minor_str, minor->index);
++      if (err) {
++              DRM_ERROR("device set name failed: %d\n", err);
++              goto err_out;
++      }
+       err = device_register(&minor->kdev);
+       if (err) {
+--
+cgit v0.8.2
index 26df463ced3e6e4d0a67be569ef990cbde4ca0a6..ac158596b56d63f9001f64dc5dd9bf765cb60cb5 100644 (file)
@@ -7,6 +7,7 @@ WANT_AUTOMAKE="1.7"
 #EGIT_BRANCH="vblank-rework"
 EGIT_TREE="f57d7f4b0b14972f92a83f155ae8033478aa7729"
 EGIT_REPO_URI="git://anongit.freedesktop.org/git/mesa/drm"
+EGIT_PATCHES=( "${FILESDIR}/drm-fix-building-with-2.6.30.patch" )
 
 inherit eutils x11 linux-mod autotools git