Commit 627965ad authored by Daniel Vetter's avatar Daniel Vetter

drm/i915: kill pointless clearing of dev_priv->hws_map

We kzalloc dev_priv, and we never use hws_map in intel_ringbuffer.c.
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Acked-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Signed-Off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent b3daeaef
...@@ -890,7 +890,6 @@ i915_dispatch_execbuffer(struct intel_ring_buffer *ring, ...@@ -890,7 +890,6 @@ i915_dispatch_execbuffer(struct intel_ring_buffer *ring,
static void cleanup_status_page(struct intel_ring_buffer *ring) static void cleanup_status_page(struct intel_ring_buffer *ring)
{ {
drm_i915_private_t *dev_priv = ring->dev->dev_private;
struct drm_i915_gem_object *obj; struct drm_i915_gem_object *obj;
obj = ring->status_page.obj; obj = ring->status_page.obj;
...@@ -901,14 +900,11 @@ static void cleanup_status_page(struct intel_ring_buffer *ring) ...@@ -901,14 +900,11 @@ static void cleanup_status_page(struct intel_ring_buffer *ring)
i915_gem_object_unpin(obj); i915_gem_object_unpin(obj);
drm_gem_object_unreference(&obj->base); drm_gem_object_unreference(&obj->base);
ring->status_page.obj = NULL; ring->status_page.obj = NULL;
memset(&dev_priv->hws_map, 0, sizeof(dev_priv->hws_map));
} }
static int init_status_page(struct intel_ring_buffer *ring) static int init_status_page(struct intel_ring_buffer *ring)
{ {
struct drm_device *dev = ring->dev; struct drm_device *dev = ring->dev;
drm_i915_private_t *dev_priv = dev->dev_private;
struct drm_i915_gem_object *obj; struct drm_i915_gem_object *obj;
int ret; int ret;
...@@ -929,7 +925,6 @@ static int init_status_page(struct intel_ring_buffer *ring) ...@@ -929,7 +925,6 @@ static int init_status_page(struct intel_ring_buffer *ring)
ring->status_page.gfx_addr = obj->gtt_offset; ring->status_page.gfx_addr = obj->gtt_offset;
ring->status_page.page_addr = kmap(obj->pages[0]); ring->status_page.page_addr = kmap(obj->pages[0]);
if (ring->status_page.page_addr == NULL) { if (ring->status_page.page_addr == NULL) {
memset(&dev_priv->hws_map, 0, sizeof(dev_priv->hws_map));
goto err_unpin; goto err_unpin;
} }
ring->status_page.obj = obj; ring->status_page.obj = obj;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment