projects
/
platform
/
upstream
/
libdrm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
deba42e
)
novueau: try resource 3 if resource 2 is 0 length
author
Dave Airlie
<airlied@linux.ie>
Tue, 9 Jan 2007 02:38:36 +0000
(13:38 +1100)
committer
Dave Airlie
<airlied@linux.ie>
Tue, 9 Jan 2007 02:48:38 +0000
(13:48 +1100)
This happens on my NV43 PPC
shared-core/nouveau_state.c
patch
|
blob
|
history
diff --git
a/shared-core/nouveau_state.c
b/shared-core/nouveau_state.c
index
44f8c1a
..
1e0587f
100644
(file)
--- a/
shared-core/nouveau_state.c
+++ b/
shared-core/nouveau_state.c
@@
-66,8
+66,12
@@
int nouveau_firstopen(struct drm_device *dev)
/* map larger RAMIN aperture on NV40 cards */
if (dev_priv->card_type >= NV_40) {
- ret = drm_addmap(dev, drm_get_resource_start(dev, 2),
- drm_get_resource_len(dev, 2),
+ int ramin_resource = 2;
+ if (drm_get_resource_len(dev, ramin_resource) == 0)
+ ramin_resource = 3;
+
+ ret = drm_addmap(dev, drm_get_resource_start(dev, ramin_resource),
+ drm_get_resource_len(dev, ramin_resource),
_DRM_REGISTERS,
_DRM_READ_ONLY,
&dev_priv->ramin);