[linux] 06/09: [x86] nouveau: bios: return actual size of the buffer retrieved via _ROM (Closes: #772716)

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Sun Dec 13 00:35:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch sid
in repository linux.

commit 405f12a12b6d6b2fdf4b31336867676683a1dae8
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Sun Dec 13 00:04:40 2015 +0000

    [x86] nouveau: bios: return actual size of the buffer retrieved via _ROM (Closes: #772716)
---
 debian/changelog                                   |  2 ++
 ...ual-size-of-the-buffer-retrieved-via-_rom.patch | 25 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 28 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index fa2a4d5..dd29755 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,8 @@ linux (4.3.1-1~exp1) UNRELEASED; urgency=medium
     swizzling (Closes: #780363)
   * Enable CC_STACKPROTECTOR_STRONG (Closes: #805652)
   * [x86] input: Enable KEYBOARD_GPIO, INPUT_SOC_BUTTON_ARRAY (Closes: #804864)
+  * [x86] nouveau: bios: return actual size of the buffer retrieved via _ROM
+    (Closes: #772716)
 
  -- Ben Hutchings <ben at decadent.org.uk>  Wed, 09 Dec 2015 23:20:32 +0000
 
diff --git a/debian/patches/bugfix/x86/bios-return-actual-size-of-the-buffer-retrieved-via-_rom.patch b/debian/patches/bugfix/x86/bios-return-actual-size-of-the-buffer-retrieved-via-_rom.patch
new file mode 100644
index 0000000..ef2f72c
--- /dev/null
+++ b/debian/patches/bugfix/x86/bios-return-actual-size-of-the-buffer-retrieved-via-_rom.patch
@@ -0,0 +1,25 @@
+From: Ben Skeggs <bskeggs at redhat.com>
+Date: Thu, 19 Nov 2015 13:18:34 +1000
+Subject: bios: return actual size of the buffer retrieved via _ROM
+Origin: http://cgit.freedesktop.org/~darktama/nouveau/commit/?id=fcd74e81e65aee8a2a33bdca3142a5358dac7582
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90626
+Bug-Debian: https://bugs.debian.org/772716
+
+Fixes detection of a failed attempt at fetching the entire ROM image
+in one-shot (a violation of the spec, that works a lot of the time).
+
+Tested on a HP Zbook 15 G2.
+
+Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
+[bwh: Adjust filename for in-tree driver]
+
+--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
++++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
+@@ -367,6 +367,7 @@ static int nouveau_rom_call(acpi_handle rom_handle, uint8_t *bios,
+ 		return -ENODEV;
+ 	}
+ 	obj = (union acpi_object *)buffer.pointer;
++	len = min(len, (int)obj->buffer.length);
+ 	memcpy(bios+offset, obj->buffer.pointer, len);
+ 	kfree(buffer.pointer);
+ 	return len;
diff --git a/debian/patches/series b/debian/patches/series
index feaab99..803c64b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -98,3 +98,4 @@ bugfix/all/btrfs-fix-truncation-of-compressed-and-inlined-exten.patch
 bugfix/x86/drm-i915-shut-up-gen8-sde-irq-dmesg-noise.patch
 bugfix/arm/arm-dts-kirkwood-fix-qnap-ts219-power-off.patch
 bugfix/x86/drm-i915-mark-uneven-memory-banks-on-gen4-desktop-as.patch
+bugfix/x86/bios-return-actual-size-of-the-buffer-retrieved-via-_rom.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list