[arch-commits] Commit in libdrm/repos (3 files)

Jan de Groot jgc at archlinux.org
Thu May 28 17:02:08 EDT 2009


    Date: Thursday, May 28, 2009 @ 17:02:08
  Author: jgc
Revision: 40207

Merged revisions 40196 via svnmerge from 
svn+ssh://svn.archlinux.org/srv/svn-packages/libdrm/trunk

........
  r40196 | jgc | 2009-05-28 21:12:22 +0200 (Thu, 28 May 2009) | 2 lines
  
  upgpkg: libdrm 2.4.11-2
      limit intel bo cache
........

Added:
  libdrm/repos/extra-i686/intel-bo-cache.patch
    (from rev 40196, libdrm/trunk/intel-bo-cache.patch)
Modified:
  libdrm/repos/extra-i686/	(properties)
  libdrm/repos/extra-i686/PKGBUILD

----------------------+
 PKGBUILD             |    5 ++++-
 intel-bo-cache.patch |   40 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 1 deletion(-)


Property changes on: libdrm/repos/extra-i686
___________________________________________________________________
Modified: svnmerge-integrated
   - /libdrm/trunk:1-39830
   + /libdrm/trunk:1-40206

Modified: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD	2009-05-28 21:00:27 UTC (rev 40206)
+++ extra-i686/PKGBUILD	2009-05-28 21:02:08 UTC (rev 40207)
@@ -3,7 +3,7 @@
 
 pkgname=libdrm
 pkgver=2.4.11
-pkgrel=1
+pkgrel=2
 pkgdesc="Userspace interface to kernel DRM services"
 arch=(i686 x86_64)
 license=('custom')
@@ -12,14 +12,17 @@
 url="http://dri.freedesktop.org/"
 source=(http://dri.freedesktop.org/${pkgname}/${pkgname}-${pkgver}.tar.bz2
 	no-pthread-stubs.patch
+	intel-bo-cache.patch
 	COPYING)
 md5sums=('e0e66fae165d0b665b61e9516bf33ade'
          'e5f8f3b9f6357c2f82950cdfb8e9c9ec'
+	 '53e7c214f6fb9fea8deb1ba3bf9b13ed'
 	 'ba65e71c481b94ef0fb6c23c7f21ffa1')
 
 build() {
   cd "${srcdir}/${pkgname}-${pkgver}"
   patch -Np1 -i "${srcdir}/no-pthread-stubs.patch" || return 1
+  patch -Np1 -i "${srcdir}/intel-bo-cache.patch" || return 1
   libtoolize --force || return 1
   aclocal || return 1
   autoconf || return 1

Copied: libdrm/repos/extra-i686/intel-bo-cache.patch (from rev 40196, libdrm/trunk/intel-bo-cache.patch)
===================================================================
--- extra-i686/intel-bo-cache.patch	                        (rev 0)
+++ extra-i686/intel-bo-cache.patch	2009-05-28 21:02:08 UTC (rev 40207)
@@ -0,0 +1,40 @@
+From 469655fab7a56eb32ff8cdefb33992813342353a Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric at anholt.net>
+Date: Mon, 18 May 2009 23:07:45 +0000
+Subject: intel: Only do BO caching up to 64MB objects.
+
+This avoids making objects significantly bigger than they would be
+otherwise, which would result in some failing at binding to the GTT.
+Found from firefox hanging on:
+http://upload.wikimedia.org/wikipedia/commons/b/b7/Singapore_port_panorama.jpg
+due to a software fallback trying to do a GTT-mapped copy between two 73MB
+BOs that were instead each 128MB, and failing because both couldn't fit
+simultaneously.
+
+The cost here is that we get no opportunity to cache these objects and
+avoid the mapping.  But since the objects are a significant percentage
+of the aperture size, each mapped access is likely having to fault and rebind
+the object most of the time anyway.
+
+Bug #20152 (2/3)
+---
+diff --git a/libdrm/intel/intel_bufmgr_gem.c b/libdrm/intel/intel_bufmgr_gem.c
+index 61943f0..ef046f4 100644
+--- a/libdrm/intel/intel_bufmgr_gem.c
++++ b/libdrm/intel/intel_bufmgr_gem.c
+@@ -80,10 +80,10 @@ struct drm_intel_gem_bo_bucket {
+    int num_entries;
+ };
+ 
+-/* Arbitrarily chosen, 16 means that the maximum size we'll cache for reuse
+- * is 1 << 16 pages, or 256MB.
++/* 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	16
++#define DRM_INTEL_GEM_BO_BUCKETS	14
+ typedef struct _drm_intel_bufmgr_gem {
+     drm_intel_bufmgr bufmgr;
+ 
+--
+cgit v0.8.2



More information about the arch-commits mailing list