OSDN Git Service

drm/i915: Store the intel_context_ops in the intel_engine_cs
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 8 Mar 2019 13:25:18 +0000 (13:25 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 8 Mar 2019 13:59:50 +0000 (13:59 +0000)
commit4dc84b77b07731b7f5de2ce14b5f0526a86f013d
treedab57196ae00549822468476afab8c77cc68e252
parent39e2f501c1b431bd9291308e1ef02b9a02fffbee
drm/i915: Store the intel_context_ops in the intel_engine_cs

If we place a pointer to the engine specific intel_context_ops in the
engine itself, we can assign the ops pointer on initialising the
context, and then rely on it being set. This simplifies the code in
later patches.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190308132522.21573-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/intel_engine_types.h
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/selftests/mock_engine.c