ChangeLog | 142 +++++++++++++++++++++++++++++++++++++++ configure.ac | 2 debian/README.source | 73 ++++++++++++++++++++ debian/changelog | 12 +++ debian/control | 4 - debian/libdrm-intel1.symbols | 2 debian/rules | 2 debian/xsfbs/xsfbs.sh | 12 --- libdrm/Makefile.am | 1 libdrm/intel/intel_bufmgr.c | 16 ++++ libdrm/intel/intel_bufmgr.h | 4 + libdrm/intel/intel_bufmgr_fake.c | 2 libdrm/intel/intel_bufmgr_gem.c | 58 ++++++++++++++- libdrm/intel/intel_bufmgr_priv.h | 23 ++++++ libdrm/nouveau/nouveau_bo.c | 3 libdrm/nouveau/nouveau_dma.c | 1 libdrm/xf86drmMode.c | 3 shared-core/drm.h | 6 + shared-core/i915_drm.h | 10 ++ 19 files changed, 352 insertions(+), 24 deletions(-)
New commits: commit c283da2e66999831a5123fd5e5a5b5dbe4e8c106 Author: Julien Cristau <jcris...@debian.org> Date: Mon Jun 8 16:22:21 2009 +0200 Prepare changelog for upload diff --git a/debian/changelog b/debian/changelog index 9bc0cb2..f3d87a5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -libdrm (2.4.11-1) UNRELEASED; urgency=low +libdrm (2.4.11-1) unstable; urgency=low * New upstream release. * Also pull in additional fix for libdrm-intel: Only do BO caching up to @@ -8,7 +8,7 @@ libdrm (2.4.11-1) UNRELEASED; urgency=low * Remove Thierry Reding from Uploaders, he doesn't seem to be around anymore :( - -- Julien Cristau <jcris...@debian.org> Mon, 08 Jun 2009 16:04:56 +0200 + -- Julien Cristau <jcris...@debian.org> Mon, 08 Jun 2009 16:22:04 +0200 libdrm (2.4.9-2) unstable; urgency=low commit a7f3473bce6057ce77abe64938f221e9b0595acd Author: Julien Cristau <jcris...@debian.org> Date: Mon Jun 8 16:19:28 2009 +0200 Remove Thierry Reding from Uploaders He doesn't seem to be around anymore :( diff --git a/debian/changelog b/debian/changelog index 225b18f..9bc0cb2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ libdrm (2.4.11-1) UNRELEASED; urgency=low 64MB objects. * Update libdrm-intel1.symbols and bump shlibs. * Add README.source from xsfbs. Bump Standards-Version to 3.8.1. + * Remove Thierry Reding from Uploaders, he doesn't seem to be around anymore + :( -- Julien Cristau <jcris...@debian.org> Mon, 08 Jun 2009 16:04:56 +0200 diff --git a/debian/control b/debian/control index 57c82de..02666d2 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,7 @@ Source: libdrm Priority: optional Maintainer: Debian X Strike Force <debian-x@lists.debian.org> -Uploaders: Thierry Reding <thie...@gilfi.de>, Julien Cristau <jcris...@debian.org>, David Nusinow <dnusi...@debian.org>, Brice Goglin <bgog...@debian.org> +Uploaders: Julien Cristau <jcris...@debian.org>, David Nusinow <dnusi...@debian.org>, Brice Goglin <bgog...@debian.org> Build-Depends: debhelper (>= 5.0.0), libx11-dev, dpkg-dev (>= 1.13.19), quilt (>= 0.40), automake, libtool, pkg-config, libpthread-stubs0-dev Standards-Version: 3.8.1 Section: libs commit 59cd76c7478f49d3fe6731b019685c1a5f95a93f Author: Julien Cristau <jcris...@debian.org> Date: Mon Jun 8 16:18:16 2009 +0200 Bump Standards-Version diff --git a/debian/changelog b/debian/changelog index fcf116c..225b18f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ libdrm (2.4.11-1) UNRELEASED; urgency=low * Also pull in additional fix for libdrm-intel: Only do BO caching up to 64MB objects. * Update libdrm-intel1.symbols and bump shlibs. + * Add README.source from xsfbs. Bump Standards-Version to 3.8.1. -- Julien Cristau <jcris...@debian.org> Mon, 08 Jun 2009 16:04:56 +0200 diff --git a/debian/control b/debian/control index 27c095f..57c82de 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Priority: optional Maintainer: Debian X Strike Force <debian-x@lists.debian.org> Uploaders: Thierry Reding <thie...@gilfi.de>, Julien Cristau <jcris...@debian.org>, David Nusinow <dnusi...@debian.org>, Brice Goglin <bgog...@debian.org> Build-Depends: debhelper (>= 5.0.0), libx11-dev, dpkg-dev (>= 1.13.19), quilt (>= 0.40), automake, libtool, pkg-config, libpthread-stubs0-dev -Standards-Version: 3.7.3 +Standards-Version: 3.8.1 Section: libs Vcs-Git: git://git.debian.org/git/pkg-xorg/lib/libdrm Vcs-Browser: http://git.debian.org/?p=pkg-xorg/lib/libdrm.git commit 5f071fa9c06118f459d101c55d2c08978cc68a57 Author: Julien Cristau <jcris...@debian.org> Date: Mon Jun 8 16:15:20 2009 +0200 Update libdrm-intel1.symbols and bump shlibs. diff --git a/debian/changelog b/debian/changelog index 365e62b..fcf116c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ libdrm (2.4.11-1) UNRELEASED; urgency=low * New upstream release. * Also pull in additional fix for libdrm-intel: Only do BO caching up to 64MB objects. + * Update libdrm-intel1.symbols and bump shlibs. -- Julien Cristau <jcris...@debian.org> Mon, 08 Jun 2009 16:04:56 +0200 diff --git a/debian/libdrm-intel1.symbols b/debian/libdrm-intel1.symbols index 3f0c105..994f032 100644 --- a/debian/libdrm-intel1.symbols +++ b/debian/libdrm-intel1.symbols @@ -1,6 +1,7 @@ libdrm_intel.so.1 libdrm-intel1 #MINVER# drm_intel_bo_al...@base 2.4.1 drm_intel_bo_alloc_for_ren...@base 2.4.5 + drm_intel_bo_disable_re...@base 2.4.10 drm_intel_bo_emit_re...@base 2.4.1 drm_intel_bo_e...@base 2.4.1 drm_intel_bo_fake_alloc_sta...@base 2.4.1 @@ -32,6 +33,7 @@ libdrm_intel.so.1 libdrm-intel1 #MINVER# drm_intel_gem_bo_map_...@base 2.4.3 drm_intel_gem_bo_start_gtt_acc...@base 2.4.3 drm_intel_gem_bo_unmap_...@base 2.4.9 + drm_intel_get_pipe_from_crtc...@base 2.4.11 drm_mmalloc...@base 2.4.1 drm_mmdest...@base 2.4.1 drm_mmdumpmemi...@base 2.4.1 diff --git a/debian/rules b/debian/rules index 523b24d..e77bacf 100755 --- a/debian/rules +++ b/debian/rules @@ -105,7 +105,7 @@ binary-arch: build install dh_compress dh_fixperms dh_makeshlibs -plibdrm2 -V'libdrm2 (>= 2.4.3)' -- -c4 - dh_makeshlibs -plibdrm-intel1 -V'libdrm-intel1 (>= 2.4.9)' -- -c4 + dh_makeshlibs -plibdrm-intel1 -V'libdrm-intel1 (>= 2.4.11)' -- -c4 dh_installdeb dh_shlibdeps dh_gencontrol commit 25b00e91df7c2d288ed7809fa3698ca42ecc3480 Author: Julien Cristau <jcris...@debian.org> Date: Mon Jun 8 16:05:53 2009 +0200 Update changelogs diff --git a/ChangeLog b/ChangeLog index 2320e48..026de37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,145 @@ +commit f355ad89431c49355e626613e6fc29ef2e183dab +Author: Eric Anholt <e...@anholt.net> +Date: Tue May 19 10:07:16 2009 -0700 + + intel: quiet a warning. + +commit 469655fab7a56eb32ff8cdefb33992813342353a +Author: Eric Anholt <e...@anholt.net> +Date: Mon May 18 16:07:45 2009 -0700 + + 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) + +commit f57d7f4b0b14972f92a83f155ae8033478aa7729 +Author: Keith Packard <kei...@keithp.com> +Date: Thu May 14 16:58:14 2009 -0700 + + libdrm/intel: Make get_pipe_from_crtc_id per-bufmgr. Return -1 on failure. + + The convention is that all APIs are per-bufmgr, so make this one the same. + Then, have it return -1 on failure so that the application can know what's + going on and do something sensible. + + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit afd245dd7fd85cf3ffd3e6d5fe9711252aa2ed7f +Author: Carl Worth <cwo...@cworth.org> +Date: Wed Apr 29 14:43:55 2009 -0700 + + Add new drm_intel_get_pipe_from_crtc_id function. + + This wraps the new DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID ioctl, + allowing applications to discover the pipe number corresponding + to a given CRTC ID. This is necessary for doing pipe-specific + operations such as waiting for vblank on a given CRTC. + +commit 8b8e20e0f9900fae23baee55a91533a739c1a3ec +Author: Keith Packard <kei...@keithp.com> +Date: Tue May 12 15:33:28 2009 -0700 + + Bump to version 2.4.10 to mark addition of drm_intel_bo_disable_reuse + + New API, new version. + + Signed-off-by: Keith Packard <kei...@keithp.com> + Reviewed-by: Eric Anholt <e...@anholt.net> + +commit 5b5ce301287fb8ef74b45fad3c10b2d4ac3a9cc6 +Author: Keith Packard <kei...@keithp.com> +Date: Mon May 11 13:42:12 2009 -0700 + + libdrm/intel: add drm_intel_bo_disable_reuse api + + Scanout buffers need to be freed through the kernel as it holds a reference + to them; exposing this API allows applications allocating scanout buffers to + flag them as not reusable. + + Signed-off-by: Keith Packard <kei...@keithp.com> + Reviewed-by: Eric Anholt <e...@anholt.net> + +commit 628dc48a16ec6796ec5a81428e695837c51463d0 +Author: Alan Coopersmith <alan.coopersm...@sun.com> +Date: Mon Jun 9 17:03:28 2008 -0700 + + Use C99 versions of __FUNCTION__ & __volatile__ when not building with gcc + +commit 1bae8844cafd70f6196116f6e84b0f36c069e976 +Author: Alan Coopersmith <alan.coopersm...@sun.com> +Date: Sat May 9 17:21:29 2009 -0700 + + Delete extra libdrm_lists.h line after libdrm_la_SOURCES in libdrm/Makefile.am + + Signed-off-by: Alan Coopersmith <alan.coopersm...@sun.com> + +commit 94d48d038502097ebfa2e33e4a75b9e0e675231d +Author: Stuart Bennett <stu...@freedesktop.org> +Date: Wed May 6 23:56:51 2009 +0100 + + nouveau: backlight compat fix + + Avoid failure to build on old kernels with CONFIG_BACKLIGHT_CLASS_DEVICE set + +commit e2b5fde7f6ff412cadd9cad35ad051a028cf7fae +Author: Danny Tholen <moondr...@gmail.com> +Date: Wed May 6 23:41:09 2009 +0100 + + nouveau: fix ppc for swab changes in Linux 2.6.29 + +commit 68103b2758029b3c1fbfcf995baa758bfd2676de +Author: Keith Packard <kei...@keithp.com> +Date: Fri May 1 18:47:04 2009 -0700 + + libdrm/intel: assert that clients are using bo refcounting correctly + + Add assertions to drm_intel_gem_bo_reference, + drm_intel_gem_bo_reference_locked and drm_intel_gem_bo_unreference_locked + that the object has not been freed (refcount > 0). Mistakes in refcounting + lead to attempts to insert a bo into a free list more than once which causes + application failure as empty free lists are dereferenced as buffer objects. + + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit 11b60973bca1bc9bbda44be4c695e22d28d8ca4a +Author: Jesse Barnes <jbar...@virtuousgeek.org> +Date: Tue Apr 21 17:13:16 2009 -0700 + + intel: NULL fake bo block when freeing in evict_all + + Fixes assertion failures on later use of the object. + +commit 412d370b9ae4b2882691863a1c5e13a507574e92 +Author: Dave Airlie <airl...@linux.ie> +Date: Wed Apr 22 20:25:40 2009 +1000 + + libdrm/mode: align subpixel results + +commit a1e3ab9e55047c08a4006ec389c1a99b72bc672c +Author: Ben Skeggs <bske...@redhat.com> +Date: Fri Apr 17 09:29:19 2009 +1000 + + nouveau: write posting got lost somewhere, bring it back + +commit 78e753d03314e3aa92af8ec601e9dbb869a938d5 +Author: Ben Skeggs <bske...@redhat.com> +Date: Wed Apr 15 12:44:21 2009 +1000 + + nouveau: store bo handle in public struct in bo_ref_handle + commit 07646002c6835537c6ae44ef9b3f8480762279b8 Author: Jesse Barnes <jbar...@virtuousgeek.org> Date: Fri Apr 10 15:34:24 2009 -0700 diff --git a/debian/changelog b/debian/changelog index e21bec9..365e62b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +libdrm (2.4.11-1) UNRELEASED; urgency=low + + * New upstream release. + * Also pull in additional fix for libdrm-intel: Only do BO caching up to + 64MB objects. + + -- Julien Cristau <jcris...@debian.org> Mon, 08 Jun 2009 16:04:56 +0200 + libdrm (2.4.9-2) unstable; urgency=low * Ship all drm headers on kfreebsd, again. commit 8f72294ada477f003888b6776883c1dd98289f3f Author: Julien Cristau <jcris...@debian.org> Date: Wed Jun 3 03:37:37 2009 +0200 Kill custom readlink function This was needed for very, very old versions of debianutils. Closes: #498890 diff --git a/debian/xsfbs/xsfbs.sh b/debian/xsfbs/xsfbs.sh index 197eb74..781826f 100644 --- a/debian/xsfbs/xsfbs.sh +++ b/debian/xsfbs/xsfbs.sh @@ -303,16 +303,6 @@ EOF fi } -# we require a readlink command or shell function -if ! which readlink > /dev/null 2>&1; then - message "The readlink command was not found. Please install version" \ - "1.13.1 or later of the debianutils package." - readlink () { - # returns what symlink in $1 actually points to - perl -e '$l = shift; exit 1 unless -l $l; $r = readlink $l; exit 1 unless $r; print "$r\n"' "$1" - } -fi - check_symlink () { # syntax: check_symlink symlink # commit 7deebf983f53c505bc25171ab77fdc408f250a6e Author: Julien Cristau <jcris...@debian.org> Date: Tue May 26 15:58:19 2009 +0200 xsfbs: don't run dpkg --print-installation-architecture This is deprecated in new dpkg, and had no users anyway. diff --git a/debian/xsfbs/xsfbs.sh b/debian/xsfbs/xsfbs.sh index 8840ff9..197eb74 100644 --- a/debian/xsfbs/xsfbs.sh +++ b/debian/xsfbs/xsfbs.sh @@ -57,8 +57,6 @@ EOF exit $SHELL_LIB_USAGE_ERROR fi -ARCHITECTURE="$(dpkg --print-installation-architecture)" - if [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then RECONFIGURE="true" else commit 4178d948cd66a938222d0d7c6353ee8d60229e40 Author: David Nusinow <dnusi...@debian.org> Date: Mon May 25 20:08:50 2009 -0400 Add README.source diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 0000000..34ab4bf --- /dev/null +++ b/debian/README.source @@ -0,0 +1,73 @@ +------------------------------------------------------ +Quick Guide To Patching This Package For The Impatient +------------------------------------------------------ + +1. Make sure you have quilt installed +2. Unpack the package as usual with "dpkg-source -x" +3. Run the "patch" target in debian/rules +4. Create a new patch with "quilt new" (see quilt(1)) +5. Edit all the files you want to include in the patch with "quilt edit" + (see quilt(1)). +6. Write the patch with "quilt refresh" (see quilt(1)) +7. Run the "clean" target in debian/rules + +Alternatively, instead of using quilt directly, you can drop the patch in to +debian/patches and add the name of the patch to debian/patches/series. + +------------------------------------ +Guide To The X Strike Force Packages +------------------------------------ + +The X Strike Force team maintains X packages in git repositories on +git.debian.org in the pkg-xorg subdirectory. Most upstream packages +are actually maintained in git repositories as well, so they often +just need to be pulled into git.debian.org in a "upstream-*" branch. +Otherwise, the upstream sources are manually installed in the Debian +git repository. + +The .orig.tar.gz upstream source file could be generated this +"upstream-*" branch in the Debian git repository but it is actually +copied from upstream tarballs directly. + +Due to X.org being highly modular, packaging all X.org applications +as their own independent packages would have created too many Debian +packages. For this reason, some X.org applications have been grouped +into larger packages: xutils, xutils-dev, x11-apps, x11-session-utils, +x11-utils, x11-xfs-utils, x11-xkb-utils, x11-xserver-utils. +Most packages, including the X.org server itself and all libraries +and drivers are, however maintained independently. + +The Debian packaging is added by creating the "debian-*" git branch +which contains the aforementioned "upstream-*" branch plus the debian/ +repository files. +When a patch has to be applied to the Debian package, two solutions +are involved: +* If the patch is available in one of the upstream branches, it + may be git'cherry-picked into the Debian repository. In this + case, it appears directly in the .diff.gz. +* Otherwise, the patch is added to debian/patches/ which is managed + with quilt as documented in /usr/share/doc/quilt/README.source. + +quilt is actually invoked by the Debian X packaging through a larger +set of scripts called XSFBS. XSFBS brings some other X specific +features such as managing dependencies and conflicts due to the video +and input driver ABIs. +XSFBS itself is maintained in a separate repository at + git://git.debian.org/pkg-xorg/xsfbs.git +and it is pulled inside the other Debian X repositories when needed. + +The XSFBS patching system requires a build dependency on quilt. Also +a dependency on $(STAMP_DIR)/patch has to be added to debian/rules +so that the XSFBS patching occurs before the actual build. So the +very first target of the build (likely the one running autoreconf) +should depend on $(STAMP_DIR)/patch. It should also not depend on +anything so that parallel builds are correctly supported (nothing +should probably run while patching is being done). And finally, the +clean target should depend on the xsfclean target so that patches +are unapplied on clean. + +When the upstream sources contain some DFSG-nonfree files, they are +listed in text files in debian/prune/ in the "debian-*" branch of +the Debian repository. XSFBS' scripts then take care of removing +these listed files during the build so as to generate a modified +DFSG-free .orig.tar.gz tarball. commit f355ad89431c49355e626613e6fc29ef2e183dab Author: Eric Anholt <e...@anholt.net> Date: Tue May 19 10:07:16 2009 -0700 intel: quiet a warning. diff --git a/libdrm/intel/intel_bufmgr_gem.c b/libdrm/intel/intel_bufmgr_gem.c index ef046f4..c25fc4c 100644 --- a/libdrm/intel/intel_bufmgr_gem.c +++ b/libdrm/intel/intel_bufmgr_gem.c @@ -747,7 +747,6 @@ drm_intel_gem_bo_unmap_gtt(drm_intel_bo *bo) { drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bo->bufmgr; drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *)bo; - struct drm_i915_gem_sw_finish sw_finish; int ret = 0; if (bo == NULL) commit 469655fab7a56eb32ff8cdefb33992813342353a Author: Eric Anholt <e...@anholt.net> Date: Mon May 18 16:07:45 2009 -0700 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; commit f57d7f4b0b14972f92a83f155ae8033478aa7729 Author: Keith Packard <kei...@keithp.com> Date: Thu May 14 16:58:14 2009 -0700 libdrm/intel: Make get_pipe_from_crtc_id per-bufmgr. Return -1 on failure. The convention is that all APIs are per-bufmgr, so make this one the same. Then, have it return -1 on failure so that the application can know what's going on and do something sensible. Signed-off-by: Keith Packard <kei...@keithp.com> diff --git a/configure.ac b/configure.ac index e8cce3b..9d1a8ef 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.57) -AC_INIT([libdrm], 2.4.10, [dri-de...@lists.sourceforge.net], libdrm) +AC_INIT([libdrm], 2.4.11, [dri-de...@lists.sourceforge.net], libdrm) AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([dist-bzip2]) diff --git a/libdrm/intel/intel_bufmgr.c b/libdrm/intel/intel_bufmgr.c index 5057fe6..f170e7f 100644 --- a/libdrm/intel/intel_bufmgr.c +++ b/libdrm/intel/intel_bufmgr.c @@ -219,3 +219,12 @@ int drm_intel_bo_disable_reuse(drm_intel_bo *bo) return bo->bufmgr->bo_disable_reuse(bo); return 0; } + +int +drm_intel_get_pipe_from_crtc_id (drm_intel_bufmgr *bufmgr, int crtc_id) +{ + if (bufmgr->get_pipe_from_crtc_id) + return bufmgr->get_pipe_from_crtc_id(bufmgr, crtc_id); + return -1; +} + diff --git a/libdrm/intel/intel_bufmgr_gem.c b/libdrm/intel/intel_bufmgr_gem.c index 3f792da..61943f0 100644 --- a/libdrm/intel/intel_bufmgr_gem.c +++ b/libdrm/intel/intel_bufmgr_gem.c @@ -815,8 +815,8 @@ drm_intel_gem_bo_subdata (drm_intel_bo *bo, unsigned long offset, return 0; } -int -drm_intel_get_pipe_from_crtc_id (drm_intel_bufmgr *bufmgr, int crtc_id) +static int +drm_intel_gem_get_pipe_from_crtc_id (drm_intel_bufmgr *bufmgr, int crtc_id) { drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bufmgr; struct drm_i915_get_pipe_from_crtc_id get_pipe_from_crtc_id; @@ -826,13 +826,13 @@ drm_intel_get_pipe_from_crtc_id (drm_intel_bufmgr *bufmgr, int crtc_id) ret = ioctl (bufmgr_gem->fd, DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID, &get_pipe_from_crtc_id); if (ret != 0) { - /* We're intentionally silent here so that there is no - * complaint when simply running with an older kernel that - * doesn't have the GET_PIPE_FROM_CRTC_ID ioctly. In that - * case, we just punt and try to sync on pipe 0, which is - * hopefully the right pipe in some cases at least. + /* We return -1 here to signal that we don't + * know which pipe is associated with this crtc. + * This lets the caller know that this information + * isn't available; using the wrong pipe for + * vblank waiting can cause the chipset to lock up */ - return 0; + return -1; } return get_pipe_from_crtc_id.pipe; @@ -1482,6 +1482,7 @@ drm_intel_bufmgr_gem_init(int fd, int batch_size) bufmgr_gem->bufmgr.debug = 0; bufmgr_gem->bufmgr.check_aperture_space = drm_intel_gem_check_aperture_space; bufmgr_gem->bufmgr.bo_disable_reuse = drm_intel_gem_bo_disable_reuse; + bufmgr_gem->bufmgr.get_pipe_from_crtc_id = drm_intel_gem_get_pipe_from_crtc_id; /* Initialize the linked lists for BO reuse cache. */ for (i = 0; i < DRM_INTEL_GEM_BO_BUCKETS; i++) DRMINITLISTHEAD(&bufmgr_gem->cache_bucket[i].head); diff --git a/libdrm/intel/intel_bufmgr_priv.h b/libdrm/intel/intel_bufmgr_priv.h index 3484dee..0098076 100644 --- a/libdrm/intel/intel_bufmgr_priv.h +++ b/libdrm/intel/intel_bufmgr_priv.h @@ -188,6 +188,19 @@ struct _drm_intel_bufmgr { */ int (*bo_disable_reuse)(drm_intel_bo *bo); + /** + * + * Return the pipe associated with a crtc_id so that vblank + * synchronization can use the correct data in the request. + * This is only supported for KMS and gem at this point, when + * unsupported, this function returns -1 and leaves the decision + * of what to do in that case to the caller + * + * \param bufmgr the associated buffer manager + * \param crtc_id the crtc identifier + */ + int (*get_pipe_from_crtc_id)(drm_intel_bufmgr *bufmgr, int crtc_id); + int debug; /**< Enables verbose debugging printouts */ }; commit afd245dd7fd85cf3ffd3e6d5fe9711252aa2ed7f Author: Carl Worth <cwo...@cworth.org> Date: Wed Apr 29 14:43:55 2009 -0700 Add new drm_intel_get_pipe_from_crtc_id function. This wraps the new DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID ioctl, allowing applications to discover the pipe number corresponding to a given CRTC ID. This is necessary for doing pipe-specific operations such as waiting for vblank on a given CRTC. diff --git a/libdrm/intel/intel_bufmgr.h b/libdrm/intel/intel_bufmgr.h index 75d06ca..758558d 100644 --- a/libdrm/intel/intel_bufmgr.h +++ b/libdrm/intel/intel_bufmgr.h @@ -120,6 +120,8 @@ int drm_intel_gem_bo_map_gtt(drm_intel_bo *bo); int drm_intel_gem_bo_unmap_gtt(drm_intel_bo *bo); void drm_intel_gem_bo_start_gtt_access(drm_intel_bo *bo, int write_enable); +int drm_intel_get_pipe_from_crtc_id(drm_intel_bufmgr *bufmgr, int crtc_id); + /* drm_intel_bufmgr_fake.c */ drm_intel_bufmgr *drm_intel_bufmgr_fake_init(int fd, unsigned long low_offset, diff --git a/libdrm/intel/intel_bufmgr_gem.c b/libdrm/intel/intel_bufmgr_gem.c index 5ae4d66..3f792da 100644 --- a/libdrm/intel/intel_bufmgr_gem.c +++ b/libdrm/intel/intel_bufmgr_gem.c @@ -815,6 +815,29 @@ drm_intel_gem_bo_subdata (drm_intel_bo *bo, unsigned long offset, return 0; } +int +drm_intel_get_pipe_from_crtc_id (drm_intel_bufmgr *bufmgr, int crtc_id) +{ + drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bufmgr; + struct drm_i915_get_pipe_from_crtc_id get_pipe_from_crtc_id; + int ret; + + get_pipe_from_crtc_id.crtc_id = crtc_id; + ret = ioctl (bufmgr_gem->fd, DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID, + &get_pipe_from_crtc_id); + if (ret != 0) { + /* We're intentionally silent here so that there is no + * complaint when simply running with an older kernel that + * doesn't have the GET_PIPE_FROM_CRTC_ID ioctly. In that + * case, we just punt and try to sync on pipe 0, which is + * hopefully the right pipe in some cases at least. + */ + return 0; + } + + return get_pipe_from_crtc_id.pipe; +} + static int drm_intel_gem_bo_get_subdata (drm_intel_bo *bo, unsigned long offset, unsigned long size, void *data) diff --git a/shared-core/i915_drm.h b/shared-core/i915_drm.h index 5456e91..c8fec5f 100644 --- a/shared-core/i915_drm.h +++ b/shared-core/i915_drm.h @@ -205,6 +205,7 @@ typedef struct drm_i915_sarea { #define DRM_I915_GEM_GET_TILING 0x22 #define DRM_I915_GEM_GET_APERTURE 0x23 #define DRM_I915_GEM_MMAP_GTT 0x24 +#define DRM_I915_GET_PIPE_FROM_CRTC_ID 0x25 #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) @@ -242,6 +243,7 @@ typedef struct drm_i915_sarea { #define DRM_IOCTL_I915_GEM_SET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_SET_TILING, struct drm_i915_gem_set_tiling) #define DRM_IOCTL_I915_GEM_GET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling) #define DRM_IOCTL_I915_GEM_GET_APERTURE DRM_IOR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE, struct drm_i915_gem_get_aperture) +#define DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_PIPE_FROM_CRTC_ID, struct drm_i915_get_pipe_from_crtc_id) /* Asynchronous page flipping: */ @@ -769,4 +771,12 @@ struct drm_i915_gem_get_aperture { uint64_t aper_available_size; }; +struct drm_i915_get_pipe_from_crtc_id { + /** ID of CRTC being requested **/ + uint32_t crtc_id; + + /** pipe of requested CRTC **/ + uint32_t pipe; +}; + #endif /* _I915_DRM_H_ */ commit 8b8e20e0f9900fae23baee55a91533a739c1a3ec Author: Keith Packard <kei...@keithp.com> Date: Tue May 12 15:33:28 2009 -0700 Bump to version 2.4.10 to mark addition of drm_intel_bo_disable_reuse New API, new version. Signed-off-by: Keith Packard <kei...@keithp.com> Reviewed-by: Eric Anholt <e...@anholt.net> diff --git a/configure.ac b/configure.ac index 19d9c9c..e8cce3b 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.57) -AC_INIT([libdrm], 2.4.9, [dri-de...@lists.sourceforge.net], libdrm) +AC_INIT([libdrm], 2.4.10, [dri-de...@lists.sourceforge.net], libdrm) AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([dist-bzip2]) commit 5b5ce301287fb8ef74b45fad3c10b2d4ac3a9cc6 Author: Keith Packard <kei...@keithp.com> Date: Mon May 11 13:42:12 2009 -0700 libdrm/intel: add drm_intel_bo_disable_reuse api Scanout buffers need to be freed through the kernel as it holds a reference to them; exposing this API allows applications allocating scanout buffers to flag them as not reusable. Signed-off-by: Keith Packard <kei...@keithp.com> Reviewed-by: Eric Anholt <e...@anholt.net> diff --git a/libdrm/intel/intel_bufmgr.c b/libdrm/intel/intel_bufmgr.c index 25a6828..5057fe6 100644 --- a/libdrm/intel/intel_bufmgr.c +++ b/libdrm/intel/intel_bufmgr.c @@ -212,3 +212,10 @@ int drm_intel_bo_get_tiling(drm_intel_bo *bo, uint32_t *tiling_mode, *swizzle_mode = I915_BIT_6_SWIZZLE_NONE; return 0; } + +int drm_intel_bo_disable_reuse(drm_intel_bo *bo) +{ + if (bo->bufmgr->bo_disable_reuse) + return bo->bufmgr->bo_disable_reuse(bo); + return 0; +} diff --git a/libdrm/intel/intel_bufmgr.h b/libdrm/intel/intel_bufmgr.h index 542dc06..75d06ca 100644 --- a/libdrm/intel/intel_bufmgr.h +++ b/libdrm/intel/intel_bufmgr.h @@ -108,6 +108,8 @@ int drm_intel_bo_get_tiling(drm_intel_bo *bo, uint32_t *tiling_mode, uint32_t *swizzle_mode); int drm_intel_bo_flink(drm_intel_bo *bo, uint32_t *name); +int drm_intel_bo_disable_reuse(drm_intel_bo *bo); + /* drm_intel_bufmgr_gem.c */ drm_intel_bufmgr *drm_intel_bufmgr_gem_init(int fd, int batch_size); drm_intel_bo *drm_intel_bo_gem_create_from_name(drm_intel_bufmgr *bufmgr, diff --git a/libdrm/intel/intel_bufmgr_gem.c b/libdrm/intel/intel_bufmgr_gem.c index 89931d8..5ae4d66 100644 --- a/libdrm/intel/intel_bufmgr_gem.c +++ b/libdrm/intel/intel_bufmgr_gem.c @@ -166,6 +166,11 @@ struct _drm_intel_bo_gem { char used_as_reloc_target; /** + * Boolean of whether this buffer can be re-used + */ + char reusable; + + /** * Size in bytes of this buffer and its relocation descendents. * * Used to avoid costly tree walking in drm_intel_bufmgr_check_aperture in @@ -420,6 +425,7 @@ drm_intel_gem_bo_alloc_internal(drm_intel_bufmgr *bufmgr, const char *name, bo_gem->used_as_reloc_target = 0; bo_gem->tiling_mode = I915_TILING_NONE; bo_gem->swizzle_mode = I915_BIT_6_SWIZZLE_NONE; + bo_gem->reusable = 1; DBG("bo_create: buf %d (%s) %ldb\n", bo_gem->gem_handle, bo_gem->name, size); @@ -479,6 +485,7 @@ drm_intel_bo_gem_create_from_name(drm_intel_bufmgr *bufmgr, const char *name, bo_gem->validate_index = -1; bo_gem->gem_handle = open_arg.handle; bo_gem->global_name = handle; + bo_gem->reusable = 0; memset(&get_tiling, 0, sizeof(get_tiling)); get_tiling.handle = bo_gem->gem_handle; @@ -572,7 +579,7 @@ drm_intel_gem_bo_unreference_locked(drm_intel_bo *bo) bucket = drm_intel_gem_bo_bucket_for_size(bufmgr_gem, bo->size); /* Put the buffer into our internal cache for reuse if we can. */ tiling_mode = I915_TILING_NONE; - if (bo_gem->global_name == 0 && + if (bo_gem->reusable && bucket != NULL && (bucket->max_entries == -1 || (bucket->max_entries > 0 && @@ -1168,6 +1175,7 @@ drm_intel_gem_bo_flink(drm_intel_bo *bo, uint32_t *name) if (ret != 0) return -errno; bo_gem->global_name = flink.name; + bo_gem->reusable = 0; } *name = bo_gem->global_name; @@ -1356,6 +1364,19 @@ drm_intel_gem_check_aperture_space(drm_intel_bo **bo_array, int count) } } +/* + * Disable buffer reuse for objects which are shared with the kernel + * as scanout buffers + */ +static int +drm_intel_gem_bo_disable_reuse(drm_intel_bo *bo) +{ + drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *)bo; + + bo_gem->reusable = 0; + return 0; +} + /** * Initializes the GEM buffer manager, which uses the kernel to allocate, map, * and manage map buffer objections. @@ -1437,6 +1458,7 @@ drm_intel_bufmgr_gem_init(int fd, int batch_size) bufmgr_gem->bufmgr.destroy = drm_intel_bufmgr_gem_destroy; bufmgr_gem->bufmgr.debug = 0; bufmgr_gem->bufmgr.check_aperture_space = drm_intel_gem_check_aperture_space; + bufmgr_gem->bufmgr.bo_disable_reuse = drm_intel_gem_bo_disable_reuse; /* Initialize the linked lists for BO reuse cache. */ for (i = 0; i < DRM_INTEL_GEM_BO_BUCKETS; i++) DRMINITLISTHEAD(&bufmgr_gem->cache_bucket[i].head); diff --git a/libdrm/intel/intel_bufmgr_priv.h b/libdrm/intel/intel_bufmgr_priv.h index 82d87b4..3484dee 100644 --- a/libdrm/intel/intel_bufmgr_priv.h +++ b/libdrm/intel/intel_bufmgr_priv.h @@ -178,6 +178,16 @@ struct _drm_intel_bufmgr { int (*bo_flink)(drm_intel_bo *bo, uint32_t *name); int (*check_aperture_space)(drm_intel_bo **bo_array, int count); + + /** + * Disable buffer reuse for buffers which will be shared in some way, + * as with scanout buffers. When the buffer reference count goes to zero, + * it will be freed and not placed in the reuse list. + * + * \param bo Buffer to disable reuse for + */ + int (*bo_disable_reuse)(drm_intel_bo *bo); + int debug; /**< Enables verbose debugging printouts */ }; commit 628dc48a16ec6796ec5a81428e695837c51463d0 Author: Alan Coopersmith <alan.coopersm...@sun.com> Date: Mon Jun 9 17:03:28 2008 -0700 Use C99 versions of __FUNCTION__ & __volatile__ when not building with gcc diff --git a/shared-core/drm.h b/shared-core/drm.h index b97ba09..97fab9a 100644 --- a/shared-core/drm.h +++ b/shared-core/drm.h @@ -69,6 +69,12 @@ # define DEPRECATED __attribute__ ((deprecated)) #else # define DEPRECATED +# ifndef __FUNCTION__ +# define __FUNCTION__ __func__ /* C99 */ +# endif +# ifndef __volatile__ +# define __volatile__ volatile +# endif #endif #if defined(__linux__) commit 1bae8844cafd70f6196116f6e84b0f36c069e976 Author: Alan Coopersmith <alan.coopersm...@sun.com> Date: Sat May 9 17:21:29 2009 -0700 Delete extra libdrm_lists.h line after libdrm_la_SOURCES in libdrm/Makefile.am Signed-off-by: Alan Coopersmith <alan.coopersm...@sun.com> diff --git a/libdrm/Makefile.am b/libdrm/Makefile.am index 4c066e0..458420a 100644 --- a/libdrm/Makefile.am +++ b/libdrm/Makefile.am @@ -32,7 +32,6 @@ libdrm_la_LIBADD = @CLOCK_LIB@ AM_CFLAGS = -I$(top_srcdir)/shared-core libdrm_la_SOURCES = xf86drm.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c \ xf86drmMode.c libdrm_lists.h - libdrm_lists.h libdrmincludedir = ${includedir} libdrminclude_HEADERS = xf86drm.h xf86drmMode.h commit 94d48d038502097ebfa2e33e4a75b9e0e675231d Author: Stuart Bennett <stu...@freedesktop.org> Date: Wed May 6 23:56:51 2009 +0100 nouveau: backlight compat fix Avoid failure to build on old kernels with CONFIG_BACKLIGHT_CLASS_DEVICE set diff --git a/linux-core/nouveau_backlight.c b/linux-core/nouveau_backlight.c index 51c747a..1b36f3c 100644 --- a/linux-core/nouveau_backlight.c +++ b/linux-core/nouveau_backlight.c @@ -37,7 +37,7 @@ #include "nouveau_drm.h" #include "nouveau_reg.h" -#ifdef CONFIG_BACKLIGHT_CLASS_DEVICE +#if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)) static int nv40_get_intensity(struct backlight_device *bd) { commit e2b5fde7f6ff412cadd9cad35ad051a028cf7fae Author: Danny Tholen <moondr...@gmail.com> Date: Wed May 6 23:41:09 2009 +0100 nouveau: fix ppc for swab changes in Linux 2.6.29 diff --git a/shared-core/nouveau_state.c b/shared-core/nouveau_state.c index c9f4329..b2ad747 100644 --- a/shared-core/nouveau_state.c +++ b/shared-core/nouveau_state.c @@ -496,7 +496,7 @@ int nouveau_load(struct drm_device *dev, unsigned long flags) reg1 = readl(regs+NV03_PMC_BOOT_1); #if defined(__powerpc__) if (reg1) - reg0=___swab32(reg0); + reg0=__swab32(reg0); #endif /* We're dealing with >=NV10 */ commit 68103b2758029b3c1fbfcf995baa758bfd2676de Author: Keith Packard <kei...@keithp.com> Date: Fri May 1 18:47:04 2009 -0700 libdrm/intel: assert that clients are using bo refcounting correctly Add assertions to drm_intel_gem_bo_reference, drm_intel_gem_bo_reference_locked and drm_intel_gem_bo_unreference_locked -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org