[arch-commits] Commit in xf86-video-intel/trunk (2 files)
Jan de Groot
jgc at archlinux.org
Sun Mar 1 19:08:57 UTC 2009
Date: Sunday, March 1, 2009 @ 14:08:57
Author: jgc
Revision: 28602
upgpkg: xf86-video-intel 2.6.2-1
Added:
xf86-video-intel/trunk/pixmap-only-align-dri2.patch
Modified:
xf86-video-intel/trunk/PKGBUILD
------------------------------+
PKGBUILD | 34 ++--------
pixmap-only-align-dri2.patch | 138 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 147 insertions(+), 25 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2009-03-01 18:12:29 UTC (rev 28601)
+++ PKGBUILD 2009-03-01 19:08:57 UTC (rev 28602)
@@ -2,42 +2,26 @@
# Maintainer: Alexander Baldeck <alexander at archlinux.org>
# Maintainer: Jan de Groot <jgc at archlinux.org>
pkgname=xf86-video-intel
-pkgver=2.4.3
+pkgver=2.6.2
pkgrel=1
pkgdesc="X.org Intel i810/i830/i915/945G/G965+ video drivers"
arch=(i686 x86_64)
url="http://xorg.freedesktop.org/"
-depends=('intel-dri>=7.2' 'libpciaccess>=0.10.5' 'libdrm>=2.3.1')
-makedepends=('pkgconfig' 'xorg-server>=1.5.3' 'xf86driproto>=2.0.4' 'glproto>=1.4.9' 'mesa>=7.2' 'libdrm=2.3.1')
-conflicts=('xorg-server<1.5.3' 'xf86-video-i810')
+depends=('intel-dri>=7.3' 'libpciaccess>=0.10.5' 'libdrm>=2.4.5' 'libxvmc')
+makedepends=('pkgconfig' 'xorg-server>=1.6.0' 'xf86driproto>=2.0.4' 'glproto>=1.4.9' 'mesa>=7.3')
+conflicts=('xorg-server<1.6.0' 'xf86-video-i810')
replaces=('xf86-video-i810')
options=('!libtool' 'force')
groups=('xorg-video-drivers')
source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
- 20_thinkpad_g40_quirk.patch
- 21_quirk_lenovo.patch
- 23_quirks_studiohybrid_eeepc_and_w251u.patch
- 25_quirk_nc6110.patch
- 26_i830-use-lfp-data-ptrs.patch
- 27_disable_fbc_on_965.patch)
-md5sums=('a664819288b98a37f77ab6ae1e14c9d9'
- '68a362a168ffa4f37d9f722f43855468'
- '2d617364ac2e47ca366901d0b849b1a1'
- '3d0f8e593e8eac3000154feb6b0f45b8'
- '3deb800906e6845e8576d4e9d0f22b12'
- 'cb7ee7a68858c038020e0cd991143d8e'
- 'd215e428585c6e55aefd9f525ebfbe7b')
+ pixmap-only-align-dri2.patch)
+md5sums=('c171bb4175cfcea2662079ef20ee2020'
+ '4b402259220dbee0ab5fe24945445670')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
- patch -Np1 -i "${srcdir}/20_thinkpad_g40_quirk.patch" || return 1
- patch -Np1 -i "${srcdir}/21_quirk_lenovo.patch" || return 1
- patch -Np1 -i "${srcdir}/23_quirks_studiohybrid_eeepc_and_w251u.patch" || return 1
- patch -Np1 -i "${srcdir}/25_quirk_nc6110.patch" || return 1
- patch -Np1 -i "${srcdir}/26_i830-use-lfp-data-ptrs.patch" || return 1
- patch -Np1 -i "${srcdir}/27_disable_fbc_on_965.patch" || return 1
- ./configure --prefix=/usr \
- --enable-dri || return 1
+ patch -Np1 -i "${srcdir}/pixmap-only-align-dri2.patch" || return 1
+ ./configure --prefix=/usr --enable-dri || return 1
make || return 1
make DESTDIR="${pkgdir}" install || return 1
}
Added: pixmap-only-align-dri2.patch
===================================================================
--- pixmap-only-align-dri2.patch (rev 0)
+++ pixmap-only-align-dri2.patch 2009-03-01 19:08:57 UTC (rev 28602)
@@ -0,0 +1,138 @@
+From 5bfd73cd31ba197a62f549cdbad1a1270b571027 Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric at anholt.net>
+Date: Sat, 28 Feb 2009 03:09:49 +0000
+Subject: Only allocate pixmaps aligned for tiling when requested by DRI2 GetBuffers.
+
+This saves massive quantities of memory on pre-965 since the DRI2 tiling
+enable caused the minimum size of any pixmap to be 1MB.
+---
+diff --git a/src/i830.h b/src/i830.h
+index a0ae571..cd9c38a 100644
+--- a/src/i830.h
++++ b/src/i830.h
+@@ -1090,4 +1090,15 @@ extern const int I830CopyROP[16];
+ #define QUIRK_BROKEN_ACPI_LID 0x00000100
+ extern void i830_fixup_devices(ScrnInfoPtr);
+
++/**
++ * Hints to CreatePixmap to tell the driver how the pixmap is going to be
++ * used.
++ *
++ * Compare to CREATE_PIXMAP_USAGE_* in the server.
++ */
++enum {
++ INTEL_CREATE_PIXMAP_TILING_X = 0x10000000,
++ INTEL_CREATE_PIXMAP_TILING_Y,
++};
++
+ #endif /* _I830_H_ */
+diff --git a/src/i830_dri.c b/src/i830_dri.c
+index 540bf5e..96c711e 100644
+--- a/src/i830_dri.c
++++ b/src/i830_dri.c
+@@ -1561,36 +1561,33 @@ I830DRI2CreateBuffers(DrawablePtr pDraw, unsigned int *attachments, int count)
+ pPixmap = pDepthPixmap;
+ pPixmap->refcnt++;
+ } else {
+- uint32_t tiling = I915_TILING_NONE;
++ unsigned int hint = 0;
+
+- pPixmap = (*pScreen->CreatePixmap)(pScreen,
+- pDraw->width,
+- pDraw->height,
+- pDraw->depth, 0);
+ switch (attachments[i]) {
+ case DRI2BufferDepth:
+ if (SUPPORTS_YTILING(pI830))
+- tiling = I915_TILING_Y;
++ hint = INTEL_CREATE_PIXMAP_TILING_Y;
+ else
+- tiling = I915_TILING_X;
++ hint = INTEL_CREATE_PIXMAP_TILING_X;
+ break;
+ case DRI2BufferFakeFrontLeft:
+ case DRI2BufferFakeFrontRight:
+ case DRI2BufferBackLeft:
+ case DRI2BufferBackRight:
+- tiling = I915_TILING_X;
++ hint = INTEL_CREATE_PIXMAP_TILING_X;
+ break;
+ }
+
+ if (!pI830->tiling ||
+ (!IS_I965G(pI830) && !pI830->kernel_exec_fencing))
+- tiling = I915_TILING_NONE;
++ hint = 0;
++
++ pPixmap = (*pScreen->CreatePixmap)(pScreen,
++ pDraw->width,
++ pDraw->height,
++ pDraw->depth,
++ hint);
+
+- if (tiling != I915_TILING_NONE) {
+- bo = i830_get_pixmap_bo(pPixmap);
+- drm_intel_bo_set_tiling(bo, &tiling,
+- intel_get_pixmap_pitch(pPixmap));
+- }
+ }
+
+ if (attachments[i] == DRI2BufferDepth)
+diff --git a/src/i830_exa.c b/src/i830_exa.c
+index b9d6c64..0a22486 100644
+--- a/src/i830_exa.c
++++ b/src/i830_exa.c
+@@ -935,29 +935,38 @@ i830_uxa_create_pixmap (ScreenPtr screen, int w, int h, int depth, unsigned usag
+ if (w && h)
+ {
+ unsigned int size;
++ uint32_t tiling = I915_TILING_NONE;
+
+ stride = ROUND_TO((w * pixmap->drawable.bitsPerPixel + 7) / 8,
+ i830->accel_pixmap_pitch_alignment);
+
+- /* Use the I915_FENCE_TILING_X even if it may end up being TILING_Y,
+- * as it just results in larger alignment. Really, we need to use the
+- * usage hint to tell what the pixmap's going to be.
+- */
+- stride = i830_get_fence_pitch(i830, stride, I915_TILING_X);
+- /* Round the object up to the size of the fence it will live in
+- * if necessary. We could potentially make the kernel allocate
+- * a larger aperture space and just bind the subset of pages in,
+- * but this is easier and also keeps us out of trouble (as much)
+- * with drm_intel_bufmgr_check_aperture().
+- */
+- size = i830_get_fence_size(i830, stride * h);
++ if (usage == INTEL_CREATE_PIXMAP_TILING_X)
++ tiling = I915_TILING_X;
++ else if (usage == INTEL_CREATE_PIXMAP_TILING_Y)
++ tiling = I915_TILING_Y;
++
++ if (tiling == I915_TILING_NONE) {
++ size = stride * h;
++ } else {
++ stride = i830_get_fence_pitch(i830, stride, tiling);
++ /* Round the object up to the size of the fence it will live in
++ * if necessary. We could potentially make the kernel allocate
++ * a larger aperture space and just bind the subset of pages in,
++ * but this is easier and also keeps us out of trouble (as much)
++ * with drm_intel_bufmgr_check_aperture().
++ */
++ size = i830_get_fence_size(i830, stride * h);
++ }
+
+ bo = drm_intel_bo_alloc_for_render(i830->bufmgr, "pixmap", size, 0);
+ if (!bo) {
+ fbDestroyPixmap (pixmap);
+ return NullPixmap;
+ }
+-
++
++ if (tiling != I915_TILING_NONE)
++ drm_intel_bo_set_tiling(bo, &tiling, stride);
++
+ screen->ModifyPixmapHeader (pixmap, w, h, 0, 0, stride, NULL);
+
+ i830_uxa_set_pixmap_bo (pixmap, bo);
+--
+cgit v0.8.2
More information about the arch-commits
mailing list