libdrm: Changes to 'debian-unstable'
0 files changed
New commits:
commit e3013e8b96ee530475fb0df3e0e92684f405873f
Author: Julien Cristau <jcristau@debian.org>
Date: Sun Jan 6 12:47:04 2013 +0100
Upload to unstable
diff --git a/debian/changelog b/debian/changelog
index 6b967e1..ce42af2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,10 @@
-libdrm (2.4.40-1~deb7u2) UNRELEASED; urgency=low
+libdrm (2.4.40-1~deb7u2) sid; urgency=low
* Fix FTBFS on kfreebsd:
- fix missing ETIME (cherry-picked from upstream)
- work around missing O_CLOEXEC
- -- Julien Cristau <jcristau@debian.org> Sun, 06 Jan 2013 12:44:49 +0100
+ -- Julien Cristau <jcristau@debian.org> Sun, 06 Jan 2013 12:46:52 +0100
libdrm (2.4.40-1~deb7u1) sid; urgency=low
commit 112d146e15c65aa5df60df9e618af155d97b6621
Author: Julien Cristau <jcristau@debian.org>
Date: Sun Jan 6 12:45:36 2013 +0100
Fix FTBFS on kfreebsd
diff --git a/debian/changelog b/debian/changelog
index 653e7e9..6b967e1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+libdrm (2.4.40-1~deb7u2) UNRELEASED; urgency=low
+
+ * Fix FTBFS on kfreebsd:
+ - fix missing ETIME (cherry-picked from upstream)
+ - work around missing O_CLOEXEC
+
+ -- Julien Cristau <jcristau@debian.org> Sun, 06 Jan 2013 12:44:49 +0100
+
libdrm (2.4.40-1~deb7u1) sid; urgency=low
* Revert nouveau to the 2.4.33 state (ie before the rewrite).
diff --git a/debian/patches/intel-cloexec-kbsd.diff b/debian/patches/intel-cloexec-kbsd.diff
new file mode 100644
index 0000000..6772721
--- /dev/null
+++ b/debian/patches/intel-cloexec-kbsd.diff
@@ -0,0 +1,30 @@
+From 5488edc26442124dc8e8498336982e34a2ddb3e7 Mon Sep 17 00:00:00 2001
+From: Julien Cristau <jcristau@debian.org>
+Date: Sun, 6 Jan 2013 12:42:18 +0100
+Subject: [PATCH] intel: work around the lack of O_CLOEXEC definition on
+ kfreebsd
+
+Provide our own instead, per
+http://svnweb.freebsd.org/base/head/sys/sys/fcntl.h?r1=219999&r2=219998&pathrev=219999
+---
+ intel/intel_bufmgr_gem.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
+index 512bc6f..bc035af 100644
+--- a/intel/intel_bufmgr_gem.c
++++ b/intel/intel_bufmgr_gem.c
+@@ -2470,6 +2470,10 @@ drm_intel_bo_gem_create_from_prime(drm_intel_bufmgr *bufmgr, int prime_fd, int s
+ return &bo_gem->bo;
+ }
+
++/* XXX hack for kfreebsd */
++#if !defined(O_CLOEXEC) && defined(__FreeBSD_kernel__)
++#define O_CLOEXEC 0x00100000
++#endif
+ int
+ drm_intel_bo_gem_export_to_prime(drm_intel_bo *bo, int *prime_fd)
+ {
+--
+1.7.10.4
+
diff --git a/debian/patches/series b/debian/patches/series
index c20e4b9..a21307d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
01_default_perms.diff
03_build_against_librt.diff
revert-nouveau-rewrite.diff
+intel-cloexec-kbsd.diff
commit 26dca5adf4f9e7bc333db348cd173c57771f76f8
Author: David Shao <davshao@gmail.com>
Date: Sat Nov 10 00:24:56 2012 -0500
intel: Fix missing ETIME on BSD operating systems
Originally posted to Free Desktop bug #52549 by David Shao.
Resolves Gentoo Bug #433403.
Commit message by Richard Yao.
Reviewed-by: Richard Yao <ryao@gentoo.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
References: https://bugs.freedesktop.org/show_bug.cgi?id=52549
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
(cherry picked from commit 7d42b49c0cf19dbb4531cd84efae51f95db2eea1)
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 8d45839..512bc6f 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -54,6 +54,9 @@
#include <stdbool.h>
#include "errno.h"
+#ifndef ETIME
+#define ETIME ETIMEDOUT
+#endif
#include "libdrm_lists.h"
#include "intel_bufmgr.h"
#include "intel_bufmgr_priv.h"
commit ed71378a89bd417f451fdd4bfeb7225a39bc4539
Author: Julien Cristau <jcristau@debian.org>
Date: Sat Jan 5 22:50:43 2013 +0100
Fix upload target
diff --git a/debian/changelog b/debian/changelog
index 79fa48b..653e7e9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-libdrm (2.4.40-1~deb7u1) experimental; urgency=low
+libdrm (2.4.40-1~deb7u1) sid; urgency=low
* Revert nouveau to the 2.4.33 state (ie before the rewrite).
* Revert addition of libdrm2-udeb.
commit a523d34a401239ea24a85593c71ed22eeea4d878
Author: Julien Cristau <jcristau@debian.org>
Date: Sat Jan 5 22:28:56 2013 +0100
Upload to unstable
diff --git a/debian/changelog b/debian/changelog
index fe51436..79fa48b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,10 @@
-libdrm (2.4.40-1~deb7u1) UNRELEASED; urgency=low
+libdrm (2.4.40-1~deb7u1) experimental; urgency=low
* Revert nouveau to the 2.4.33 state (ie before the rewrite).
* Revert addition of libdrm2-udeb.
* Bump libdrm2 shlibs to 2.4.38.
- -- Julien Cristau <jcristau@debian.org> Tue, 25 Dec 2012 13:08:50 +0100
+ -- Julien Cristau <jcristau@debian.org> Sat, 05 Jan 2013 22:28:45 +0100
libdrm (2.4.40-1) experimental; urgency=low
commit 503b3d229472d6fb747b39dc7fc4a3b1210245d2
Author: Julien Cristau <jcristau@debian.org>
Date: Tue Dec 25 13:14:35 2012 +0100
Bump libdrm2 shlibs to 2.4.38.
diff --git a/debian/changelog b/debian/changelog
index 14f29c7..fe51436 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ libdrm (2.4.40-1~deb7u1) UNRELEASED; urgency=low
* Revert nouveau to the 2.4.33 state (ie before the rewrite).
* Revert addition of libdrm2-udeb.
+ * Bump libdrm2 shlibs to 2.4.38.
-- Julien Cristau <jcristau@debian.org> Tue, 25 Dec 2012 13:08:50 +0100
diff --git a/debian/rules b/debian/rules
index 63f0cf9..bb23d84 100755
--- a/debian/rules
+++ b/debian/rules
@@ -88,7 +88,7 @@ endif
dh_strip -s --remaining-packages
override_dh_makeshlibs:
- dh_makeshlibs -plibdrm2 -V'libdrm2 (>= 2.4.31)' -- -c4
+ dh_makeshlibs -plibdrm2 -V'libdrm2 (>= 2.4.38)' -- -c4
ifeq ($(INTEL), yes)
dh_makeshlibs -plibdrm-intel1 -V'libdrm-intel1 (>= 2.4.38)' -- -c4
endif
commit abc34f3d609e1088ebff24c4695e1a2a5012f224
Author: Julien Cristau <jcristau@debian.org>
Date: Tue Dec 25 13:13:41 2012 +0100
Revert addition of libdrm2-udeb.
diff --git a/debian/changelog b/debian/changelog
index 580aa76..14f29c7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
libdrm (2.4.40-1~deb7u1) UNRELEASED; urgency=low
* Revert nouveau to the 2.4.33 state (ie before the rewrite).
+ * Revert addition of libdrm2-udeb.
-- Julien Cristau <jcristau@debian.org> Tue, 25 Dec 2012 13:08:50 +0100
diff --git a/debian/control b/debian/control
index e9e0031..354f97d 100644
--- a/debian/control
+++ b/debian/control
@@ -55,16 +55,6 @@ Description: Userspace interface to kernel DRM services -- runtime
.
This package provides the runtime environment for libdrm.
-Package: libdrm2-udeb
-XC-Package-Type: udeb
-Section: debian-installer
-Architecture: any
-Depends:
- ${shlibs:Depends},
- ${misc:Depends},
-Description: Userspace interface to kernel DRM services -- runtime
- This is a udeb, or a microdeb, for the debian-installer.
-
Package: libdrm2-dbg
Section: debug
Priority: extra
diff --git a/debian/libdrm2-udeb.install b/debian/libdrm2-udeb.install
deleted file mode 100644
index 6e2fd9b..0000000
--- a/debian/libdrm2-udeb.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/*/libdrm.so.2*
diff --git a/debian/rules b/debian/rules
index b348274..63f0cf9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -88,7 +88,7 @@ endif
dh_strip -s --remaining-packages
override_dh_makeshlibs:
- dh_makeshlibs -plibdrm2 -V'libdrm2 (>= 2.4.31)' --add-udeb=libdrm2-udeb -- -c4
+ dh_makeshlibs -plibdrm2 -V'libdrm2 (>= 2.4.31)' -- -c4
ifeq ($(INTEL), yes)
dh_makeshlibs -plibdrm-intel1 -V'libdrm-intel1 (>= 2.4.38)' -- -c4
endif
commit 1b072ee351dd6254999ae7d76fc066f811c8ed13
Author: Julien Cristau <jcristau@debian.org>
Date: Tue Dec 25 13:12:08 2012 +0100
Revert nouveau to the 2.4.33 state (ie before the rewrite).
diff --git a/debian/changelog b/debian/changelog
index 1389fa9..580aa76 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libdrm (2.4.40-1~deb7u1) UNRELEASED; urgency=low
+
+ * Revert nouveau to the 2.4.33 state (ie before the rewrite).
+
+ -- Julien Cristau <jcristau@debian.org> Tue, 25 Dec 2012 13:08:50 +0100
+
libdrm (2.4.40-1) experimental; urgency=low
[ Maarten Lankhorst ]
diff --git a/debian/control b/debian/control
index 12171e7..e9e0031 100644
--- a/debian/control
+++ b/debian/control
@@ -23,7 +23,7 @@ Depends:
libdrm2 (= ${binary:Version}),
libdrm-intel1 (= ${binary:Version}) [amd64 i386 kfreebsd-amd64 kfreebsd-i386],
libdrm-radeon1 (= ${binary:Version}) [linux-any],
- libdrm-nouveau2 (= ${binary:Version}) [linux-any],
+ libdrm-nouveau1a (= ${binary:Version}) [linux-any],
libdrm-omap1 (= ${binary:Version}) [any-arm],
libkms1 (= ${binary:Version}) [linux-any],
${misc:Depends},
@@ -112,11 +112,12 @@ Description: Userspace interface to intel-specific kernel DRM services -- debugg
.
This package provides the debugging symbols for the libdrm-intel1 package.
-Package: libdrm-nouveau2
+Package: libdrm-nouveau1a
Section: libs
Architecture: linux-any
Depends: ${shlibs:Depends},
${misc:Depends},
+Conflicts: libdrm-nouveau1
Pre-Depends: ${misc:Pre-Depends}
Multi-Arch: same
Description: Userspace interface to nouveau-specific kernel DRM services -- runtime
@@ -125,12 +126,13 @@ Description: Userspace interface to nouveau-specific kernel DRM services -- runt
kernelspace portion of the "Direct Rendering Infrastructure" (DRI). The DRI is
currently used on Linux to provide hardware-accelerated OpenGL drivers.
-Package: libdrm-nouveau2-dbg
+Package: libdrm-nouveau1a-dbg
Section: debug
Priority: extra
Architecture: linux-any
-Depends: libdrm-nouveau2 (= ${binary:Version}),
+Depends: libdrm-nouveau1a (= ${binary:Version}),
${misc:Depends},
+Conflicts: libdrm-nouveau1-dbg
Multi-Arch: same
Description: Userspace interface to nouveau-specific kernel DRM -- debugging symbols
This library implements the userspace interface to the kernel DRM services.
@@ -138,7 +140,7 @@ Description: Userspace interface to nouveau-specific kernel DRM -- debugging sym
of the "Direct Rendering Infrastructure" (DRI). The DRI is currently used on
Linux to provide hardware-accelerated OpenGL drivers.
.
- This package provides the debugging symbols for the libdrm-nouveau2 package.
+ This package provides the debugging symbols for the libdrm-nouveau1a package.
Package: libdrm-radeon1
Section: libs
diff --git a/debian/libdrm-nouveau1a.install b/debian/libdrm-nouveau1a.install
new file mode 100644
index 0000000..6c55080
--- /dev/null
+++ b/debian/libdrm-nouveau1a.install
@@ -0,0 +1 @@
+usr/lib/*/libdrm_nouveau.so.1*
diff --git a/debian/libdrm-nouveau1a.lintian-overrides b/debian/libdrm-nouveau1a.lintian-overrides
new file mode 100644
index 0000000..76c525b
--- /dev/null
+++ b/debian/libdrm-nouveau1a.lintian-overrides
@@ -0,0 +1 @@
+libdrm-nouveau1a: package-name-doesnt-match-sonames libdrm-nouveau1
diff --git a/debian/libdrm-nouveau1a.symbols b/debian/libdrm-nouveau1a.symbols
new file mode 100644
index 0000000..a2ba922
--- /dev/null
+++ b/debian/libdrm-nouveau1a.symbols
@@ -0,0 +1,46 @@
+libdrm_nouveau.so.1 libdrm-nouveau1a #MINVER#
+ nouveau_bo_busy@Base 2.4.23
+ nouveau_bo_emit_buffer@Base 2.4.23
+ nouveau_bo_handle_get@Base 2.4.23
+ nouveau_bo_handle_ref@Base 2.4.23
+ nouveau_bo_init@Base 2.4.23
+ nouveau_bo_map@Base 2.4.23
+ nouveau_bo_map_flush@Base 2.4.23
+ nouveau_bo_map_range@Base 2.4.23
+ nouveau_bo_new@Base 2.4.23
+ nouveau_bo_new_tile@Base 2.4.23
+ nouveau_bo_pending@Base 2.4.23
+ nouveau_bo_ref@Base 2.4.23
+ nouveau_bo_takedown@Base 2.4.23
+ nouveau_bo_unmap@Base 2.4.23
+ nouveau_bo_user@Base 2.4.23
+ nouveau_bo_wrap@Base 2.4.23
+ nouveau_channel_alloc@Base 2.4.23
+ nouveau_channel_free@Base 2.4.23
+ nouveau_device_close@Base 2.4.23
+ nouveau_device_get_param@Base 2.4.23
+ nouveau_device_open@Base 2.4.23
+ nouveau_device_open_existing@Base 2.4.23
+ nouveau_device_set_param@Base 2.4.23
+ nouveau_grobj_alloc@Base 2.4.23
+ nouveau_grobj_autobind@Base 2.4.23
+ nouveau_grobj_free@Base 2.4.23
+ nouveau_grobj_ref@Base 2.4.23
+ nouveau_notifier_alloc@Base 2.4.23
+ nouveau_notifier_free@Base 2.4.23
+ nouveau_notifier_reset@Base 2.4.23
+ nouveau_notifier_return_val@Base 2.4.23
+ nouveau_notifier_status@Base 2.4.23
+ nouveau_notifier_wait_status@Base 2.4.23
+ nouveau_pushbuf_emit_reloc@Base 2.4.23
+ nouveau_pushbuf_fini@Base 2.4.23
+ nouveau_pushbuf_flush@Base 2.4.23
+ nouveau_pushbuf_init@Base 2.4.23
+ nouveau_pushbuf_marker_emit@Base 2.4.23
+ nouveau_pushbuf_marker_undo@Base 2.4.23
+ nouveau_pushbuf_submit@Base 2.4.23
+ nouveau_reloc_emit@Base 2.4.23
+ nouveau_resource_alloc@Base 2.4.23
+ nouveau_resource_destroy@Base 2.4.23
+ nouveau_resource_free@Base 2.4.23
+ nouveau_resource_init@Base 2.4.23
diff --git a/debian/libdrm-nouveau2.install b/debian/libdrm-nouveau2.install
deleted file mode 100644
index a573e71..0000000
--- a/debian/libdrm-nouveau2.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/*/libdrm_nouveau.so.2*
diff --git a/debian/libdrm-nouveau2.lintian-overrides b/debian/libdrm-nouveau2.lintian-overrides
deleted file mode 100644
index 730972c..0000000
--- a/debian/libdrm-nouveau2.lintian-overrides
+++ /dev/null
@@ -1 +0,0 @@
-libdrm-nouveau2: symbols-declares-dependency-on-other-package libdrm-nouveau-private
diff --git a/debian/libdrm-nouveau2.symbols b/debian/libdrm-nouveau2.symbols
deleted file mode 100644
index 1b5ee4c..0000000
--- a/debian/libdrm-nouveau2.symbols
+++ /dev/null
@@ -1,44 +0,0 @@
-libdrm_nouveau.so.2 libdrm-nouveau2 #MINVER#
-| libdrm-nouveau-private
- abi16_bo_info@Base 0 1
- abi16_bo_init@Base 0 1
- abi16_chan_nv04@Base 0 1
- abi16_chan_nvc0@Base 0 1
- abi16_engobj@Base 0 1
- abi16_ntfy@Base 0 1
- nouveau_bo_map@Base 2.4.34
- nouveau_bo_name_get@Base 2.4.34
- nouveau_bo_name_ref@Base 2.4.34
- nouveau_bo_new@Base 2.4.34
- nouveau_bo_prime_handle_ref@Base 2.4.38
- nouveau_bo_ref@Base 2.4.34
- nouveau_bo_set_prime@Base 2.4.38
- nouveau_bo_wait@Base 2.4.34
- nouveau_bo_wrap@Base 2.4.34
- nouveau_bufctx_del@Base 2.4.34
- nouveau_bufctx_mthd@Base 2.4.34
- nouveau_bufctx_new@Base 2.4.34
- nouveau_bufctx_refn@Base 2.4.34
- nouveau_bufctx_reset@Base 2.4.34
- nouveau_client_del@Base 2.4.34
- nouveau_client_new@Base 2.4.34
- nouveau_debug@Base 2.4.34
- nouveau_device_del@Base 2.4.34
- nouveau_device_open@Base 2.4.34
- nouveau_device_open_existing@Base 0 1
- nouveau_device_wrap@Base 2.4.34
- nouveau_getparam@Base 2.4.34
- nouveau_object_del@Base 2.4.34
- nouveau_object_find@Base 2.4.34
- nouveau_object_new@Base 2.4.34
- nouveau_pushbuf_bufctx@Base 2.4.34
- nouveau_pushbuf_data@Base 2.4.34
- nouveau_pushbuf_del@Base 2.4.34
- nouveau_pushbuf_kick@Base 2.4.34
- nouveau_pushbuf_new@Base 2.4.34
- nouveau_pushbuf_refd@Base 2.4.34
- nouveau_pushbuf_refn@Base 2.4.34
- nouveau_pushbuf_reloc@Base 2.4.34
- nouveau_pushbuf_space@Base 2.4.34
- nouveau_pushbuf_validate@Base 2.4.34
- nouveau_setparam@Base 2.4.34
diff --git a/debian/patches/revert-nouveau-rewrite.diff b/debian/patches/revert-nouveau-rewrite.diff
new file mode 100644
index 0000000..76bec4b
--- /dev/null
+++ b/debian/patches/revert-nouveau-rewrite.diff
@@ -0,0 +1,4935 @@
+diff --git a/nouveau/Makefile.am b/nouveau/Makefile.am
+index 206e892..8b89916 100644
+--- a/nouveau/Makefile.am
++++ b/nouveau/Makefile.am
+@@ -3,23 +3,41 @@ AM_CFLAGS = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/nouveau \
+ $(PTHREADSTUBS_CFLAGS) \
+- -I$(top_srcdir)/include/drm \
+- -DDEBUG
++ -I$(top_srcdir)/include/drm
+
+ libdrm_nouveau_la_LTLIBRARIES = libdrm_nouveau.la
+ libdrm_nouveau_ladir = $(libdir)
+-libdrm_nouveau_la_LDFLAGS = -version-number 2:0:0 -no-undefined
++libdrm_nouveau_la_LDFLAGS = -version-number 1:0:0 -no-undefined
+ libdrm_nouveau_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
+
+-libdrm_nouveau_la_SOURCES = nouveau.c \
+- pushbuf.c \
+- bufctx.c \
+- abi16.c \
+- private.h
++libdrm_nouveau_la_SOURCES = \
++ nouveau_device.c \
++ nouveau_channel.c \
++ nouveau_pushbuf.c \
++ nouveau_grobj.c \
++ nouveau_notifier.c \
++ nouveau_bo.c \
++ nouveau_resource.c \
++ nouveau_private.h \
++ nouveau_reloc.c
++
++libdrm_nouveaucommonincludedir = ${includedir}/nouveau
++libdrm_nouveaucommoninclude_HEADERS = \
++ nouveau_device.h \
++ nouveau_channel.h \
++ nouveau_grobj.h \
++ nouveau_notifier.h \
++ nouveau_pushbuf.h \
++ nv04_pushbuf.h \
++ nvc0_pushbuf.h \
++ nouveau_bo.h \
++ nouveau_resource.h \
++ nouveau_reloc.h
+
+
+ libdrm_nouveauincludedir = ${includedir}/libdrm
+-libdrm_nouveauinclude_HEADERS = nouveau.h
++libdrm_nouveauinclude_HEADERS = \
++ nouveau_drmif.h
+
+ pkgconfigdir = @pkgconfigdir@
+ pkgconfig_DATA = libdrm_nouveau.pc
+diff --git a/nouveau/abi16.c b/nouveau/abi16.c
+deleted file mode 100644
+index a67fbc1..0000000
+--- a/nouveau/abi16.c
++++ /dev/null
+@@ -1,195 +0,0 @@
+-/*
+- * Copyright 2012 Red Hat Inc.
+- *
+- * Permission is hereby granted, free of charge, to any person obtaining a
+- * copy of this software and associated documentation files (the "Software"),
+- * to deal in the Software without restriction, including without limitation
+- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+- * and/or sell copies of the Software, and to permit persons to whom the
+- * Software is furnished to do so, subject to the following conditions:
+- *
+- * The above copyright notice and this permission notice shall be included in
+- * all copies or substantial portions of the Software.
+- *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+- * OTHER DEALINGS IN THE SOFTWARE.
+- *
+- * Authors: Ben Skeggs
+- */
+-
+-#include <stdlib.h>
+-#include <stdint.h>
+-
+-#include "private.h"
+-
+-int
+-abi16_chan_nv04(struct nouveau_object *obj)
+-{
+- struct nouveau_device *dev = (struct nouveau_device *)obj->parent;
+- struct nv04_fifo *nv04 = obj->data;
+- struct drm_nouveau_channel_alloc req = {nv04->vram, nv04->gart};
+- int ret;
+-
+- ret = drmCommandWriteRead(dev->fd, DRM_NOUVEAU_CHANNEL_ALLOC,
+- &req, sizeof(req));
+- if (ret)
+- return ret;
+-
+- nv04->base.channel = req.channel;
+- nv04->base.pushbuf = req.pushbuf_domains;
+- nv04->notify = req.notifier_handle;
+- nv04->base.object->handle = req.channel;
+- nv04->base.object->length = sizeof(*nv04);
+- return 0;
+-}
+-
+-int
+-abi16_chan_nvc0(struct nouveau_object *obj)
+-{
+- struct nouveau_device *dev = (struct nouveau_device *)obj->parent;
+- struct drm_nouveau_channel_alloc req = {};
+- struct nvc0_fifo *nvc0 = obj->data;
+- int ret;
+-
+- ret = drmCommandWriteRead(dev->fd, DRM_NOUVEAU_CHANNEL_ALLOC,
+- &req, sizeof(req));
+- if (ret)
+- return ret;
+-
+- nvc0->base.channel = req.channel;
+- nvc0->base.pushbuf = req.pushbuf_domains;
+- nvc0->notify = req.notifier_handle;
+- nvc0->base.object->handle = req.channel;
+- nvc0->base.object->length = sizeof(*nvc0);
+- return 0;
+-}
+-
+-int
+-abi16_engobj(struct nouveau_object *obj)
+-{
+- struct drm_nouveau_grobj_alloc req = {
+- obj->parent->handle, obj->handle, obj->oclass
+- };
+- struct nouveau_device *dev;
+- int ret;
+-
+- dev = nouveau_object_find(obj, NOUVEAU_DEVICE_CLASS);
+- ret = drmCommandWrite(dev->fd, DRM_NOUVEAU_GROBJ_ALLOC,
+- &req, sizeof(req));
+- if (ret)
+- return ret;
+-
+- obj->length = sizeof(struct nouveau_object *);
+- return 0;
+-}
+-
+-int
+-abi16_ntfy(struct nouveau_object *obj)
+-{
+- struct nv04_notify *ntfy = obj->data;
+- struct drm_nouveau_notifierobj_alloc req = {
+- obj->parent->handle, ntfy->object->handle, ntfy->length
+- };
+- struct nouveau_device *dev;
+- int ret;
+-
+- dev = nouveau_object_find(obj, NOUVEAU_DEVICE_CLASS);
+- ret = drmCommandWriteRead(dev->fd, DRM_NOUVEAU_NOTIFIEROBJ_ALLOC,
+- &req, sizeof(req));
+- if (ret)
+- return ret;
+-
+- ntfy->offset = req.offset;
+- ntfy->object->length = sizeof(*ntfy);
+- return 0;
+-}
+-
+-void
+-abi16_bo_info(struct nouveau_bo *bo, struct drm_nouveau_gem_info *info)
+-{
+- struct nouveau_bo_priv *nvbo = nouveau_bo(bo);
+-
+- nvbo->map_handle = info->map_handle;
+- bo->handle = info->handle;
+- bo->size = info->size;
+- bo->offset = info->offset;
+-
+- bo->flags = 0;
+- if (info->domain & NOUVEAU_GEM_DOMAIN_VRAM)
+- bo->flags |= NOUVEAU_BO_VRAM;
+- if (info->domain & NOUVEAU_GEM_DOMAIN_GART)
+- bo->flags |= NOUVEAU_BO_GART;
+- if (!(info->tile_flags & NOUVEAU_GEM_TILE_NONCONTIG))
+- bo->flags |= NOUVEAU_BO_CONTIG;
+- if (nvbo->map_handle)
+- bo->flags |= NOUVEAU_BO_MAP;
+-
+- if (bo->device->chipset >= 0xc0) {
+- bo->config.nvc0.memtype = (info->tile_flags & 0xff00) >> 8;
+- bo->config.nvc0.tile_mode = info->tile_mode;
+- } else
+- if (bo->device->chipset >= 0x80 || bo->device->chipset == 0x50) {
+- bo->config.nv50.memtype = (info->tile_flags & 0x07f00) >> 8 |
+- (info->tile_flags & 0x30000) >> 9;
+- bo->config.nv50.tile_mode = info->tile_mode << 4;
+- } else {
+- bo->config.nv04.surf_flags = info->tile_flags & 7;
+- bo->config.nv04.surf_pitch = info->tile_mode;
+- }
+-}
+-
+-int
+-abi16_bo_init(struct nouveau_bo *bo, uint32_t alignment,
+- union nouveau_bo_config *config)
+-{
+- struct nouveau_device *dev = bo->device;
+- struct drm_nouveau_gem_new req = {};
+- struct drm_nouveau_gem_info *info = &req.info;
+- int ret;
+-
+- if (bo->flags & NOUVEAU_BO_VRAM)
+- info->domain |= NOUVEAU_GEM_DOMAIN_VRAM;
+- if (bo->flags & NOUVEAU_BO_GART)
+- info->domain |= NOUVEAU_GEM_DOMAIN_GART;
+- if (!info->domain)
+- info->domain |= NOUVEAU_GEM_DOMAIN_VRAM |
+- NOUVEAU_GEM_DOMAIN_GART;
+-
+- if (bo->flags & NOUVEAU_BO_MAP)
+- info->domain |= NOUVEAU_GEM_DOMAIN_MAPPABLE;
+-
+- if (!(bo->flags & NOUVEAU_BO_CONTIG))
+- info->tile_flags = NOUVEAU_GEM_TILE_NONCONTIG;
+-
+- info->size = bo->size;
+- req.align = alignment;
+-
+- if (config) {
+- if (dev->chipset >= 0xc0) {
+- info->tile_flags = (config->nvc0.memtype & 0xff) << 8;
+- info->tile_mode = config->nvc0.tile_mode;
+- } else
+- if (dev->chipset >= 0x80 || dev->chipset == 0x50) {
+- info->tile_flags = (config->nv50.memtype & 0x07f) << 8 |
+- (config->nv50.memtype & 0x180) << 9;
+- info->tile_mode = config->nv50.tile_mode >> 4;
+- } else {
+- info->tile_flags = config->nv04.surf_flags & 7;
+- info->tile_mode = config->nv04.surf_pitch;
+- }
+- }
+-
+- if (!nouveau_device(dev)->have_bo_usage)
+- info->tile_flags &= 0x0000ff00;
+-
+- ret = drmCommandWriteRead(dev->fd, DRM_NOUVEAU_GEM_NEW,
+- &req, sizeof(req));
+- if (ret == 0)
+- abi16_bo_info(bo, &req.info);
+- return ret;
+-}
+diff --git a/nouveau/bufctx.c b/nouveau/bufctx.c
+deleted file mode 100644
+index 23d6f09..0000000
+--- a/nouveau/bufctx.c
++++ /dev/null
+@@ -1,170 +0,0 @@
+-/*
+- * Copyright 2012 Red Hat Inc.
+- *
+- * Permission is hereby granted, free of charge, to any person obtaining a
+- * copy of this software and associated documentation files (the "Software"),
+- * to deal in the Software without restriction, including without limitation
+- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+- * and/or sell copies of the Software, and to permit persons to whom the
+- * Software is furnished to do so, subject to the following conditions:
+- *
+- * The above copyright notice and this permission notice shall be included in
+- * all copies or substantial portions of the Software.
+- *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+- * OTHER DEALINGS IN THE SOFTWARE.
+- *
+- * Authors: Ben Skeggs
+- */
+-
+-#ifdef HAVE_CONFIG_H
+-#include <config.h>
+-#endif
+-
+-#include <stdio.h>
+-#include <stdlib.h>
+-#include <stdint.h>
+-#include <stdbool.h>
+-#include <assert.h>
+-#include <errno.h>
+-
+-#include "libdrm_lists.h"
+-
+-#include "nouveau.h"
+-#include "private.h"
+-
+-struct nouveau_bufref_priv {
+- struct nouveau_bufref base;
+- struct nouveau_bufref_priv *next;
+- struct nouveau_bufctx *bufctx;
+-};
+-
+-static inline struct nouveau_bufref_priv *
+-nouveau_bufref(struct nouveau_bufref *bctx)
+-{
+- return (struct nouveau_bufref_priv *)bctx;
+-}
+-
+-struct nouveau_bufbin_priv {
+- struct nouveau_bufref_priv *list;
+- int relocs;
+-};
+-
+-struct nouveau_bufctx_priv {
+- struct nouveau_bufctx base;
+- struct nouveau_bufref_priv *free;
+- int nr_bins;
+- struct nouveau_bufbin_priv bins[];
+-};
+-
+-static inline struct nouveau_bufctx_priv *
+-nouveau_bufctx(struct nouveau_bufctx *bctx)
+-{
+- return (struct nouveau_bufctx_priv *)bctx;
+-}
+-
+-int
+-nouveau_bufctx_new(struct nouveau_client *client, int bins,
+- struct nouveau_bufctx **pbctx)
+-{
+- struct nouveau_bufctx_priv *priv;
+-
+- priv = calloc(1, sizeof(*priv) + sizeof(priv->bins[0]) * bins);
+- if (priv) {
+- DRMINITLISTHEAD(&priv->base.head);
+- DRMINITLISTHEAD(&priv->base.pending);
+- DRMINITLISTHEAD(&priv->base.current);
+- priv->base.client = client;
+- priv->nr_bins = bins;
+- *pbctx = &priv->base;
+- return 0;
+- }
+-
+- return -ENOMEM;
+-}
+-
+-void
+-nouveau_bufctx_del(struct nouveau_bufctx **pbctx)
+-{
+- struct nouveau_bufctx_priv *pctx = nouveau_bufctx(*pbctx);
+- struct nouveau_bufref_priv *pref;
+- if (pctx) {
+- while (pctx->nr_bins--)
+- nouveau_bufctx_reset(&pctx->base, pctx->nr_bins);
+- while ((pref = pctx->free)) {
+- pctx->free = pref->next;
+- free(pref);
+- }
+- free(pctx);
+- *pbctx = NULL;
+- }
+-}
+-
+-void
+-nouveau_bufctx_reset(struct nouveau_bufctx *bctx, int bin)
+-{
+- struct nouveau_bufctx_priv *pctx = nouveau_bufctx(bctx);
+- struct nouveau_bufbin_priv *pbin = &pctx->bins[bin];
+- struct nouveau_bufref_priv *pref;
+-
+- while ((pref = pbin->list)) {
+- DRMLISTDELINIT(&pref->base.thead);
+- pbin->list = pref->next;
+- pref->next = pctx->free;
+- pctx->free = pref;
+- }
+-
+- bctx->relocs -= pbin->relocs;
+- pbin->relocs = 0;
+-}
+-
+-struct nouveau_bufref *
+-nouveau_bufctx_refn(struct nouveau_bufctx *bctx, int bin,
+- struct nouveau_bo *bo, uint32_t flags)
+-{
+- struct nouveau_bufctx_priv *pctx = nouveau_bufctx(bctx);
+- struct nouveau_bufbin_priv *pbin = &pctx->bins[bin];
+- struct nouveau_bufref_priv *pref = pctx->free;
+-
+- if (!pref)
+- pref = malloc(sizeof(*pref));
+- else
+- pctx->free = pref->next;
+-
+- if (pref) {
+- pref->base.bo = bo;
+- pref->base.flags = flags;
+- pref->base.packet = 0;
+-
+- DRMLISTADDTAIL(&pref->base.thead, &bctx->pending);
+- pref->bufctx = bctx;
+- pref->next = pbin->list;
+- pbin->list = pref;
+- }
+-
+- return &pref->base;
+-}
+-
+-struct nouveau_bufref *
+-nouveau_bufctx_mthd(struct nouveau_bufctx *bctx, int bin, uint32_t packet,
+- struct nouveau_bo *bo, uint64_t data, uint32_t flags,
+- uint32_t vor, uint32_t tor)
+-{
+- struct nouveau_bufctx_priv *pctx = nouveau_bufctx(bctx);
+- struct nouveau_bufbin_priv *pbin = &pctx->bins[bin];
+- struct nouveau_bufref *bref = nouveau_bufctx_refn(bctx, bin, bo, flags);
+- if (bref) {
+- bref->packet = packet;
+- bref->data = data;
+- bref->vor = vor;
+- bref->tor = tor;
+- pbin->relocs++;
+- bctx->relocs++;
+- }
+- return bref;
+-}
+diff --git a/nouveau/libdrm_nouveau.pc.in b/nouveau/libdrm_nouveau.pc.in
+index 6170613..c78a28a 100644
+--- a/nouveau/libdrm_nouveau.pc.in
++++ b/nouveau/libdrm_nouveau.pc.in
+@@ -5,7 +5,7 @@ includedir=@includedir@
+
+ Name: libdrm_nouveau
+ Description: Userspace interface to nouveau kernel DRM services
+-Version: 2.4.33
++Version: 0.6
+ Libs: -L${libdir} -ldrm_nouveau
+ Cflags: -I${includedir} -I${includedir}/libdrm -I${includedir}/nouveau
+ Requires.private: libdrm
+diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c
+deleted file mode 100644
+index 940d933..0000000
+--- a/nouveau/nouveau.c
++++ /dev/null
+@@ -1,527 +0,0 @@
+-/*
+- * Copyright 2012 Red Hat Inc.
+- *
+- * Permission is hereby granted, free of charge, to any person obtaining a
+- * copy of this software and associated documentation files (the "Software"),
+- * to deal in the Software without restriction, including without limitation
+- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+- * and/or sell copies of the Software, and to permit persons to whom the
+- * Software is furnished to do so, subject to the following conditions:
+- *
+- * The above copyright notice and this permission notice shall be included in
+- * all copies or substantial portions of the Software.
+- *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+- * OTHER DEALINGS IN THE SOFTWARE.
+- *
+- * Authors: Ben Skeggs
+- */
+-
+-#ifdef HAVE_CONFIG_H
+-#include <config.h>
+-#endif
+-
+-#include <stdio.h>
+-#include <stdlib.h>
+-#include <stdint.h>
+-#include <string.h>
+-#include <stdbool.h>
+-#include <assert.h>
+-#include <errno.h>
+-#include <sys/mman.h>
+-#include <fcntl.h>
+-
+-#include <xf86drm.h>
+-#include <xf86atomic.h>
+-#include "libdrm_lists.h"
+-#include "nouveau_drm.h"
+-
+-#include "nouveau.h"
+-#include "private.h"
+-
+-#ifdef DEBUG
+-uint32_t nouveau_debug = 0;
+-
+-static void
+-debug_init(char *args)
+-{
+- if (args) {
+- int n = strtol(args, NULL, 0);
+- if (n >= 0)
+- nouveau_debug = n;
+- }
+-}
+-#endif
+-
+-/* this is the old libdrm's version of nouveau_device_wrap(), the symbol
+- * is kept here to prevent AIGLX from crashing if the DDX is linked against
+- * the new libdrm, but the DRI driver against the old
+- */
+-int
+-nouveau_device_open_existing(struct nouveau_device **pdev, int close, int fd,
+- drm_context_t ctx)
+-{
+- return -EACCES;
+-}
+-
+-int
+-nouveau_device_wrap(int fd, int close, struct nouveau_device **pdev)
+-{
+- struct nouveau_device_priv *nvdev = calloc(1, sizeof(*nvdev));
+- struct nouveau_device *dev = &nvdev->base;
+- uint64_t chipset, vram, gart, bousage;
+- drmVersionPtr ver;
+- int ret;
+-
+-#ifdef DEBUG
Reply to: