summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
authorDavid Airlie <airlied@asimov.stargames.com.au>2007-04-10 15:20:50 +1000
committerDavid Airlie <airlied@asimov.stargames.com.au>2007-04-10 15:20:50 +1000
commit40bd6dcd86d554ca426deccd4fbada693c4be8a6 (patch)
tree76638f691e5752623aeb7880d1e410791b164638 /shared-core
parent65f465ed5ad3caf773658bb2832785c963b987f6 (diff)
set the base address of the CRTC correctly
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/i915_dma.c4
-rw-r--r--shared-core/i915_drv.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c
index 2c14cb5d..c2a6d863 100644
--- a/shared-core/i915_dma.c
+++ b/shared-core/i915_dma.c
@@ -877,11 +877,13 @@ int i915_driver_load(drm_device_t *dev, unsigned long flags)
if (IS_I9XX(dev)) {
dev_priv->mmiobase = drm_get_resource_start(dev, 0);
dev_priv->mmiolen = drm_get_resource_len(dev, 0);
+ dev_priv->baseaddr = drm_get_resource_start(dev, 2) & 0xff000000;
} else if (drm_get_resource_start(dev, 1)) {
dev_priv->mmiobase = drm_get_resource_start(dev, 1);
dev_priv->mmiolen = drm_get_resource_len(dev, 1);
+ dev_priv->baseaddr = drm_get_resource_start(dev, 0) & 0xff000000;
} else {
- DRM_ERROR("Unable to find MMIO registers\n");
+ DRM_ERROR("Unable to find MMIO registers or FB\n");
return -ENODEV;
}
diff --git a/shared-core/i915_drv.h b/shared-core/i915_drv.h
index f37f5873..517d0bf6 100644
--- a/shared-core/i915_drv.h
+++ b/shared-core/i915_drv.h
@@ -92,6 +92,7 @@ typedef struct drm_i915_private {
drm_local_map_t *sarea;
drm_local_map_t *mmio_map;
+ unsigned long baseaddr;
unsigned long mmiobase;
unsigned long mmiolen;