Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 334718
b: refs/heads/master
c: d1626a9
h: refs/heads/master
v: v3
  • Loading branch information
Ben Skeggs committed Oct 22, 2012
1 parent 3d728b8 commit 6d6720f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 00e4845bad84689fbaacc86bc54a0b99d5d3c1fc
refs/heads/master: d1626a965141b1e600efad29947b6c36dab183c3
10 changes: 7 additions & 3 deletions trunk/drivers/gpu/drm/nouveau/core/subdev/bios/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,20 @@ nouveau_bios_shadow_acpi(struct nouveau_bios *bios)
{
struct pci_dev *pdev = nv_device(bios)->pdev;
int ret, cnt, i;
u8 data[3];

if (!nouveau_acpi_rom_supported(pdev)) {
bios->data = NULL;
return;
}

bios->size = 0;
if (nouveau_acpi_get_bios_chunk(data, 0, 3) == 3)
bios->size = data[2] * 512;
bios->data = kmalloc(4096, GFP_KERNEL);
if (bios->data) {
if (nouveau_acpi_get_bios_chunk(bios->data, 0, 4096) == 4096)
bios->size = bios->data[2] * 512;
kfree(bios->data);
}

if (!bios->size)
return;

Expand Down

0 comments on commit 6d6720f

Please sign in to comment.