Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200239
b: refs/heads/master
c: 6d69630
h: refs/heads/master
i:
  200237: 5f55130
  200235: 628bad9
  200231: fa72186
  200223: cc5fa0f
v: v3
  • Loading branch information
Ben Skeggs authored and Dave Airlie committed Jun 8, 2010
1 parent b34ad93 commit d61a199
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 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: 1eb38100abc467f1133e548d82ab171cab34292b
refs/heads/master: 6d696305530c0b3fcd7d15ad87d7203cb53df5b7
19 changes: 7 additions & 12 deletions trunk/drivers/gpu/drm/nouveau/nouveau_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -779,29 +779,24 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)
return ret;
}

/* map larger RAMIN aperture on NV40 cards */
dev_priv->ramin = NULL;
/* Map PRAMIN BAR, or on older cards, the aperture withing BAR0 */
if (dev_priv->card_type >= NV_40) {
int ramin_bar = 2;
if (pci_resource_len(dev->pdev, ramin_bar) == 0)
ramin_bar = 3;

dev_priv->ramin_size = pci_resource_len(dev->pdev, ramin_bar);
dev_priv->ramin = ioremap(
pci_resource_start(dev->pdev, ramin_bar),
dev_priv->ramin =
ioremap(pci_resource_start(dev->pdev, ramin_bar),
dev_priv->ramin_size);
if (!dev_priv->ramin) {
NV_ERROR(dev, "Failed to init RAMIN mapping, "
"limited instance memory available\n");
NV_ERROR(dev, "Failed to PRAMIN BAR");
return -ENOMEM;
}
}

/* On older cards (or if the above failed), create a map covering
* the BAR0 PRAMIN aperture */
if (!dev_priv->ramin) {
} else {
dev_priv->ramin_size = 1 * 1024 * 1024;
dev_priv->ramin = ioremap(mmio_start_offs + NV_RAMIN,
dev_priv->ramin_size);
dev_priv->ramin_size);
if (!dev_priv->ramin) {
NV_ERROR(dev, "Failed to map BAR0 PRAMIN.\n");
return -ENOMEM;
Expand Down

0 comments on commit d61a199

Please sign in to comment.