drm/i915/gt: Explicitly clear BB_OFFSET for new contexts
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 13 Sep 2022 15:21:48 +0000 (17:21 +0200)
committerAndi Shyti <andi.shyti@linux.intel.com>
Wed, 14 Sep 2022 11:20:12 +0000 (13:20 +0200)
commitc9424fa1f856eaf09e09a3381fe998dd6f905bfc
treeac5020861889a85d65dc59903edadcfbfe77638e
parent69a3738ba57f4837a7632064b2f8c567282e03b3
drm/i915/gt: Explicitly clear BB_OFFSET for new contexts

Even though the initial protocontext we load onto HW has the register
cleared, by the time we save it into the default image, BB_OFFSET has
had the enable bit set. Reclear BB_OFFSET for each new context.

Testcase: igt/i915_selftests/gt_lrc

v2:
  Extend it for gen8.
v3:
  BB_OFFSET is recorded per engine from Gen9 onwards

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
Signed-off-by: Karolina Drobnik <karolina.drobnik@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/37c67abb3303852f06a570a4360addf52bf941c1.1663081418.git.karolina.drobnik@intel.com
drivers/gpu/drm/i915/gt/intel_engine_regs.h
drivers/gpu/drm/i915/gt/intel_lrc.c
drivers/gpu/drm/i915/gt/selftest_lrc.c