diff options
author | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2009-10-17 13:58:07 +0000 |
---|---|---|
committer | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2009-10-17 13:58:07 +0000 |
commit | 0834369c5d9f91dcdc5b4b97c9a68b3cd553e161 (patch) | |
tree | 69d76457a5e71de5a5e912746d55e3140859c341 /x11-base | |
parent | x11-base/nouveau-drm: new snapshot, switch to master branch, use external Mak... (diff) | |
download | sunrise-reviewed-0834369c5d9f91dcdc5b4b97c9a68b3cd553e161.tar.gz sunrise-reviewed-0834369c5d9f91dcdc5b4b97c9a68b3cd553e161.tar.bz2 sunrise-reviewed-0834369c5d9f91dcdc5b4b97c9a68b3cd553e161.zip |
x11-base/nouveau-drm: add Makefile, remove old patch
svn path=/sunrise/; revision=9384
Diffstat (limited to 'x11-base')
-rw-r--r-- | x11-base/nouveau-drm/ChangeLog | 5 | ||||
-rw-r--r-- | x11-base/nouveau-drm/Manifest | 4 | ||||
-rw-r--r-- | x11-base/nouveau-drm/files/drm-fix-building-with-2.6.30.patch | 65 | ||||
-rw-r--r-- | x11-base/nouveau-drm/files/nouveau-drm-20091016-Makefile | 102 |
4 files changed, 109 insertions, 67 deletions
diff --git a/x11-base/nouveau-drm/ChangeLog b/x11-base/nouveau-drm/ChangeLog index 7785117df..6578bbd79 100644 --- a/x11-base/nouveau-drm/ChangeLog +++ b/x11-base/nouveau-drm/ChangeLog @@ -3,6 +3,11 @@ # $Header: $ 17 Oct 2009; Chi-Thanh Christopher Nguyen (chithead) + <chithanh@cs.tu-berlin.de> -files/drm-fix-building-with-2.6.30.patch, + +files/nouveau-drm-20091016-Makefile: + add Makefile, remove old patch + + 17 Oct 2009; Chi-Thanh Christopher Nguyen (chithead) <chithanh@cs.tu-berlin.de> -nouveau-drm-20090908.ebuild, +nouveau-drm-20091016.ebuild: new snapshot, switch to master branch, use external Makefile diff --git a/x11-base/nouveau-drm/Manifest b/x11-base/nouveau-drm/Manifest index 394e6b527..063cb7b13 100644 --- a/x11-base/nouveau-drm/Manifest +++ b/x11-base/nouveau-drm/Manifest @@ -1,5 +1,5 @@ -AUX drm-fix-building-with-2.6.30.patch 1898 RMD160 a2854bf09c0d1dccea4bbda0ad72c3778f551e7c SHA1 e598be2ab1de1ed7dc127891186efa64fe0963a3 SHA256 7db3ff139a65cfaf79046d6314056dc69689b7194c57f54487e0597365f7d500 +AUX nouveau-drm-20091016-Makefile 2723 RMD160 468ff0dfb87ccef121e92380afb83041942719d6 SHA1 6fd23ee7d0bb40d70d6445959134919ac5d0dcba SHA256 eaab05b9e70c8557950a688027ba2708525bf97d01a9466c8da3778d8d07c2ef DIST nouveau-drm-20091016.tar.gz 1235123 RMD160 b3f404844a21054f1167363e5ed1c2d7ce1ee7d4 SHA1 a81ece07633b73b7e8e02d5ac54f90c1da0764ed SHA256 c489c5ba46301aa15ba1dac0c83bc5fad2ac8972e5bb5106a3c384ed8993e48b EBUILD nouveau-drm-20091016.ebuild 1021 RMD160 2cdac6412cea3ab56fdc13a42e836e49632b078c SHA1 7b85532131dc4cacdf0233a57f1e23794eb2a534 SHA256 5864268f1848c798154a86410ac518e30981ef128d7951751c009947b8cd2adc -MISC ChangeLog 2605 RMD160 371f261923f6e055ec4c9bf9292a21b2df0be400 SHA1 bcc5de6a272b5a1e5633bd5ef71c83671126ea9d SHA256 0ed7d641204d84b766fcb20742012b164e6bb8696b9147562711312a5db3437f +MISC ChangeLog 2806 RMD160 587e2c21e2e51737c170eec1e2a9a3bcb35fe0b1 SHA1 89e6bcc9e1da27d8ff251c84cf241f404c67fcfe SHA256 d2c3c6142927ca1bef21d9deb7895f25196dfa09823210274087ca7ccfc856f1 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 deleted file mode 100644 index 106fc2c12..000000000 --- a/x11-base/nouveau-drm/files/drm-fix-building-with-2.6.30.patch +++ /dev/null @@ -1,65 +0,0 @@ -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 diff --git a/x11-base/nouveau-drm/files/nouveau-drm-20091016-Makefile b/x11-base/nouveau-drm/files/nouveau-drm-20091016-Makefile new file mode 100644 index 000000000..123bc5339 --- /dev/null +++ b/x11-base/nouveau-drm/files/nouveau-drm-20091016-Makefile @@ -0,0 +1,102 @@ +# This Makefile is loosely based on the drm.git/linux-core/Makefile and +# the preliminary work by Christopher James Halse Rogers. +# Edited by Pekka Paalanen <pq@iki.fi> + +# By default, the build is done against the running linux kernel source. +# To build against a different kernel source tree, set LINUXDIR: +# +# make LINUXDIR=/path/to/kernel/source + +# By default, it is assumed the Nouveau kernel tree is found in $PWD/../. +# To use a different path to the Nouveau kernel tree, set NOUVEAUROOTDIR: +# +# make NOUVEAUROOTDIR=/path/to/nouveau/linux-2.6 + + +ifndef LINUXDIR +RUNNING_REL := $(shell uname -r) + +LINUXDIR := $(shell if [ -e /lib/modules/$(RUNNING_REL)/source ]; then \ + echo /lib/modules/$(RUNNING_REL)/source; \ + else echo /lib/modules/$(RUNNING_REL)/build; fi) +endif + +NOUVEAUGITREMOTE ?= origin +NOUVEAUROOTDIR ?= $(CURDIR)/.. +override NOUVEAUROOTDIR := $(abspath $(NOUVEAUROOTDIR)) + +TESTFILE := include/drm/nouveau_drm.h +ifeq ($(wildcard $(NOUVEAUROOTDIR)/$(TESTFILE)),) +$(error $(NOUVEAUROOTDIR) does not look like the right kernel tree, \ + please set NOUVEAUROOTDIR) +endif + +GIT_REVISION := $(shell GIT_DIR=$(NOUVEAUROOTDIR)/.git \ + git describe --always --abbrev=17 2> /dev/null) + +DRMINC := -I$(NOUVEAUROOTDIR)/include/drm +DRMDIR := $(NOUVEAUROOTDIR)/drivers/gpu/drm +DRMCFG := \ + CONFIG_DRM=m \ + CONFIG_DRM_KMS_HELPER=m \ + CONFIG_DRM_TTM=m \ + CONFIG_DRM_NOUVEAU=m \ + CONFIG_DRM_NOUVEAU_KMS=n \ + CONFIG_DRM_NOUVEAU_BACKLIGHT=y \ + CONFIG_DRM_NOUVEAU_DEBUG=y \ + CONFIG_DRM_I2C_CH7006=m \ + CONFIG_DRM_TDFX=n \ + CONFIG_DRM_R128=n \ + CONFIG_DRM_RADEON=n \ + CONFIG_DRM_MGA=n \ + CONFIG_DRM_I810=n \ + CONFIG_DRM_I830=n \ + CONFIG_DRM_I915=n \ + CONFIG_DRM_SIS=n \ + CONFIG_DRM_SAVAGE=n \ + CONFIG_DRM_VIA=n + +EXTRA_CFLAGS := +MYEXTRA_CFLAGS := +MYEXTRA_CFLAGS += -DCONFIG_DRM_NOUVEAU_BACKLIGHT +MYEXTRA_CFLAGS += -DCONFIG_DRM_NOUVEAU_DEBUG + +ifneq ($(GIT_REVISION),) +MYEXTRA_CFLAGS += '-DGIT_REVISION=\"$(GIT_REVISION)\"' +endif + +MYPARMS := -C $(LINUXDIR) KCPPFLAGS="$(DRMINC)" SUBDIRS="$(DRMDIR)" $(DRMCFG) + +MYEXTRA_CFLAGS += $(EXTRA_CFLAGS) +ifneq ($(MYEXTRA_CFLAGS),) +MYPARMS += EXTRA_CFLAGS="$(MYEXTRA_CFLAGS)" +endif + +.PHONY: all modules install clean archive FORCE + +all: modules +FORCE: + +modules: + $(MAKE) $(MYPARMS) modules + +install: + $(MAKE) $(MYPARMS) modules_install + +clean: + $(MAKE) $(MYPARMS) clean + +archive: newttm-devel-compat.tar.gz newttm-devel.tar.gz master.tar.gz + +newttm-devel-compat.tar.gz: EXTRAS=nouveau README-nouveau + +%.tar: FORCE + GIT_DIR=$(NOUVEAUROOTDIR)/.git \ + git archive --format=tar --prefix=$*/ $(NOUVEAUGITREMOTE)/$* \ + drivers/gpu/drm include/drm $(EXTRAS) > $@ + +%.tar.gz: %.tar + gzip -9 -c $< > $@ + +# The commit id of the archive can be read with +# $ zcat foo.tar.gz | git get-tar-commit-id |