summaryrefslogtreecommitdiff
path: root/shared-core/i915_init.c
diff options
context:
space:
mode:
authorJerome Glisse <glisse@freedesktop.org>2008-03-20 17:44:32 +0100
committerJohn Doe <glisse@freedesktop.org>2008-03-20 17:44:32 +0100
commit71b66b00435a10e762a4bb7abedb263196942da4 (patch)
tree99bbf149f64f14fdc2cd389ec53188c7ce4e040f /shared-core/i915_init.c
parent6ef119abf5d19c85fe039fd19d12e9bd64fd44df (diff)
parent607964ed9e5f6d86a0960bef2341e7f5de9c71da (diff)
Merge branch 'modesetting-101' of ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Diffstat (limited to 'shared-core/i915_init.c')
-rw-r--r--shared-core/i915_init.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/shared-core/i915_init.c b/shared-core/i915_init.c
index 3d8a1dca..a76acb4e 100644
--- a/shared-core/i915_init.c
+++ b/shared-core/i915_init.c
@@ -130,6 +130,14 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
dev->types[8] = _DRM_STAT_SECONDARY;
dev->types[9] = _DRM_STAT_DMA;
+ if (IS_MOBILE(dev) || IS_I9XX(dev))
+ dev_priv->cursor_needs_physical = true;
+ else
+ dev_priv->cursor_needs_physical = false;
+
+ if (IS_I965G(dev) || IS_G33(dev))
+ dev_priv->cursor_needs_physical = false;
+
if (IS_I9XX(dev)) {
pci_read_config_dword(dev->pdev, 0x5C, &dev_priv->stolen_base);
DRM_DEBUG("stolen base %p\n", (void*)dev_priv->stolen_base);
@@ -269,7 +277,6 @@ int i915_driver_unload(struct drm_device *dev)
I915_WRITE(LP_RING + RING_LEN, 0);
-
if (drm_core_check_feature(dev, DRIVER_MODESET)) {
drm_irq_uninstall(dev);
intel_modeset_cleanup(dev);
@@ -283,7 +290,6 @@ int i915_driver_unload(struct drm_device *dev)
if (dev_priv->sarea_kmap.virtual) {
drm_bo_kunmap(&dev_priv->sarea_kmap);
dev_priv->sarea_kmap.virtual = NULL;
- dev->primary->master->lock.hw_lock = NULL;
dev->sigdata.lock = NULL;
}
@@ -377,7 +383,9 @@ void i915_master_destroy(struct drm_device *dev, struct drm_master *master)
if (!master_priv)
return;
- drm_rmmap(dev, master_priv->sarea);
+ if (master_priv->sarea)
+ drm_rmmap(dev, master_priv->sarea);
+
drm_free(master_priv, sizeof(*master_priv), DRM_MEM_DRIVER);
master->driver_priv = NULL;