aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 62a4bf7b49df..bbadf1c04142 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -177,6 +177,14 @@ static int i915_initialize(struct drm_device * dev, drm_i915_init_t * init)
177 drm_i915_private_t *dev_priv = dev->dev_private; 177 drm_i915_private_t *dev_priv = dev->dev_private;
178 struct drm_i915_master_private *master_priv = dev->primary->master->driver_priv; 178 struct drm_i915_master_private *master_priv = dev->primary->master->driver_priv;
179 179
180 master_priv->sarea = drm_getsarea(dev);
181 if (master_priv->sarea) {
182 master_priv->sarea_priv = (drm_i915_sarea_t *)
183 ((u8 *)master_priv->sarea->handle + init->sarea_priv_offset);
184 } else {
185 DRM_DEBUG("sarea not found assuming DRI2 userspace\n");
186 }
187
180 if (init->ring_size != 0) { 188 if (init->ring_size != 0) {
181 if (dev_priv->ring.ring_obj != NULL) { 189 if (dev_priv->ring.ring_obj != NULL) {
182 i915_dma_cleanup(dev); 190 i915_dma_cleanup(dev);
@@ -1152,6 +1160,8 @@ int i915_driver_unload(struct drm_device *dev)
1152 if (drm_core_check_feature(dev, DRIVER_MODESET)) { 1160 if (drm_core_check_feature(dev, DRIVER_MODESET)) {
1153 intel_modeset_cleanup(dev); 1161 intel_modeset_cleanup(dev);
1154 1162
1163 i915_gem_free_all_phys_object(dev);
1164
1155 mutex_lock(&dev->struct_mutex); 1165 mutex_lock(&dev->struct_mutex);
1156 i915_gem_cleanup_ringbuffer(dev); 1166 i915_gem_cleanup_ringbuffer(dev);
1157 mutex_unlock(&dev->struct_mutex); 1167 mutex_unlock(&dev->struct_mutex);