drm/i915/gt: Flush xcs before tgl breadcrumbs
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 2 Nov 2020 22:10:57 +0000 (22:10 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 3 Nov 2020 14:29:10 +0000 (14:29 +0000)
commit09212e81e5450743e5b06b27c4e344e4c45b630d
tree39a18bb5e19b31d08cb3a6ffcc6d7da35d8b3afc
parent2739d8cfc50aafff49d599cc0a5bc855445e99a7
drm/i915/gt: Flush xcs before tgl breadcrumbs

In a simple test case that writes to scratch and then busy-waits for the
batch to be signaled, we observe that the signal is before the write is
posted. That is bad news.

Splitting the flush + write_dword into two separate flush_dw prevents
the issue from being reproduced, we can presume the post-sync op is not
so post-sync.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/216
Testcase: igt/gem_exec_fence/parallel
Testcase: igt/i915_selftest/live/gt_timelines
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: stable@vger.kernel.org
Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201102221057.29626-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_lrc.c