Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11039
b: refs/heads/master
c: 6d7bf01
h: refs/heads/master
i:
  11037: 3150ee0
  11035: c3ca925
  11031: fabf705
  11023: 5874faf
  11007: 52697f9
v: v3
  • Loading branch information
Thiemo Seufer authored and Ralf Baechle committed Oct 29, 2005
1 parent c999ba0 commit 88d4e91
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 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: 77c728c2240a1eb45f7d355f5d87ecc319cd55ce
refs/heads/master: 6d7bf017e821f3c093c80d1ee919d8d87904701c
20 changes: 13 additions & 7 deletions trunk/drivers/video/gbefb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ static int __init gbefb_probe(struct device *dev)
gbefb_setup(options);
#endif

if (!request_mem_region(GBE_BASE, sizeof(struct sgi_gbe), "GBE")) {
if (!request_region(GBE_BASE, sizeof(struct sgi_gbe), "GBE")) {
printk(KERN_ERR "gbefb: couldn't reserve mmio region\n");
ret = -EBUSY;
goto out_release_framebuffer;
Expand All @@ -1152,25 +1152,31 @@ static int __init gbefb_probe(struct device *dev)
if (gbe_mem_phys) {
/* memory was allocated at boot time */
gbe_mem = ioremap_nocache(gbe_mem_phys, gbe_mem_size);
if (!gbe_mem) {
printk(KERN_ERR "gbefb: couldn't map framebuffer\n");
ret = -ENOMEM;
goto out_tiles_free;
}

gbe_dma_addr = 0;
} else {
/* try to allocate memory with the classical allocator
* this has high chance to fail on low memory machines */
gbe_mem = dma_alloc_coherent(NULL, gbe_mem_size, &gbe_dma_addr,
GFP_KERNEL);
if (!gbe_mem) {
printk(KERN_ERR "gbefb: couldn't allocate framebuffer memory\n");
ret = -ENOMEM;
goto out_tiles_free;
}

gbe_mem_phys = (unsigned long) gbe_dma_addr;
}

#ifdef CONFIG_X86
mtrr_add(gbe_mem_phys, gbe_mem_size, MTRR_TYPE_WRCOMB, 1);
#endif

if (!gbe_mem) {
printk(KERN_ERR "gbefb: couldn't map framebuffer\n");
ret = -ENXIO;
goto out_tiles_free;
}

/* map framebuffer memory into tiles table */
for (i = 0; i < (gbe_mem_size >> TILE_SHIFT); i++)
gbe_tiles.cpu[i] = (gbe_mem_phys >> TILE_SHIFT) + i;
Expand Down

0 comments on commit 88d4e91

Please sign in to comment.