This is a note to let you know that I've just added the patch titled
drm/nouveau/bios: fix shadowing of ACPI ROMs larger than 64KiB
to the 3.6-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-nouveau-bios-fix-shadowing-of-acpi-roms-larger-than-64kib.patch
and it can be found in the queue-3.6 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 9a334cd0de2f43b29c192548000692bad52edfc6 Mon Sep 17 00:00:00 2001
From: Ben Skeggs <[email protected]>
Date: Tue, 9 Oct 2012 12:21:36 +1000
Subject: drm/nouveau/bios: fix shadowing of ACPI ROMs larger than 64KiB
From: Ben Skeggs <[email protected]>
commit 9a334cd0de2f43b29c192548000692bad52edfc6 upstream.
Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/gpu/drm/nouveau/nouveau_bios.c | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
--- a/drivers/gpu/drm/nouveau/nouveau_bios.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
@@ -196,24 +196,22 @@ static void
bios_shadow_acpi(struct nvbios *bios)
{
struct pci_dev *pdev = bios->dev->pdev;
- int cnt = 65536 / ROM_BIOS_PAGE;
- int ret;
+ int ret, cnt, i;
+ u8 data[3];
if (!nouveau_acpi_rom_supported(pdev))
return;
- bios->data = kmalloc(cnt * ROM_BIOS_PAGE, GFP_KERNEL);
- if (!bios->data)
- return;
-
bios->length = 0;
- while (cnt--) {
- ret = nouveau_acpi_get_bios_chunk(bios->data, bios->length,
- ROM_BIOS_PAGE);
- if (ret != ROM_BIOS_PAGE)
- return;
+ if (nouveau_acpi_get_bios_chunk(data, 0, 3) == 3)
+ bios->length = data[2] * 512;
- bios->length += ROM_BIOS_PAGE;
+ bios->data = kmalloc(bios->length, GFP_KERNEL);
+ for (i = 0; bios->data && i < bios->length; i += cnt) {
+ cnt = min((bios->length - i), (u32)4096);
+ ret = nouveau_acpi_get_bios_chunk(bios->data, i, cnt);
+ if (ret != cnt)
+ break;
}
}
Patches currently in stable-queue which might be from [email protected] are
queue-3.6/drm-nouveau-bios-fix-shadowing-of-acpi-roms-larger-than-64kib.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html