@@ -2003,7 +2003,6 @@ void intel_logical_ring_cleanup(struct intel_engine_cs *ring)
i915_cmd_parser_fini_ring(ring);
i915_gem_batch_pool_fini(&ring->batch_pool);
- lrc_teardown_hardware_status_page(ring);
ring->disable_lite_restore_wa = false;
ring->ctx_desc_template = 0;
@@ -2447,6 +2446,7 @@ void intel_lr_context_free(struct intel_context *ctx)
continue;
if (ctx == ctx->i915->kernel_context) {
+ lrc_teardown_hardware_status_page(ringbuf->ring);
intel_unpin_ringbuffer_obj(ringbuf);
i915_gem_object_ggtt_unpin(ctx_obj);
}
This has to be done before the containing object is freed, otherwise the mapping ends up pointing to no-longer-allocated memory :( Signed-off-by: Dave Gordon <david.s.gordon@intel.com> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> --- drivers/gpu/drm/i915/intel_lrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)