From 7de478f1c8b5d4788b23ededc44961fcb58ec126 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Fri, 9 Jan 2015 23:08:50 -0200 Subject: linux-libre-3.18.2_gnu-2: updating version * fix FS#43143 -> https://bugs.archlinux.org/task/43143 --- ...sallow-pin-ioctl-completely-for-kms-drive.patch | 79 ++++++++++++++++++++++ libre/linux-libre/PKGBUILD | 11 ++- 2 files changed, 87 insertions(+), 3 deletions(-) create mode 100644 libre/linux-libre/0001-drm-i915-Disallow-pin-ioctl-completely-for-kms-drive.patch (limited to 'libre') diff --git a/libre/linux-libre/0001-drm-i915-Disallow-pin-ioctl-completely-for-kms-drive.patch b/libre/linux-libre/0001-drm-i915-Disallow-pin-ioctl-completely-for-kms-drive.patch new file mode 100644 index 000000000..f9aa99342 --- /dev/null +++ b/libre/linux-libre/0001-drm-i915-Disallow-pin-ioctl-completely-for-kms-drive.patch @@ -0,0 +1,79 @@ +From d472fcc8379c062bd56a3876fc6ef22258f14a91 Mon Sep 17 00:00:00 2001 +From: Daniel Vetter +Date: Mon, 24 Nov 2014 11:12:42 +0100 +Subject: [PATCH] drm/i915: Disallow pin ioctl completely for kms drivers + +The problem here is that SNA pins batchbuffers to etch out a bit more +performance. Iirc it started out as a w/a for i830M (which we've +implemented in the kernel since a long time already). The problem is +that the pin ioctl wasn't added in + +commit d23db88c3ab233daed18709e3a24d6c95344117f +Author: Chris Wilson +Date: Fri May 23 08:48:08 2014 +0200 + + drm/i915: Prevent negative relocation deltas from wrapping + +Fix this by simply disallowing pinning from userspace so that the +kernel is in full control of batch placement again. Especially since +distros are moving towards running X as non-root, so most users won't +even be able to see any benefits. + +UMS support is dead now, but we need this minimal patch for +backporting. Follow-up patch will remove the pin ioctl code +completely. + +Note to backporters: You must have both + +commit b45305fce5bb1abec263fcff9d81ebecd6306ede +Author: Daniel Vetter +Date: Mon Dec 17 16:21:27 2012 +0100 + + drm/i915: Implement workaround for broken CS tlb on i830/845 + +which laned in 3.8 and + +commit c4d69da167fa967749aeb70bc0e94a457e5d00c1 +Author: Chris Wilson +Date: Mon Sep 8 14:25:41 2014 +0100 + + drm/i915: Evict CS TLBs between batches + +which is also marked cc: stable. Otherwise this could introduce a +regression by disabling the userspace w/a without the kernel w/a being +fully functional on i830/45. + +References: https://bugs.freedesktop.org/show_bug.cgi?id=76554#c116 +Cc: stable@vger.kernel.org # requires c4d69da167fa967749a and v3.8 +Cc: Chris Wilson +Signed-off-by: Daniel Vetter +--- + drivers/gpu/drm/i915/i915_gem.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c +index fd17cca..97b86a5 100644 +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -4263,7 +4263,7 @@ i915_gem_pin_ioctl(struct drm_device *dev, void *data, + struct drm_i915_gem_object *obj; + int ret; + +- if (INTEL_INFO(dev)->gen >= 6) ++ if (drm_core_check_feature(dev, DRIVER_MODESET)) + return -ENODEV; + + ret = i915_mutex_lock_interruptible(dev); +@@ -4319,6 +4319,9 @@ i915_gem_unpin_ioctl(struct drm_device *dev, void *data, + struct drm_i915_gem_object *obj; + int ret; + ++ if (drm_core_check_feature(dev, DRIVER_MODESET)) ++ return -ENODEV; ++ + ret = i915_mutex_lock_interruptible(dev); + if (ret) + return ret; +-- +2.2.0 + diff --git a/libre/linux-libre/PKGBUILD b/libre/linux-libre/PKGBUILD index ef5c100d2..af42d54c8 100644 --- a/libre/linux-libre/PKGBUILD +++ b/libre/linux-libre/PKGBUILD @@ -9,7 +9,7 @@ pkgbase=linux-libre # Build stock "" kernel _pkgbasever=3.18-gnu -_pkgver=3.18.1-gnu +_pkgver=3.18.2-gnu _replacesarchkernel=('linux%') # '%' gets replaced with _kernelname _replacesoldkernels=('kernel26%' 'kernel26-libre%') # '%' gets replaced with _kernelname @@ -18,7 +18,7 @@ _replacesoldmodules=('linux-libre%-kmod-alx') # '%' gets replaced with _kernelna _srcname=linux-${_pkgbasever%-*} _archpkgver=${_pkgver%-*} pkgver=${_pkgver//-/_} -pkgrel=1 +pkgrel=2 arch=('i686' 'x86_64' 'mips64el') url="http://linux-libre.fsfla.org/" license=('GPL2') @@ -34,11 +34,12 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/li 'linux.preset' 'logo_linux_'{clut224.ppm,vga16.ppm,mono.pbm} 'change-default-console-loglevel.patch' + '0001-drm-i915-Disallow-pin-ioctl-completely-for-kms-drive.patch' # loongson-community patch: http://linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/debuginfo/ '3.18-rc6-48c0ad793f-loongson-community.patch') sha256sums=('0f347d8eba8a6878246b94b3559eb0371d96a3f43de2f134513e274de11a60cf' 'SKIP' - '9f2db65dcc1a1cbcdf4cd7d8ed9678698c27262d79557b342cbb323a4d45ceb6' + '6ebb37b925d8d523a0d00450583dad3736287d8a1b6df05c90e66b8c6cc0fd57' 'SKIP' '2f03d1b7c6a198c3f5c1ff15583d468b93dd50d1c37d41a71075935eebb786e7' '81f1a730420c689da73554e323ca9cb4453aa20b8aeeed3864d3034b5470cc0b' @@ -48,6 +49,7 @@ sha256sums=('0f347d8eba8a6878246b94b3559eb0371d96a3f43de2f134513e274de11a60cf' '2e87a8ec1cc0c91938cac24992d8a3d4362b3e9d939767e4c9d2ec8e6d969d53' 'f67f60a30bcf2e9a2ba88ad97cace308da7a7f94919bb95c3dc030f5885a8015' '1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99' + '0bda45a3ef0f2780bbe588f2e53ab2b79814d29e9c6fc7bfff3b0dbdaa9e710d' '81adca8b3f58156f4a245cb7f20750041a9e6848b282942d7d9e213a04c96c9f') validpgpkeys=( '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva @@ -78,6 +80,9 @@ prepare() { # add latest fixes from stable queue, if needed # http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git + # fix #43143 + patch -p1 -i "${srcdir}/0001-drm-i915-Disallow-pin-ioctl-completely-for-kms-drive.patch" + # set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param) # remove this when a Kconfig knob is made available by upstream # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227) -- cgit v1.2.3