drm/i915: Remove unused head member in request struct
Subsystems (2)
PATCH 1/2 drm/i915: Remove unused head member in request struct
commit 939fd762083f988be271da8c96398178daf9baf0
Author: Mika Kuoppala <[email protected]> Date: Thu Jan 30 19:04:44 2014 +0200
drm/i915: Get rid of acthd based guilty batch search
Failed to cleanup properly as it made the head obsolete.
Signed-off-by Mika Kuoppala <[email protected]>
--- drivers/gpu/drm/i915/i915_drv.h | 3 --- drivers/gpu/drm/i915/i915_gem.c | 3 --- 2 files changed, 6 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +0 -3
@@ -2124,9 +2124,6 @@ struct drm_i915_gem_request {/** GEM sequence number associated with this request. */ uint32_t seqno; -/** Position in the ringbuffer of the start of the request */ -u32 head; -/** * Position in the ringbuffer of the start of the postfix. * This is required to calculate the maximum available ringbuffer
drivers/gpu/drm/i915/i915_gem.c +0 -3
@@ -2414,7 +2414,6 @@ int __i915_add_request(struct intel_engine_cs *ring,struct drm_i915_private *dev_priv = ring->dev->dev_private;struct drm_i915_gem_request *request;struct intel_ringbuffer *ringbuf; -u32 request_start;int ret; request = ring->outstanding_lazy_request;
@@ -2426,7 +2425,6 @@ int __i915_add_request(struct intel_engine_cs *ring, }else ringbuf = ring->buffer; - request_start =intel_ring_get_tail (ringbuf);/* * Emit any outstanding flushes - execbuf can fail to emit the flush * after having emitted the batchbuffer command. Hence we need to fix
@@ -2461,7 +2459,6 @@ int __i915_add_request(struct intel_engine_cs *ring,return ret; } - request->head = request_start; request->tail =intel_ring_get_tail (ringbuf);/* Whilst this request exists, batch_obj will be on the
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915: Remove unneeded check on execlist ringbuf alloc
We just allocated the intel_ringbuffer with kzalloc. There is no chance of the ringbuf->obj being other than NULL so remove the redudant check.
Signed-off-by Mika Kuoppala <[email protected]>
--- drivers/gpu/drm/i915/intel_lrc.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/intel_lrc.c +13 -16
@@ -1861,25 +1861,22 @@ int intel_lr_context_deferred_create(struct intel_context *ctx, ringbuf->last_retired_head =-1 ;intel_ring_update_space (ringbuf); -if (ringbuf->obj ==NULL ) { - ret =intel_alloc_ringbuffer_obj (dev, ringbuf); + ret =intel_alloc_ringbuffer_obj (dev, ringbuf); +if (ret) { +DRM_DEBUG_DRIVER ( +"Failed to allocate ringbuffer obj %s: %d\n" , + ring->name, ret); + goto error_free_rbuf; + } + +if (is_global_default_ctx) { + ret =intel_pin_and_map_ringbuffer_obj (dev, ringbuf);if (ret) { -DRM_DEBUG_DRIVER ( -"Failed to allocate ringbuffer obj %s: %d\n" , +DRM_ERROR ( +"Failed to pin and map ringbuffer %s: %d\n" , ring->name, ret); - goto error_free_rbuf; + goto error_destroy_rbuf; } - -if (is_global_default_ctx) { - ret =intel_pin_and_map_ringbuffer_obj (dev, ringbuf); -if (ret) { -DRM_ERROR ( -"Failed to pin and map ringbuffer %s: %d\n" , - ring->name, ret); - goto error_destroy_rbuf; - } - } - } ret =populate_lr_context (ctx, ctx_obj, ring, ringbuf);
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx