Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362293
b: refs/heads/master
c: 121cdf0
h: refs/heads/master
i:
  362291: e101f15
v: v3
  • Loading branch information
Matthew Garrett authored and Bjorn Helgaas committed Apr 1, 2013
1 parent 8a07f5c commit c491415
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fffe01f7a768d07cc50ace71abe28fbf2f786a43
refs/heads/master: 121cdf08cc854bda4892d2c755e32ef424772ac2
17 changes: 17 additions & 0 deletions trunk/drivers/gpu/drm/nouveau/core/subdev/bios/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,22 @@ nouveau_bios_shadow_pci(struct nouveau_bios *bios)
}
}

static void
nouveau_bios_shadow_platform(struct nouveau_bios *bios)
{
struct pci_dev *pdev = nv_device(bios)->pdev;
size_t size;

void __iomem *rom = pci_platform_rom(pdev, &size);
if (rom && size) {
bios->data = kmalloc(size, GFP_KERNEL);
if (bios->data) {
memcpy_fromio(bios->data, rom, size);
bios->size = size;
}
}
}

static int
nouveau_bios_score(struct nouveau_bios *bios, const bool writeable)
{
Expand Down Expand Up @@ -288,6 +304,7 @@ nouveau_bios_shadow(struct nouveau_bios *bios)
{ "PROM", nouveau_bios_shadow_prom, false, 0, 0, NULL },
{ "ACPI", nouveau_bios_shadow_acpi, true, 0, 0, NULL },
{ "PCIROM", nouveau_bios_shadow_pci, true, 0, 0, NULL },
{ "PLATFORM", nouveau_bios_shadow_platform, true, 0, 0, NULL },
{}
};
struct methods *mthd, *best;
Expand Down

0 comments on commit c491415

Please sign in to comment.