]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gt: Use the local HWSP offset during submission
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 22 Oct 2020 06:41:27 +0000 (07:41 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 23 Oct 2020 12:35:38 +0000 (13:35 +0100)
commit2ef943b9e6952f4f4ac5f94e5f983c52d6873aa2
treee8e97e63028f7fdcad248c38a8fe66166d5d63e4
parent9c1009e3111bf75542825948c3db8460384419b0
drm/i915/gt: Use the local HWSP offset during submission

We wrap the timeline on construction of the next request, but there may
still be requests in flight that have not yet finalized the breadcrumb.
(The breadcrumb is delayed as we need engine-local offsets, and for the
virtual engine that is not known until execution.) As such, by the time
we write to the timeline's HWSP offset it may have changed, and we
should use the value we preserved in the request instead.

Though the window is small and infrequent (at full flow we can expect a
timeline's seqno to wrap once every 30 minutes), the impact of writing
the old seqno into the new HWSP is severe: the old requests are never
completed, and the new requests are completed before they are even
submitted.

Fixes: 6f53fdf7650e ("drm/i915: Keep timeline HWSP allocated until idle across the system")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: <stable@vger.kernel.org> # v5.2+
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201022064127.10159-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_lrc.c
drivers/gpu/drm/i915/gt/intel_timeline.c
drivers/gpu/drm/i915/gt/intel_timeline_types.h