[x86] nouveau: bios: return actual size of the buffer retrieved via _ROM (Closes: #772716)
This commit is contained in:
parent
7a68d42a2b
commit
405f12a12b
|
@ -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@decadent.org.uk> Wed, 09 Dec 2015 23:20:32 +0000
|
||||
|
||||
|
|
25
debian/patches/bugfix/x86/bios-return-actual-size-of-the-buffer-retrieved-via-_rom.patch
vendored
Normal file
25
debian/patches/bugfix/x86/bios-return-actual-size-of-the-buffer-retrieved-via-_rom.patch
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
From: Ben Skeggs <bskeggs@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@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;
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue