Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247860
b: refs/heads/master
c: 9d5f96f
h: refs/heads/master
v: v3
  • Loading branch information
Florian Tobias Schandinat authored and Florian Tobias Schandinat committed Apr 25, 2011
1 parent cff871c commit b0d21fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: cace71b318aa0126e7cfe49fe5e9133e0395c478
refs/heads/master: 9d5f96f61837b1242dd8c576c6110593475fcf86
9 changes: 8 additions & 1 deletion trunk/drivers/video/via/via-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,14 @@ static int __devinit via_pci_setup_mmio(struct viafb_dev *vdev)
ret = vdev->fbmem_len = viafb_get_fb_size_from_pci(vdev->chip_type);
if (ret < 0)
goto out_unmap;
vdev->fbmem = ioremap_wc(vdev->fbmem_start, vdev->fbmem_len);

/* try to map less memory on failure, 8 MB should be still enough */
for (; vdev->fbmem_len >= 8 << 20; vdev->fbmem_len /= 2) {
vdev->fbmem = ioremap_wc(vdev->fbmem_start, vdev->fbmem_len);
if (vdev->fbmem)
break;
}

if (vdev->fbmem == NULL) {
ret = -ENOMEM;
goto out_unmap;
Expand Down

0 comments on commit b0d21fb

Please sign in to comment.