]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
drm/i915: Use engine->context_pin() to report the intel_ring
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 4 May 2017 09:33:08 +0000 (10:33 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 4 May 2017 10:54:43 +0000 (11:54 +0100)
commit266a240bf0abf1e00e72e571f3724ec753a35f19
tree9420a39973e08d49658dcfd958c816a33abf5c3e
parentc944a308a95ab456c9cee4df4b4fa01763b94621
drm/i915: Use engine->context_pin() to report the intel_ring

Since unifying ringbuffer/execlist submission to use
engine->pin_context, we ensure that the intel_ring is available before
we start constructing the request. We can therefore move the assignment
of the request->ring to the central i915_gem_request_alloc() and not
require it in every engine->request_alloc() callback. Another small step
towards simplification (of the core, but at a cost of handling error
pointers in less important callers of engine->pin_context).

v2: Rearrange a few branches to reduce impact of PTR_ERR() on gcc's code
generation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Oscar Mateo <oscar.mateo@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Oscar Mateo <oscar.mateo@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170504093308.4137-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gvt/scheduler.c
drivers/gpu/drm/i915/i915_gem_request.c
drivers/gpu/drm/i915/i915_perf.c
drivers/gpu/drm/i915/intel_engine_cs.c
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.h
drivers/gpu/drm/i915/selftests/mock_engine.c