summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Noland <rnoland@2hip.net>2008-08-20 17:20:31 -0400
committerRobert Noland <rnoland@2hip.net>2008-08-24 15:25:20 -0400
commit739b01dde43c40398d9b0d177e9d330e06cdc2ae (patch)
treea33a9454cb15d40093126f7b8c8b007a544c006a
parent1f3c4dd938a1710d762bac37dfb1b17c90af4732 (diff)
i915: Clear sarea_priv during lastclose.
sarea_priv needs to be NULL before i915_initialized is called to properly reset it. The stale value produces a panic any time something opens/closes drm without calling initialize. i.e. version checking
-rw-r--r--shared-core/i915_dma.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c
index 84aafaae..77b4181c 100644
--- a/shared-core/i915_dma.c
+++ b/shared-core/i915_dma.c
@@ -1142,6 +1142,8 @@ void i915_driver_lastclose(struct drm_device * dev)
if (drm_getsarea(dev) && dev_priv->sarea_priv)
i915_do_cleanup_pageflip(dev);
+ if (dev_priv->sarea_priv)
+ dev_priv->sarea_priv = NULL;
if (dev_priv->agp_heap)
i915_mem_takedown(&(dev_priv->agp_heap));
#if defined(I915_HAVE_BUFFER)