When a context is saved and then restored, the timer delta is calculated using signed 32 bit arithmetic on hardware written value to PPHWSP/LRC image and previously stored value, which use unsigned types. This difference may become negative for version 12, due to hardware quirk on these platforms. This in turn, would cause -EOVERFLOW to be thrown inside live_pphwsp_runtime test.
Similar case has been observed [1] and addressed [2] already, so follow suit and disable the test here as well. [1] https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/13697 [2] "73782fc64793 (i915/gt/selftests: Disable lrc_timestamp test)" Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/16521 Signed-off-by: Krzysztof Karas <[email protected]> --- drivers/gpu/drm/i915/gt/selftest_lrc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/selftest_lrc.c b/drivers/gpu/drm/i915/gt/selftest_lrc.c index 23f04f6f8fba..d5196ef4a1e5 100644 --- a/drivers/gpu/drm/i915/gt/selftest_lrc.c +++ b/drivers/gpu/drm/i915/gt/selftest_lrc.c @@ -1955,6 +1955,13 @@ static int live_pphwsp_runtime(void *arg) enum intel_engine_id id; int err = 0; + /* + * Gen12 (TGL/DG2) has a hardware quirk, where CTX_TIMESTAMP may + * appear to go backwards, causing sporadic underflow detections. + */ + if (GRAPHICS_VER(gt->i915) == 12) + return 0; + /* * Check that cumulative context runtime as stored in the pphwsp[16] * is monotonic. -- 2.34.1
