]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Keep rings pinned while the context is active
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 19 Jun 2019 17:01:35 +0000 (18:01 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 19 Jun 2019 18:49:14 +0000 (19:49 +0100)
commitbaf4b170accf15381d4d2ff87a4648fba7816990
tree7a577ce0e9317a69065ecab4282bded8e4bd1a2b
parent1a020cf8c9bc0fcf5286d0707d9749b25b36940d
drm/i915: Keep rings pinned while the context is active

Remember to keep the rings pinned as well as the context image until the
GPU is no longer active.

v2: Introduce a ring->pin_count primarily to hide the
mock_ring that doesn't fit into the normal GGTT vma picture.

v3: Order is important in teardown, ringbuffer submission needs to drop
the pin count on the engine->kernel_context before it can gleefully free
its ring.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110946
Fixes: 66a3baea852f ("drm/i915: Keep contexts pinned until after the next kernel context switch")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190619170135.15281-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_context.c
drivers/gpu/drm/i915/gt/intel_engine_types.h
drivers/gpu/drm/i915/gt/intel_lrc.c
drivers/gpu/drm/i915/gt/intel_ringbuffer.c
drivers/gpu/drm/i915/gt/mock_engine.c