aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 8b50d4820389..25b337438ca7 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3143,16 +3143,20 @@ static void
3143i915_gem_cleanup_hws(struct drm_device *dev) 3143i915_gem_cleanup_hws(struct drm_device *dev)
3144{ 3144{
3145 drm_i915_private_t *dev_priv = dev->dev_private; 3145 drm_i915_private_t *dev_priv = dev->dev_private;
3146 struct drm_gem_object *obj = dev_priv->hws_obj; 3146 struct drm_gem_object *obj;
3147 struct drm_i915_gem_object *obj_priv = obj->driver_private; 3147 struct drm_i915_gem_object *obj_priv;
3148 3148
3149 if (dev_priv->hws_obj == NULL) 3149 if (dev_priv->hws_obj == NULL)
3150 return; 3150 return;
3151 3151
3152 obj = dev_priv->hws_obj;
3153 obj_priv = obj->driver_private;
3154
3152 kunmap(obj_priv->page_list[0]); 3155 kunmap(obj_priv->page_list[0]);
3153 i915_gem_object_unpin(obj); 3156 i915_gem_object_unpin(obj);
3154 drm_gem_object_unreference(obj); 3157 drm_gem_object_unreference(obj);
3155 dev_priv->hws_obj = NULL; 3158 dev_priv->hws_obj = NULL;
3159
3156 memset(&dev_priv->hws_map, 0, sizeof(dev_priv->hws_map)); 3160 memset(&dev_priv->hws_map, 0, sizeof(dev_priv->hws_map));
3157 dev_priv->hw_status_page = NULL; 3161 dev_priv->hw_status_page = NULL;
3158 3162