On Mon, 20 Mar 2023 at 15:14, Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxxxxxxx> wrote: > > From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> > > When considering whether to mark one context as stopped and another as > started we need to look at whether the previous and new _contexts_ are > different and not just requests. Otherwise the software tracked context > start time was incorrectly updated to the most recent lite-restore time- > stamp, which was in some cases resulting in active time going backward, > until the context switch (typically the hearbeat pulse) would synchronise > with the hardware tracked context runtime. Easiest use case to observe > this behaviour was with a full screen clients with close to 100% engine > load. > > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> > Fixes: bb6287cb1886 ("drm/i915: Track context current active time") > Cc: <stable@xxxxxxxxxxxxxxx> # v5.19+ Seems reasonable to me, fwiw, Reviewed-by: Matthew Auld <matthew.auld@xxxxxxxxx>