]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Unwind incomplete legacy context switches
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 23 Nov 2017 15:26:30 +0000 (15:26 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 23 Nov 2017 16:12:04 +0000 (16:12 +0000)
commit281b84750d835e75b990abce64fb4985ff80afa6
tree557beb020f4447a4b66262864d5596cc46b50ef2
parentb2d69bd93e6026ffab8e3d0a4c5149eb15fc5f66
drm/i915: Unwind incomplete legacy context switches

The legacy context switch for ringbuffer submission is multistaged,
where each of those stages may fail. However, we were updating global
state after some stages, and so we had to force the incomplete request
to be submitted because we could not unwind. Save the global state
before performing the switches, and so enable us to unwind back to the
previous global state should any phase fail. We then must cancel the
request instead of submitting it should the construction fail.

v2: s/saved_ctx/from_ctx/; s/ctx/to_ctx/ etc.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171123152631.31385-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/i915_gem_request.c
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.h