rpms/libdrm/F-11 libdrm-intel-limit-cachable-size.patch, NONE, 1.1 libdrm.spec, 1.76, 1.77

Kristian Høgsberg krh at fedoraproject.org
Wed May 20 21:37:21 UTC 2009


Author: krh

Update of /cvs/pkgs/rpms/libdrm/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv30953

Modified Files:
	libdrm.spec 
Added Files:
	libdrm-intel-limit-cachable-size.patch 
Log Message:
* Tue May 19 2009 Kristian Høgsberg <krh at redhat.com> - 2.4.6-7
- Add patch to limit cachable object size (#498131).


libdrm-intel-limit-cachable-size.patch:

--- NEW FILE libdrm-intel-limit-cachable-size.patch ---
>From 469655fab7a56eb32ff8cdefb33992813342353a Mon Sep 17 00:00:00 2001
From: Eric Anholt <eric at anholt.net>
Date: Mon, 18 May 2009 16:07:45 -0700
Subject: [PATCH] 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)
---
 libdrm/intel/intel_bufmgr_gem.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

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;
 
-- 
1.6.2.2



Index: libdrm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libdrm/F-11/libdrm.spec,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -p -r1.76 -r1.77
--- libdrm.spec	16 Apr 2009 23:41:38 -0000	1.76
+++ libdrm.spec	20 May 2009 21:36:51 -0000	1.77
@@ -3,7 +3,7 @@
 Summary: Direct Rendering Manager runtime library
 Name: libdrm
 Version: 2.4.6
-Release: 6%{?dist}
+Release: 7%{?dist}
 License: MIT
 Group: System Environment/Libraries
 URL: http://dri.sourceforge.net
@@ -33,6 +33,8 @@ Patch8: libdrm-radeon.patch
 # nouveau fixes from drm.git
 Patch9: nouveau-updates.patch
 
+Patch10: libdrm-intel-limit-cachable-size.patch
+
 %description
 Direct Rendering Manager runtime library
 
@@ -53,6 +55,7 @@ Direct Rendering Manager development pac
 %patch4 -p1 -b .no-bc
 %patch8 -p1 -b .radeon
 %patch9 -p1 -b .nouveau
+%patch10 -p1 -b .limit-cachable
 
 %build
 autoreconf -v --install || exit 1
@@ -112,6 +115,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/pkgconfig/libdrm_nouveau.pc
 
 %changelog
+* Tue May 19 2009 Kristian Høgsberg <krh at redhat.com> - 2.4.6-7
+- Add patch to limit cachable object size (#498131).
+
 * Fri Apr 17 2009 Ben Skeggs <bskeggs at redhat.com> 2.4.6-6
 - nouveau: post writes to pushbuf before incrementing PUT
 




More information about the scm-commits mailing list