drm/i915: Drop return value from lrc_setup_hardware_status_page
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 18 Nov 2014 08:09:32 +0000 (09:09 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 18 Nov 2014 08:09:32 +0000 (09:09 +0100)
kmap never fails.

Spotted-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Arun Siluvery <arun.siluvery@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
drivers/gpu/drm/i915/intel_lrc.c

index b7c4c9ab9012d4647d365a735e4e2449cbd49c54..3cf15c4da0e871960975f76bd078f4143d27d2b9 100644 (file)
@@ -1706,7 +1706,7 @@ static uint32_t get_lr_context_size(struct intel_engine_cs *ring)
        return ret;
 }
 
-static int lrc_setup_hardware_status_page(struct intel_engine_cs *ring,
+static void lrc_setup_hardware_status_page(struct intel_engine_cs *ring,
                struct drm_i915_gem_object *default_ctx_obj)
 {
        struct drm_i915_private *dev_priv = ring->dev->dev_private;
@@ -1716,15 +1716,11 @@ static int lrc_setup_hardware_status_page(struct intel_engine_cs *ring,
        ring->status_page.gfx_addr = i915_gem_obj_ggtt_offset(default_ctx_obj);
        ring->status_page.page_addr =
                        kmap(sg_page(default_ctx_obj->pages->sgl));
-       if (ring->status_page.page_addr == NULL)
-               return -ENOMEM;
        ring->status_page.obj = default_ctx_obj;
 
        I915_WRITE(RING_HWS_PGA(ring->mmio_base),
                        (u32)ring->status_page.gfx_addr);
        POSTING_READ(RING_HWS_PGA(ring->mmio_base));
-
-       return 0;
 }
 
 /**
@@ -1811,13 +1807,8 @@ int intel_lr_context_deferred_create(struct intel_context *ctx,
        ctx->engine[ring->id].ringbuf = ringbuf;
        ctx->engine[ring->id].state = ctx_obj;
 
-       if (ctx == ring->default_context) {
-               ret = lrc_setup_hardware_status_page(ring, ctx_obj);
-               if (ret) {
-                       DRM_ERROR("Failed to setup hardware status page\n");
-                       goto error;
-               }
-       }
+       if (ctx == ring->default_context)
+               lrc_setup_hardware_status_page(ring, ctx_obj);
 
        if (ring->id == RCS && !ctx->rcs_initialized) {
                if (ring->init_context) {