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

libdrm: Changes to 'debian-experimental'



 .gitignore                                              |    1 
 ChangeLog                                               |  280 
 configure.ac                                            |   18 
 debian/changelog                                        |   11 
 debian/libdrm-intel1.symbols                            |    2 
 debian/libdrm-radeon1.symbols                           |   18 
 debian/patches/02_build_libkms_against_in_tree_drm.diff |   25 
 debian/patches/series                                   |    1 
 debian/rules                                            |    4 
 include/drm/drm.h                                       |    2 
 include/drm/drm_mode.h                                  |   37 
 include/drm/i915_drm.h                                  |    5 
 intel/intel_bufmgr.c                                    |   20 
 intel/intel_bufmgr.h                                    |    4 
 intel/intel_bufmgr_fake.c                               |    4 
 intel/intel_bufmgr_gem.c                                |  197 
 intel/intel_bufmgr_priv.h                               |   14 
 libkms/Makefile.am                                      |    3 
 nouveau/Makefile.am                                     |    1 
 nouveau/nouveau_class.h                                 | 9019 ----------------
 radeon/Makefile.am                                      |    4 
 radeon/bof.c                                            |  477 
 radeon/bof.h                                            |   90 
 radeon/radeon_cs.h                                      |    2 
 radeon/radeon_cs_gem.c                                  |  102 
 tests/Makefile.am                                       |   10 
 tests/vbltest/Makefile.am                               |   11 
 tests/vbltest/vbltest.c                                 |  188 
 xf86atomic.h                                            |    4 
 29 files changed, 1418 insertions(+), 9136 deletions(-)

New commits:
commit b47654f4e18616d3e2c2810aba8eba205fedeb6a
Author: Robert Hooker <sarvatt@ubuntu.com>
Date:   Thu Jun 10 15:08:53 2010 -0400

    Refresh intel and radeon symbols.

diff --git a/debian/libdrm-intel1.symbols b/debian/libdrm-intel1.symbols
index 68b9c37..24b01cb 100644
--- a/debian/libdrm-intel1.symbols
+++ b/debian/libdrm-intel1.symbols
@@ -13,8 +13,10 @@ libdrm_intel.so.1 libdrm-intel1 #MINVER#
  drm_intel_bo_gem_create_from_name@Base 2.4.1
  drm_intel_bo_get_subdata@Base 2.4.1
  drm_intel_bo_get_tiling@Base 2.4.1
+ drm_intel_bo_is_reusable@Base 2.4.21
  drm_intel_bo_madvise@Base 2.4.16
  drm_intel_bo_map@Base 2.4.1
+ drm_intel_bo_mrb_exec@Base 2.4.21
  drm_intel_bo_pin@Base 2.4.1
  drm_intel_bo_reference@Base 2.4.1
  drm_intel_bo_references@Base 2.4.15
diff --git a/debian/libdrm-radeon1.symbols b/debian/libdrm-radeon1.symbols
index 2cc83e9..fdc67ae 100644
--- a/debian/libdrm-radeon1.symbols
+++ b/debian/libdrm-radeon1.symbols
@@ -1,4 +1,22 @@
 libdrm_radeon.so.1 libdrm-radeon1 #MINVER#
+ bof_array@Base 2.4.21
+ bof_array_append@Base 2.4.21
+ bof_array_get@Base 2.4.21
+ bof_array_size@Base 2.4.21
+ bof_blob@Base 2.4.21
+ bof_blob_size@Base 2.4.21
+ bof_blob_value@Base 2.4.21
+ bof_decref@Base 2.4.21
+ bof_dump_file@Base 2.4.21
+ bof_incref@Base 2.4.21
+ bof_int32@Base 2.4.21
+ bof_int32_value@Base 2.4.21
+ bof_load_file@Base 2.4.21
+ bof_object@Base 2.4.21
+ bof_object_get@Base 2.4.21
+ bof_object_set@Base 2.4.21
+ bof_print@Base 2.4.21
+ bof_string@Base 2.4.21
  radeon_bo_debug@Base 2.4.17
  radeon_bo_get_handle@Base 2.4.17
  radeon_bo_get_src_domain@Base 2.4.17
diff --git a/debian/rules b/debian/rules
index 8f55cda..c2c42f8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -144,13 +144,13 @@ endif
 	dh_fixperms -s
 	dh_makeshlibs -plibdrm2 -V'libdrm2 (>= 2.4.17)' -- -c4
 ifeq ($(INTEL), yes)
-	dh_makeshlibs -plibdrm-intel1 -V'libdrm-intel1 (>= 2.4.20)' -- -c4
+	dh_makeshlibs -plibdrm-intel1 -V'libdrm-intel1 (>= 2.4.21)' -- -c4
 endif
 ifeq ($(NOUVEAU), yes)
 	dh_makeshlibs -plibdrm-nouveau1 -V'libdrm-nouveau1 (>= 2.4.20-3~)' -- -c4
 endif
 ifeq ($(RADEON), yes)
-	dh_makeshlibs -plibdrm-radeon1 -V'libdrm-radeon1 (>= 2.4.20)' -- -c4
+	dh_makeshlibs -plibdrm-radeon1 -V'libdrm-radeon1 (>= 2.4.21)' -- -c4
 endif
 ifeq ($(LIBKMS), yes)
 	dh_makeshlibs -plibkms1 -V'libkms1 (>=2.4.20)' -- -c4

commit 8165277148da2669892f3da6c34da49565f2ba3a
Author: Robert Hooker <sarvatt@ubuntu.com>
Date:   Thu Jun 10 14:59:54 2010 -0400

    Drop 02_build_libkms_against_in_tree_drm.diff (upstream)

diff --git a/debian/changelog b/debian/changelog
index 026aa47..ee8066e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,9 +7,6 @@ libdrm (2.4.21-1) UNRELEASED; urgency=low
       kernel so we might as well build the userspace bits.
   * debian/control:
     - Add libkms1, libkms1-dbg packages on linux
-  * debian/patches/02_build_libkms_against_in_tree_drm:
-    - Build libkms against in-tree headers and link against libdrm as it
-      uses symbols from libdrm.
 
   [ Robert Hooker ]
   * New upstream release.
diff --git a/debian/patches/02_build_libkms_against_in_tree_drm.diff b/debian/patches/02_build_libkms_against_in_tree_drm.diff
deleted file mode 100644
index a80d734..0000000
--- a/debian/patches/02_build_libkms_against_in_tree_drm.diff
+++ /dev/null
@@ -1,25 +0,0 @@
-Description: Build libkms against in-tree xf86drm.h header
- libkms requires xf86drm.h, and uses symbols from libdrm.  Add
- an appropriate search path to CFLAGS, and libdrm to LIBADD.
-Author: Christopher Halse Rogers <christopher.halse.rogers@canonical.com>
-Bug: https://bugs.freedesktop.org/show_bug.cgi?id=26852
-
-Index: libdrm/libkms/Makefile.am
-===================================================================
---- libdrm.orig/libkms/Makefile.am	2010-05-26 16:35:15.092706440 +1000
-+++ libdrm/libkms/Makefile.am	2010-05-26 16:42:41.722739824 +1000
-@@ -1,11 +1,12 @@
- AM_CFLAGS = \
- 	$(WARN_CFLAGS) \
--	-I$(top_srcdir)/include/drm
-+	-I$(top_srcdir)/include/drm \
-+	-I$(top_srcdir)
- 
- libkms_la_LTLIBRARIES = libkms.la
- libkms_ladir = $(libdir)
- libkms_la_LDFLAGS = -version-number 1:0:0 -no-undefined
--libkms_la_LIBADD =
-+libkms_la_LIBADD = ../libdrm.la
- 
- #if HAVE_LIBUDEV
- #libkms_la_LIBADD += $(LIBUDEV_LIBS)
diff --git a/debian/patches/series b/debian/patches/series
index e23f0b1..8ca2297 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1 @@
 01_default_perms.diff
-02_build_libkms_against_in_tree_drm.diff

commit cf0a21ccc817eb8c110b75cb237283fe0eed02e3
Author: Robert Hooker <sarvatt@ubuntu.com>
Date:   Thu Jun 10 14:48:31 2010 -0400

    Bump changelogs.

diff --git a/ChangeLog b/ChangeLog
index ac0dc3c..d5a1664 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,283 @@
+commit 65ec8d7699267cc59777d531f545a82a14341480
+Author: Eric Anholt <eric@anholt.net>
+Date:   Thu Jun 10 08:59:05 2010 -0700
+
+    Bump version to 2.4.21 for release.
+
+commit b8c4e5836cf1eff3e8c666f24567bd4c2fa31140
+Author: Eric Anholt <eric@anholt.net>
+Date:   Thu Jun 10 09:03:41 2010 -0700
+
+    Fix radeon distcheck.
+
+commit 4f7704aea76b3d93d997d2ff815541d0ac373535
+Author: Eric Anholt <eric@anholt.net>
+Date:   Thu Jun 10 08:58:08 2010 -0700
+
+    intel: Fix several other paths for buffers pointing at themselves.
+
+commit 0ec768e67aec8b1ded9bcf575ad1c0beb28cc0ca
+Author: Eric Anholt <eric@anholt.net>
+Date:   Fri Jun 4 17:09:11 2010 -0700
+
+    intel: Add more intermediate sizes of cache buckets between powers of 2.
+    
+    We had two cases recently where the rounding to powers of two hurt
+    badly: 4:2:0 YUV HD video frames would round up from 2.2MB to 4MB, and
+    Urban Terror was hitting aperture size limitations.  For UT, this is
+    because mipmap trees for power of two texture sizes will land right in
+    the middle between two cache buckets.
+    
+    By giving a few more sizes between powers of two, Urban Terror on my
+    945 ends up consuming 207MB of GEM objects instead of 272MB, and HD
+    video decode on Ironlake goes from 99MB to 75MB.
+    
+    cairo-perf-diff of the benchmarks for gl and xlib shows a 1.09x and
+    1.06x speedup and a 1.07x, 1.08x, and 1.11x slowdown.  From this, I
+    think this patch was really a no-op in terms of performance for these
+    CPU-bound workloads.
+
+commit e65caeba9ed0e6c53830d944248aaae2228351ab
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Wed Jun 9 10:08:41 2010 +0100
+
+    intel: Convert to untiled pitches if surface is too large for tiling.
+    
+    If the pitch is too large for the hardware to tile, recompute the
+    required surface size based on the untiled pitch and alignments. For the
+    older hardware, which has smaller limits and greater restrictions, this
+    may be a considerable saving in allocation size.
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit f179137f8f5bf272b79266575121c7a04038290c
+Author: Eric Anholt <eric@anholt.net>
+Date:   Mon Jun 7 14:22:36 2010 -0700
+
+    Allow a buffer to point at itself and still get relocs.
+    
+    I'm using this in experiments with the i965 Mesa driver.
+
+commit 66375fd6e8d3e95df5d124883a1426460c1b8ed8
+Author: Zou Nan hai <nanhai.zou@intel.com>
+Date:   Wed Jun 2 10:07:37 2010 +0800
+
+    intel: Add support for kernel multi-ringbuffer API.
+    
+    This introduces a new API to exec on BSD ring buffer, for H.264 VLD
+    decoding.
+    
+    Signed-off-by: Xiang Hai hao <haihao.xiang@intel.com>
+    Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
+
+commit 73a42a645201a85ce2fe4fc77754df67e5097fc9
+Author: Jesse Barnes <jbarnes@jbarnes-asus.(none)>
+Date:   Wed Jun 2 18:27:24 2010 -0700
+
+    add vbltest to .gitignore
+
+commit ae57dcf6e063860200b7949d5e2365e80ac4aea7
+Author: Daniel Stone <daniel@fooishbar.org>
+Date:   Tue Jun 1 19:23:42 2010 +0100
+
+    libkms: Fix include paths
+    
+    Otherwise xf86drm.h isn't found, or the wrong one.
+
+commit 607e228c263d5d171bd0615d5d93202dda371e5f
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue May 25 20:13:37 2010 -0700
+
+    Enable silent automake rules.
+
+commit 58e54f62c91aff4f4be96c6d8771ca9110969f49
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue May 25 20:11:23 2010 -0700
+
+    intel_bufmgr_fake: fix compile warning.
+
+commit fcf3e616eeeb289f96af1436d809f0a1a42bebb7
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Mon May 24 18:35:41 2010 +0100
+
+    intel: Don't change tiling mode unless the kernel reports success.
+    
+    Fixes:
+    
+      Bug 26686 - Some textures are distorted with libdrm 2.4.18 in GTAVC&GTA3
+      http://bugs.freedesktop.org/show_bug.cgi?id=26686
+    
+    This bug continues to haunt me. The kernel SET_TILING ioctl is
+    inconsistent in its return values when reporting an error. If one of its
+    sanity checks fail, then the input values are left unchanged. If the
+    kernel later fails to change the tiling mode, then the input values are
+    modified to match the current tiling on the object. In short, userspace
+    cannot trust the return values upon error and so we must assume that
+    upon error our current tiling mode matches reality and not update.
+
+commit a3305b076c005e0d3bd55da0214e91413cf65b48
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Thu May 13 08:24:28 2010 +0100
+
+    Revert "intel: We don't need to take the bufmgr lock whilst mapping."
+    
+    This reverts commit 7ca558494dd3f68f29bb6ca981de9b8f49620b60.
+    
+    This was pushed ahead of an essential review of bo level locking in
+    mesa, without which we cannot know whether removing this lock is safe.
+
+commit 52a3e9df629952e58bd019b8cd4cda1dd254a543
+Author: Jonathan Callen <abcd@gentoo.org>
+Date:   Wed May 12 13:55:34 2010 -0400
+
+    Only build tests in make check
+    
+    Currently, all the tests for libdrm are built during 'make all', even
+    if you do not wish to run tests.  Attached is a patch, based on
+    version 2.4.15, to make the tests build in 'make check'.
+
+commit 62731b84114e5dd3310b465921955db14278c256
+Author: Kristian Høgsberg <krh@bitplanet.net>
+Date:   Wed May 12 13:34:25 2010 -0400
+
+    Pull in new kernel headers
+    
+    Changes struct drm_mode_crtc_page_flip to use __u32 instead of uint32_t,
+    fixes
+    
+    https://bugs.freedesktop.org/show_bug.cgi?id=26994
+
+commit 07e7589d86624e9c1ca4c38d00cf6886e1445ae2
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Tue May 11 08:54:06 2010 +0100
+
+    intel: query whether a buffer is reusable.
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 7ca558494dd3f68f29bb6ca981de9b8f49620b60
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Thu Apr 1 17:15:39 2010 +0100
+
+    intel: We don't need to take the bufmgr lock whilst mapping.
+
+commit 6293152eb065016a2e5e4fcd047c2db5c2fb0f36
+Author: Michel Dänzer <daenzer@vmware.com>
+Date:   Wed Apr 28 08:25:30 2010 +0200
+
+    vbltest: Doesn't need intel stuff.
+    
+    Fixes build without libdrm_intel.
+
+commit c42d1a10e37cc2ff378511a058b89a6f8eddf1c0
+Author: Jesse Barnes <jbarnes@jbarnes-acer.(none)>
+Date:   Tue Apr 27 15:43:20 2010 -0400
+
+    tests: add new vblank test
+    
+    Simple test for event frequency.
+
+commit af98ccf4dd5dcb1b904ec32b9bd1521e6bf7dda5
+Author: Marek Olšák <maraeo@gmail.com>
+Date:   Mon Apr 26 20:06:53 2010 +0200
+
+    radeon: use the const qualifier in radeon_cs_write_table
+    
+    Signed-off-by: Marek Olšák <maraeo@gmail.com>
+
+commit c9065c5963db1b8196d278c47b8da2c33a3c49d1
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Apr 16 17:34:11 2010 -0700
+
+    Correct the Solaris definitions of atomic_add & atomic_dec
+    
+    The #defines added in 966c9907c040b4fe4b288b4a9d82598797aee743 were
+    mapping these to functions that don't exist.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 3c7ae8abe1eee1b1231f7c81e9898485940901c7
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Apr 16 10:12:37 2010 -0700
+
+    Make libkms build default OS-dependent
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 3506173ba7e726a9d0a17ec42734a925a885b01e
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Sun Apr 11 18:40:38 2010 +0100
+
+    intel: Use the correct size when allocating reloc_target_info array
+    
+    Thomas tracked down this error with kdm and commit b509640:
+    
+    ==4320== Invalid write of size 8
+    ==4320==    at 0x9A97998: do_bo_emit_reloc (in /usr/lib/libdrm_intel.so.1.0.0)
+    ==4320==    by 0x9A97B9C: drm_intel_gem_bo_emit_reloc (in /usr/lib/libdrm_intel.so.1.0.0)
+    ==4320==    by 0xAED3234: intel_batchbuffer_emit_reloc (in /usr/lib/xorg/modules/dri/i965_dri.so)
+    ==4320==    by 0xAF13827: brw_emit_vertices (in /usr/lib/xorg/modules/dri/i965_dri.so)
+    ==4320==    by 0xAF1F14D: brw_upload_state (in /usr/lib/xorg/modules/dri/i965_dri.so)
+    ==4320==    by 0xAF12122: brw_draw_prims (in /usr/lib/xorg/modules/dri/i965_dri.so)
+    ==4320==    by 0xB256824: vbo_exec_vtx_flush (in /usr/lib/xorg/modules/dri/libdricore.so)
+    ==4320==    by 0xB2523BB: vbo_exec_FlushVertices_internal (in /usr/lib/xorg/modules/dri/libdricore.so)
+    ==4320==    by 0xB252411: vbo_exec_FlushVertices (in /usr/lib/xorg/modules/dri/libdricore.so)
+    ==4320==    by 0xB195A3D: _mesa_PopAttrib (in /usr/lib/xorg/modules/dri/libdricore.so)
+    ==4320==    by 0x8DF0F02: __glXDisp_Render (in /usr/lib/xorg/modules/extensions/libglx.xorg)
+    ==4320==    by 0x8DF517F: __glXDispatch (in /usr/lib/xorg/modules/extensions/libglx.xorg)
+    ==4320==  Address 0x126a8b80 is 0 bytes after a block of size 16,368 alloc'd
+    ==4320==    at 0x4C23E03: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
+    ==4320==    by 0x9A97A64: do_bo_emit_reloc (in /usr/lib/libdrm_intel.so.1.0.0)
+    ==4320==    by 0x9A97B9C: drm_intel_gem_bo_emit_reloc (in /usr/lib/libdrm_intel.so.1.0.0)
+    ==4320==    by 0xAED3234: intel_batchbuffer_emit_reloc (in /usr/lib/xorg/modules/dri/i965_dri.so)
+    ==4320==    by 0xAF191DB: upload_binding_table_pointers (in /usr/lib/xorg/modules/dri/i965_dri.so)
+    ==4320==    by 0xAF1F14D: brw_upload_state (in /usr/lib/xorg/modules/dri/i965_dri.so)
+    ==4320==    by 0xAF12122: brw_draw_prims (in /usr/lib/xorg/modules/dri/i965_dri.so)
+    ==4320==    by 0xB255EF6: vbo_exec_DrawArrays (in /usr/lib/xorg/modules/dri/libdricore.so)
+    ==4320==    by 0x8DF67A3: __glXDisp_DrawArrays (in /usr/lib/xorg/modules/extensions/libglx.xorg)
+    ==4320==    by 0x8DF0F02: __glXDisp_Render (in /usr/lib/xorg/modules/extensions/libglx.xorg)
+    ==4320==    by 0x8DF517F: __glXDispatch (in /usr/lib/xorg/modules/extensions/libglx.xorg)
+    ==4320==    by 0x446293: ??? (in /usr/bin/Xorg)
+    
+    which is simply due to only allocating space for the pointers and not
+    the structs themselves. D'oh.
+    
+    Reported-by: Thomas Bächler <thomas@archlinux.org>
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 894c86e8400f13f1ee0dfe23ca4b5f98c32d9223
+Author: Kristian Høgsberg <krh@bitplanet.net>
+Date:   Fri Apr 9 16:33:38 2010 -0400
+
+    Revert "Fix pkgconfig includes for /usr/include/drm"
+    
+    This reverts commit 245d6957794648d7fd83279c680fed6e4c262147.
+    
+    libdrm now install headers in ${includedir}/libdrm and /usr/include/drm
+    is reserved for the kernel headers.  We should only ever add one of these
+    to the CFLAGS.
+
+commit 204c76c4d62c06eceacd9d603f2bc3e2f8e84270
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date:   Fri Apr 9 20:38:34 2010 +1000
+
+    nouveau: stop shipping nouveau_class.h
+    
+    The motivation behind this is that by shipping it here, it's essentially
+    an API which causes issues while bisecting across changes to the header
+    files.
+
+commit 78de69713d742645c1c4347a06afca5b38f97184
+Author: Jerome Glisse <jglisse@redhat.com>
+Date:   Thu Apr 8 17:50:34 2010 +0200
+
+    drm/radeon: add new cs command stream dumping facilities
+    
+    Dump command stream + associated bo into a binary file
+    which follow a similar design as json file. It allows
+    to intercept a command stream and replay it in a standalone
+    program (see radeondb tools).
+
 commit c7650003c52ee29b7fa5ebf20dd134079f0b8488
 Author: Jesse Barnes <jbarnes@virtuousgeek.org>
 Date:   Fri Apr 2 13:46:41 2010 -0700
diff --git a/debian/changelog b/debian/changelog
index 13a3d41..026aa47 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
-libdrm (2.4.20-4) UNRELEASED; urgency=low
+libdrm (2.4.21-1) UNRELEASED; urgency=low
 
+  [ Christopher James Halse Rogers ]
   * debian/rules:
     - Add libkms to build
     - Build vmwgfx experimental API.  The drm module is available in the 2.6.34
@@ -10,7 +11,10 @@ libdrm (2.4.20-4) UNRELEASED; urgency=low
     - Build libkms against in-tree headers and link against libdrm as it
       uses symbols from libdrm.
 
- -- Christopher James Halse Rogers <raof@ubuntu.com>  Wed, 26 May 2010 17:03:23 +1000
+  [ Robert Hooker ]
+  * New upstream release.
+
+ -- Robert Hooker <sarvatt@ubuntu.com>  Thu, 10 Jun 2010 14:44:36 -0400
 
 libdrm (2.4.20-3) experimental; urgency=low
 

commit 65ec8d7699267cc59777d531f545a82a14341480
Author: Eric Anholt <eric@anholt.net>
Date:   Thu Jun 10 08:59:05 2010 -0700

    Bump version to 2.4.21 for release.

diff --git a/configure.ac b/configure.ac
index e953199..62db817 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,7 +19,7 @@
 #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 AC_PREREQ(2.60)
-AC_INIT([libdrm], 2.4.20, [dri-devel@lists.sourceforge.net], libdrm)
+AC_INIT([libdrm], 2.4.21, [dri-devel@lists.sourceforge.net], libdrm)
 AC_USE_SYSTEM_EXTENSIONS
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([dist-bzip2])

commit b8c4e5836cf1eff3e8c666f24567bd4c2fa31140
Author: Eric Anholt <eric@anholt.net>
Date:   Thu Jun 10 09:03:41 2010 -0700

    Fix radeon distcheck.

diff --git a/radeon/Makefile.am b/radeon/Makefile.am
index 03b5040..dc94b5f 100644
--- a/radeon/Makefile.am
+++ b/radeon/Makefile.am
@@ -40,7 +40,8 @@ libdrm_radeon_la_SOURCES = \
 	radeon_cs_space.c \
 	radeon_bo.c \
 	radeon_cs.c \
-	bof.c
+	bof.c \
+	bof.h
 
 libdrm_radeonincludedir = ${includedir}/libdrm
 libdrm_radeoninclude_HEADERS = \

commit 4f7704aea76b3d93d997d2ff815541d0ac373535
Author: Eric Anholt <eric@anholt.net>
Date:   Thu Jun 10 08:58:08 2010 -0700

    intel: Fix several other paths for buffers pointing at themselves.

diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 33f9b44..a8e072d 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -859,9 +859,11 @@ drm_intel_gem_bo_unreference_final(drm_intel_bo *bo, time_t time)
 
 	/* Unreference all the target buffers */
 	for (i = 0; i < bo_gem->reloc_count; i++) {
-		drm_intel_gem_bo_unreference_locked_timed(bo_gem->
-							  reloc_target_info[i].bo,
-							  time);
+		if (bo_gem->reloc_target_info[i].bo != bo) {
+			drm_intel_gem_bo_unreference_locked_timed(bo_gem->
+								  reloc_target_info[i].bo,
+								  time);
+		}
 	}
 	bo_gem->reloc_count = 0;
 	bo_gem->used_as_reloc_target = 0;
@@ -1345,7 +1347,8 @@ do_bo_emit_reloc(drm_intel_bo *bo, uint32_t offset,
 	bo_gem->relocs[bo_gem->reloc_count].presumed_offset = target_bo->offset;
 
 	bo_gem->reloc_target_info[bo_gem->reloc_count].bo = target_bo;
-	drm_intel_gem_bo_reference(target_bo);
+	if (target_bo != bo)
+		drm_intel_gem_bo_reference(target_bo);
 	if (need_fence)
 		bo_gem->reloc_target_info[bo_gem->reloc_count].flags =
 			DRM_INTEL_RELOC_FENCE;
@@ -1967,6 +1970,8 @@ _drm_intel_gem_bo_references(drm_intel_bo *bo, drm_intel_bo *target_bo)
 	for (i = 0; i < bo_gem->reloc_count; i++) {
 		if (bo_gem->reloc_target_info[i].bo == target_bo)
 			return 1;
+		if (bo == bo_gem->reloc_target_info[i].bo)
+			continue;
 		if (_drm_intel_gem_bo_references(bo_gem->reloc_target_info[i].bo,
 						target_bo))
 			return 1;

commit 0ec768e67aec8b1ded9bcf575ad1c0beb28cc0ca
Author: Eric Anholt <eric@anholt.net>
Date:   Fri Jun 4 17:09:11 2010 -0700

    intel: Add more intermediate sizes of cache buckets between powers of 2.
    
    We had two cases recently where the rounding to powers of two hurt
    badly: 4:2:0 YUV HD video frames would round up from 2.2MB to 4MB, and
    Urban Terror was hitting aperture size limitations.  For UT, this is
    because mipmap trees for power of two texture sizes will land right in
    the middle between two cache buckets.
    
    By giving a few more sizes between powers of two, Urban Terror on my
    945 ends up consuming 207MB of GEM objects instead of 272MB, and HD
    video decode on Ironlake goes from 99MB to 75MB.
    
    cairo-perf-diff of the benchmarks for gl and xlib shows a 1.09x and
    1.06x speedup and a 1.07x, 1.08x, and 1.11x slowdown.  From this, I
    think this patch was really a no-op in terms of performance for these
    CPU-bound workloads.

diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 861cf0e..33f9b44 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -66,6 +66,8 @@
 		fprintf(stderr, __VA_ARGS__);		\
 } while (0)
 
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
 typedef struct _drm_intel_bo_gem drm_intel_bo_gem;
 
 struct drm_intel_gem_bo_bucket {
@@ -73,10 +75,6 @@ struct drm_intel_gem_bo_bucket {
 	unsigned long size;
 };
 
-/* Only cache objects up to 64MB.  Bigger than that, and the rounding of the
- * size makes many operations fail that wouldn't otherwise.
- */
-#define DRM_INTEL_GEM_BO_BUCKETS	14
 typedef struct _drm_intel_bufmgr_gem {
 	drm_intel_bufmgr bufmgr;
 
@@ -93,7 +91,8 @@ typedef struct _drm_intel_bufmgr_gem {
 	int exec_count;
 
 	/** Array of lists of cached gem objects of power-of-two sizes */
-	struct drm_intel_gem_bo_bucket cache_bucket[DRM_INTEL_GEM_BO_BUCKETS];
+	struct drm_intel_gem_bo_bucket cache_bucket[14 * 4];
+	int num_buckets;
 
 	uint64_t gtt_size;
 	int available_fences;
@@ -285,7 +284,7 @@ drm_intel_gem_bo_bucket_for_size(drm_intel_bufmgr_gem *bufmgr_gem,
 {
 	int i;
 
-	for (i = 0; i < DRM_INTEL_GEM_BO_BUCKETS; i++) {
+	for (i = 0; i < bufmgr_gem->num_buckets; i++) {
 		struct drm_intel_gem_bo_bucket *bucket =
 		    &bufmgr_gem->cache_bucket[i];
 		if (bucket->size >= size) {
@@ -830,7 +829,7 @@ drm_intel_gem_cleanup_bo_cache(drm_intel_bufmgr_gem *bufmgr_gem, time_t time)
 {
 	int i;
 
-	for (i = 0; i < DRM_INTEL_GEM_BO_BUCKETS; i++) {
+	for (i = 0; i < bufmgr_gem->num_buckets; i++) {
 		struct drm_intel_gem_bo_bucket *bucket =
 		    &bufmgr_gem->cache_bucket[i];
 
@@ -1258,7 +1257,7 @@ drm_intel_bufmgr_gem_destroy(drm_intel_bufmgr *bufmgr)
 	pthread_mutex_destroy(&bufmgr_gem->lock);
 
 	/* Free any cached buffer objects we were going to reuse */
-	for (i = 0; i < DRM_INTEL_GEM_BO_BUCKETS; i++) {
+	for (i = 0; i < bufmgr_gem->num_buckets; i++) {
 		struct drm_intel_gem_bo_bucket *bucket =
 		    &bufmgr_gem->cache_bucket[i];
 		drm_intel_bo_gem *bo_gem;
@@ -1989,6 +1988,45 @@ drm_intel_gem_bo_references(drm_intel_bo *bo, drm_intel_bo *target_bo)
 	return 0;
 }
 
+static void
+add_bucket(drm_intel_bufmgr_gem *bufmgr_gem, int size)
+{
+	unsigned int i = bufmgr_gem->num_buckets;
+
+	assert(i < ARRAY_SIZE(bufmgr_gem->cache_bucket));
+
+	DRMINITLISTHEAD(&bufmgr_gem->cache_bucket[i].head);
+	bufmgr_gem->cache_bucket[i].size = size;
+	bufmgr_gem->num_buckets++;
+}
+
+static void
+init_cache_buckets(drm_intel_bufmgr_gem *bufmgr_gem)
+{
+	unsigned long size, cache_max_size = 64 * 1024 * 1024;
+
+	/* OK, so power of two buckets was too wasteful of memory.
+	 * Give 3 other sizes between each power of two, to hopefully
+	 * cover things accurately enough.  (The alternative is
+	 * probably to just go for exact matching of sizes, and assume
+	 * that for things like composited window resize the tiled
+	 * width/height alignment and rounding of sizes to pages will
+	 * get us useful cache hit rates anyway)
+	 */
+	add_bucket(bufmgr_gem, 4096);
+	add_bucket(bufmgr_gem, 4096 * 2);
+	add_bucket(bufmgr_gem, 4096 * 3);
+
+	/* Initialize the linked lists for BO reuse cache. */
+	for (size = 4 * 4096; size <= cache_max_size; size *= 2) {
+		add_bucket(bufmgr_gem, size);
+
+		add_bucket(bufmgr_gem, size + size * 1 / 4);
+		add_bucket(bufmgr_gem, size + size * 2 / 4);
+		add_bucket(bufmgr_gem, size + size * 3 / 4);
+	}
+}
+
 /**
  * Initializes the GEM buffer manager, which uses the kernel to allocate, map,
  * and manage map buffer objections.
@@ -2001,8 +2039,7 @@ drm_intel_bufmgr_gem_init(int fd, int batch_size)
 	drm_intel_bufmgr_gem *bufmgr_gem;
 	struct drm_i915_gem_get_aperture aperture;
 	drm_i915_getparam_t gp;
-	int ret, i;
-	unsigned long size;
+	int ret;
 	int exec2 = 0, has_bsd = 0;
 
 	bufmgr_gem = calloc(1, sizeof(*bufmgr_gem));
@@ -2128,11 +2165,7 @@ drm_intel_bufmgr_gem_init(int fd, int batch_size)
 	    drm_intel_gem_get_pipe_from_crtc_id;
 	bufmgr_gem->bufmgr.bo_references = drm_intel_gem_bo_references;
 
-	/* Initialize the linked lists for BO reuse cache. */
-	for (i = 0, size = 4096; i < DRM_INTEL_GEM_BO_BUCKETS; i++, size *= 2) {
-		DRMINITLISTHEAD(&bufmgr_gem->cache_bucket[i].head);
-		bufmgr_gem->cache_bucket[i].size = size;
-	}
+	init_cache_buckets(bufmgr_gem);
 
 	return &bufmgr_gem->bufmgr;
 }

commit e65caeba9ed0e6c53830d944248aaae2228351ab
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jun 9 10:08:41 2010 +0100

    intel: Convert to untiled pitches if surface is too large for tiling.
    
    If the pitch is too large for the hardware to tile, recompute the
    required surface size based on the untiled pitch and alignments. For the
    older hardware, which has smaller limits and greater restrictions, this
    may be a considerable saving in allocation size.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index b125c12..861cf0e 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -689,31 +689,39 @@ drm_intel_gem_bo_alloc_tiled(drm_intel_bufmgr *bufmgr, const char *name,
 {
 	drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr;
 	drm_intel_bo *bo;
-	unsigned long size, stride, aligned_y = y;
+	unsigned long size, stride;
+	uint32_t tiling;
 	int ret;
 
-	/* If we're tiled, our allocations are in 8 or 32-row blocks,
-	 * so failure to align our height means that we won't allocate
-	 * enough pages.
-	 *
-	 * If we're untiled, we still have to align to 2 rows high
-	 * because the data port accesses 2x2 blocks even if the
-	 * bottom row isn't to be rendered, so failure to align means
-	 * we could walk off the end of the GTT and fault.  This is
-	 * documented on 965, and may be the case on older chipsets
-	 * too so we try to be careful.
-	 */
-	if (*tiling_mode == I915_TILING_NONE)
-		aligned_y = ALIGN(y, 2);
-	else if (*tiling_mode == I915_TILING_X)
-		aligned_y = ALIGN(y, 8);
-	else if (*tiling_mode == I915_TILING_Y)
-		aligned_y = ALIGN(y, 32);
-
-	stride = x * cpp;
-	stride = drm_intel_gem_bo_tile_pitch(bufmgr_gem, stride, *tiling_mode);
-	size = stride * aligned_y;
-	size = drm_intel_gem_bo_tile_size(bufmgr_gem, size, tiling_mode);
+	do {
+		unsigned long aligned_y;
+
+		tiling = *tiling_mode;
+
+		/* If we're tiled, our allocations are in 8 or 32-row blocks,
+		 * so failure to align our height means that we won't allocate
+		 * enough pages.
+		 *
+		 * If we're untiled, we still have to align to 2 rows high
+		 * because the data port accesses 2x2 blocks even if the
+		 * bottom row isn't to be rendered, so failure to align means
+		 * we could walk off the end of the GTT and fault.  This is
+		 * documented on 965, and may be the case on older chipsets
+		 * too so we try to be careful.
+		 */
+		aligned_y = y;
+		if (tiling == I915_TILING_NONE)
+			aligned_y = ALIGN(y, 2);
+		else if (tiling == I915_TILING_X)
+			aligned_y = ALIGN(y, 8);
+		else if (tiling == I915_TILING_Y)
+			aligned_y = ALIGN(y, 32);
+
+		stride = x * cpp;
+		stride = drm_intel_gem_bo_tile_pitch(bufmgr_gem, stride, tiling);
+		size = stride * aligned_y;
+		size = drm_intel_gem_bo_tile_size(bufmgr_gem, size, tiling_mode);
+	} while (*tiling_mode != tiling);
 
 	bo = drm_intel_gem_bo_alloc_internal(bufmgr, name, size, flags);
 	if (!bo)

commit f179137f8f5bf272b79266575121c7a04038290c
Author: Eric Anholt <eric@anholt.net>
Date:   Mon Jun 7 14:22:36 2010 -0700

    Allow a buffer to point at itself and still get relocs.
    
    I'm using this in experiments with the i965 Mesa driver.

diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 398c7d0..b125c12 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -1316,7 +1316,10 @@ do_bo_emit_reloc(drm_intel_bo *bo, uint32_t offset,
 	 * already been accounted for.
 	 */
 	assert(!bo_gem->used_as_reloc_target);
-	bo_gem->reloc_tree_size += target_bo_gem->reloc_tree_size;
+	if (target_bo_gem != bo_gem) {
+		target_bo_gem->used_as_reloc_target = 1;
+		bo_gem->reloc_tree_size += target_bo_gem->reloc_tree_size;
+	}
 	/* An object needing a fence is a tiled buffer, so it won't have
 	 * relocs to other buffers.
 	 */
@@ -1325,7 +1328,6 @@ do_bo_emit_reloc(drm_intel_bo *bo, uint32_t offset,
 	bo_gem->reloc_tree_fences += target_bo_gem->reloc_tree_fences;
 
 	/* Flag the target to disallow further relocations in it. */
-	target_bo_gem->used_as_reloc_target = 1;
 
 	bo_gem->relocs[bo_gem->reloc_count].offset = offset;
 	bo_gem->relocs[bo_gem->reloc_count].delta = target_offset;
@@ -1387,6 +1389,9 @@ drm_intel_gem_bo_process_reloc(drm_intel_bo *bo)
 	for (i = 0; i < bo_gem->reloc_count; i++) {
 		drm_intel_bo *target_bo = bo_gem->reloc_target_info[i].bo;
 
+		if (target_bo == bo)
+			continue;
+
 		/* Continue walking the tree depth-first. */
 		drm_intel_gem_bo_process_reloc(target_bo);
 
@@ -1408,6 +1413,9 @@ drm_intel_gem_bo_process_reloc2(drm_intel_bo *bo)
 		drm_intel_bo *target_bo = bo_gem->reloc_target_info[i].bo;
 		int need_fence;
 
+		if (target_bo == bo)
+			continue;
+
 		/* Continue walking the tree depth-first. */
 		drm_intel_gem_bo_process_reloc2(target_bo);
 

commit 66375fd6e8d3e95df5d124883a1426460c1b8ed8
Author: Zou Nan hai <nanhai.zou@intel.com>
Date:   Wed Jun 2 10:07:37 2010 +0800

    intel: Add support for kernel multi-ringbuffer API.
    
    This introduces a new API to exec on BSD ring buffer, for H.264 VLD
    decoding.
    
    Signed-off-by: Xiang Hai hao <haihao.xiang@intel.com>
    Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>

diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
index c8cb3a6..c040afa 100644
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
@@ -275,6 +275,7 @@ typedef struct drm_i915_irq_wait {
 #define I915_PARAM_HAS_OVERLAY           7
 #define I915_PARAM_HAS_PAGEFLIPPING	 8
 #define I915_PARAM_HAS_EXECBUF2          9
+#define I915_PARAM_HAS_BSD		 10
 
 typedef struct drm_i915_getparam {
 	int param;
@@ -616,7 +617,9 @@ struct drm_i915_gem_execbuffer2 {
 	__u32 num_cliprects;
 	/** This is a struct drm_clip_rect *cliprects */
 	__u64 cliprects_ptr;
-	__u64 flags; /* currently unused */
+#define I915_EXEC_RENDER		(1 << 0)
+#define I915_EXEC_BSD			(1 << 1)
+	__u64 flags;
 	__u64 rsvd1;
 	__u64 rsvd2;
 };
diff --git a/intel/intel_bufmgr.c b/intel/intel_bufmgr.c
index 9144fdd..2b4e888 100644
--- a/intel/intel_bufmgr.c
+++ b/intel/intel_bufmgr.c
@@ -145,6 +145,19 @@ drm_intel_bo_exec(drm_intel_bo *bo, int used,
 	return bo->bufmgr->bo_exec(bo, used, cliprects, num_cliprects, DR4);
 }
 
+int
+drm_intel_bo_mrb_exec(drm_intel_bo *bo, int used,
+		drm_clip_rect_t *cliprects, int num_cliprects, int DR4,
+		int ring_flag)
+{
+	if (bo->bufmgr->bo_mrb_exec)
+		return bo->bufmgr->bo_mrb_exec(bo, used,
+					cliprects, num_cliprects, DR4,
+					ring_flag);
+
+	return -ENODEV;
+}
+
 void drm_intel_bufmgr_set_debug(drm_intel_bufmgr *bufmgr, int enable_debug)
 {
 	bufmgr->debug = enable_debug;
diff --git a/intel/intel_bufmgr.h b/intel/intel_bufmgr.h
index cbcddb6..65fd603 100644
--- a/intel/intel_bufmgr.h
+++ b/intel/intel_bufmgr.h
@@ -106,6 +106,9 @@ void drm_intel_bufmgr_set_debug(drm_intel_bufmgr *bufmgr, int enable_debug);
 void drm_intel_bufmgr_destroy(drm_intel_bufmgr *bufmgr);
 int drm_intel_bo_exec(drm_intel_bo *bo, int used,
 		      drm_clip_rect_t * cliprects, int num_cliprects, int DR4);
+int drm_intel_bo_mrb_exec(drm_intel_bo *bo, int used,
+			drm_clip_rect_t *cliprects, int num_cliprects, int DR4,
+			int ring_flag);
 int drm_intel_bufmgr_check_aperture_space(drm_intel_bo ** bo_array, int count);
 
 int drm_intel_bo_emit_reloc(drm_intel_bo *bo, uint32_t offset,
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index b76fd7e..398c7d0 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -1530,14 +1530,17 @@ drm_intel_gem_bo_exec(drm_intel_bo *bo, int used,
 }
 
 static int
-drm_intel_gem_bo_exec2(drm_intel_bo *bo, int used,
-		       drm_clip_rect_t *cliprects, int num_cliprects,
-		       int DR4)
+drm_intel_gem_bo_mrb_exec2(drm_intel_bo *bo, int used,
+			drm_clip_rect_t *cliprects, int num_cliprects, int DR4,
+			int ring_flag)
 {
 	drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bo->bufmgr;
 	struct drm_i915_gem_execbuffer2 execbuf;
 	int ret, i;
 
+	if ((ring_flag != I915_EXEC_RENDER) && (ring_flag != I915_EXEC_BSD))
+		return -EINVAL;
+
 	pthread_mutex_lock(&bufmgr_gem->lock);
 	/* Update indices and set up the validate list. */
 	drm_intel_gem_bo_process_reloc2(bo);
@@ -1555,7 +1558,7 @@ drm_intel_gem_bo_exec2(drm_intel_bo *bo, int used,
 	execbuf.num_cliprects = num_cliprects;
 	execbuf.DR1 = 0;
 	execbuf.DR4 = DR4;
-	execbuf.flags = 0;
+	execbuf.flags = ring_flag;
 	execbuf.rsvd1 = 0;
 	execbuf.rsvd2 = 0;
 
@@ -1597,6 +1600,16 @@ drm_intel_gem_bo_exec2(drm_intel_bo *bo, int used,
 }
 
 static int
+drm_intel_gem_bo_exec2(drm_intel_bo *bo, int used,
+		       drm_clip_rect_t *cliprects, int num_cliprects,
+		       int DR4)
+{
+	return drm_intel_gem_bo_mrb_exec2(bo, used,
+					cliprects, num_cliprects, DR4,
+					I915_EXEC_RENDER);
+}
+
+static int
 drm_intel_gem_bo_pin(drm_intel_bo *bo, uint32_t alignment)
 {
 	drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr;
@@ -1974,7 +1987,7 @@ drm_intel_bufmgr_gem_init(int fd, int batch_size)
 	drm_i915_getparam_t gp;
 	int ret, i;
 	unsigned long size;
-	int exec2 = 0;
+	int exec2 = 0, has_bsd = 0;
 
 	bufmgr_gem = calloc(1, sizeof(*bufmgr_gem));
 	if (bufmgr_gem == NULL)
@@ -2023,6 +2036,11 @@ drm_intel_bufmgr_gem_init(int fd, int batch_size)
 	if (!ret)
 		exec2 = 1;
 
+	gp.param = I915_PARAM_HAS_BSD;
+	ret = ioctl(bufmgr_gem->fd, DRM_IOCTL_I915_GETPARAM, &gp);
+	if (!ret)
+		has_bsd = 1;
+
 	if (bufmgr_gem->gen < 4) {
 		gp.param = I915_PARAM_NUM_FENCES_AVAIL;
 		gp.value = &bufmgr_gem->available_fences;
@@ -2076,9 +2094,11 @@ drm_intel_bufmgr_gem_init(int fd, int batch_size)
 	bufmgr_gem->bufmgr.bo_set_tiling = drm_intel_gem_bo_set_tiling;
 	bufmgr_gem->bufmgr.bo_flink = drm_intel_gem_bo_flink;
 	/* Use the new one if available */


Reply to: