]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Add per ctx batchbuffer wa for timestamp
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Fri, 24 Apr 2020 23:05:46 +0000 (02:05 +0300)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 25 Apr 2020 17:39:32 +0000 (18:39 +0100)
commit685d21096f6ceb44bda186dd42520f2a9d21d1aa
tree5d3e30bb8a1b07b4d62c8caaee49ee1953f2bfa5
parent168c6d231b4b8f0c647eb2fda86e06b62cf68c7a
drm/i915: Add per ctx batchbuffer wa for timestamp

Restoration of a previous timestamp can collide
with updating the timestamp, causing a value corruption.

Combat this issue by using indirect ctx bb to
modify the context image during restoring process.

We can preload value into scratch register. From which
we then do the actual write with LRR. LRR is faster and
thus less error prone as probability of race drops.

v2: tidying (Chris)
v3: lrr for all engines
v4: grp
v5: reg bit
v6: wa_bb_offset, virtual engines (Chris)

References: HSDES#16010904313
Testcase: igt/i915_selftest/gt_lrc
Suggested-by: Joseph Koston <joseph.koston@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200424230546.30271-1-mika.kuoppala@linux.intel.com
drivers/gpu/drm/i915/gt/intel_context_types.h
drivers/gpu/drm/i915/gt/intel_gpu_commands.h
drivers/gpu/drm/i915/gt/intel_lrc.c