[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

libdrm: Changes to 'debian-unstable'



 .gitignore                                              |    4 
 ChangeLog                                               | 1387 ++++
 Makefile.am                                             |    6 
 autogen.sh                                              |    2 
 configure.ac                                            |   88 
 debian/changelog                                        |   29 
 debian/control                                          |    2 
 debian/libdrm-dev.install                               |    1 
 debian/libdrm-intel1.symbols                            |    8 
 debian/libdrm-omap1.symbols                             |    4 
 debian/libdrm-radeon1.symbols                           |    2 
 debian/libdrm2.symbols                                  |    5 
 debian/patches/02_build_libkms_against_in_tree_drm.diff |   17 
 debian/patches/revert-nouveau-rewrite.diff              | 4935 ++++++++++++++++
 debian/patches/series                                   |    2 
 debian/rules                                            |   16 
 exynos/Makefile.am                                      |   22 
 exynos/exynos_drm.c                                     |  396 +
 exynos/exynos_drm.h                                     |  148 
 exynos/exynos_drmif.h                                   |   88 
 exynos/libdrm_exynos.pc.in                              |   11 
 include/drm/drm.h                                       |   22 
 include/drm/drm_mode.h                                  |   25 
 include/drm/i915_drm.h                                  |   71 
 intel/Makefile.am                                       |    2 
 intel/intel_bufmgr.h                                    |   24 
 intel/intel_bufmgr_gem.c                                |  364 +
 intel/intel_bufmgr_priv.h                               |    5 
 intel/intel_chipset.h                                   |   79 
 intel/intel_decode.c                                    |  106 
 intel/test_decode.c                                     |    2 
 intel/tests/gen7-3d.batch-ref.txt                       |    4 
 libdrm_lists.h                                          |   29 
 libkms/Makefile.am                                      |    2 
 man/Makefile.am                                         |   11 
 man/drmAvailable.man                                    |   25 
 man/drmHandleEvent.man                                  |   45 
 man/drmModeGetResources.man                             |   79 
 nouveau/Makefile.am                                     |   36 
 nouveau/abi16.c                                         |  195 
 nouveau/bufctx.c                                        |  170 
 nouveau/libdrm_nouveau.pc.in                            |    2 
 nouveau/nouveau.c                                       |  527 +
 nouveau/nouveau.h                                       |  215 
 nouveau/nouveau_bo.c                                    |  549 -
 nouveau/nouveau_bo.h                                    |  104 
 nouveau/nouveau_channel.c                               |  142 
 nouveau/nouveau_channel.h                               |   57 
 nouveau/nouveau_device.c                                |  198 
 nouveau/nouveau_device.h                                |   33 
 nouveau/nouveau_drmif.h                                 |   58 
 nouveau/nouveau_grobj.c                                 |  148 
 nouveau/nouveau_grobj.h                                 |   48 
 nouveau/nouveau_notifier.c                              |  148 
 nouveau/nouveau_notifier.h                              |   63 
 nouveau/nouveau_private.h                               |  136 
 nouveau/nouveau_pushbuf.c                               |  344 -
 nouveau/nouveau_pushbuf.h                               |  162 
 nouveau/nouveau_reloc.c                                 |  154 
 nouveau/nouveau_reloc.h                                 |   32 
 nouveau/nouveau_resource.c                              |  124 
 nouveau/nouveau_resource.h                              |   51 
 nouveau/nv04_pushbuf.h                                  |   66 
 nouveau/nvc0_pushbuf.h                                  |   92 
 nouveau/private.h                                       |  122 
 nouveau/pushbuf.c                                       |  773 ++
 omap/omap_drm.c                                         |  199 
 omap/omap_drm.h                                         |   36 
 omap/omap_drmif.h                                       |    4 
 radeon/Makefile.am                                      |    2 
 radeon/r600_pci_ids.h                                   |   83 
 radeon/radeon_bo_gem.c                                  |   48 
 radeon/radeon_bo_gem.h                                  |    4 
 radeon/radeon_cs_gem.c                                  |    2 
 radeon/radeon_surface.c                                 |  460 +
 radeon/radeon_surface.h                                 |    2 
 tests/modetest/Makefile.am                              |   14 
 tests/modetest/buffers.c                                | 1021 +++
 tests/modetest/buffers.h                                |   45 
 tests/modetest/modetest.c                               |  628 +-
 tests/vbltest/vbltest.c                                 |    2 
 xf86drm.c                                               |   31 
 xf86drm.h                                               |    3 
 xf86drmMode.c                                           |   92 
 xf86drmMode.h                                           |   14 
 85 files changed, 12330 insertions(+), 3177 deletions(-)

New commits:
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
+-	debug_init(getenv("NOUVEAU_LIBDRM_DEBUG"));
+-#endif
+-
+-	if (!nvdev)
+-		return -ENOMEM;
+-	nvdev->base.fd = fd;
+-
+-	ver = drmGetVersion(fd);
+-	if (ver) dev->drm_version = (ver->version_major << 24) |
+-				    (ver->version_minor << 8) |
+-				     ver->version_patchlevel;
+-	drmFreeVersion(ver);
+-
+-	if ( dev->drm_version != 0x00000010 &&
+-	    (dev->drm_version <  0x01000000 ||
+-	     dev->drm_version >= 0x02000000)) {
+-		nouveau_device_del(&dev);
+-		return -EINVAL;
+-	}
+-
+-	ret = nouveau_getparam(dev, NOUVEAU_GETPARAM_CHIPSET_ID, &chipset);
+-	if (ret == 0)
+-	ret = nouveau_getparam(dev, NOUVEAU_GETPARAM_FB_SIZE, &vram);
+-	if (ret == 0)
+-	ret = nouveau_getparam(dev, NOUVEAU_GETPARAM_AGP_SIZE, &gart);
+-	if (ret) {
+-		nouveau_device_del(&dev);
+-		return ret;
+-	}
+-
+-	ret = nouveau_getparam(dev, NOUVEAU_GETPARAM_HAS_BO_USAGE, &bousage);
+-	if (ret == 0)
+-		nvdev->have_bo_usage = (bousage != 0);
+-
+-	nvdev->close = close;
+-	DRMINITLISTHEAD(&nvdev->bo_list);
+-	nvdev->base.object.oclass = NOUVEAU_DEVICE_CLASS;
+-	nvdev->base.lib_version = 0x01000000;
+-	nvdev->base.chipset = chipset;
+-	nvdev->base.vram_size = vram;
+-	nvdev->base.gart_size = gart;
+-	nvdev->base.vram_limit = (nvdev->base.vram_size * 80) / 100;
+-	nvdev->base.gart_limit = (nvdev->base.gart_size * 80) / 100;
+-
+-	*pdev = &nvdev->base;
+-	return 0;
+-}
+-
+-int
+-nouveau_device_open(const char *busid, struct nouveau_device **pdev)
+-{
+-	int ret = -ENODEV, fd = drmOpen("nouveau", busid);
+-	if (fd >= 0) {
+-		ret = nouveau_device_wrap(fd, 1, pdev);
+-		if (ret)
+-			drmClose(fd);


Reply to: