[PATCH] drm/i915: Fix context runtime accounting

Matthew Auld matthew.william.auld at gmail.com
Fri Mar 31 06:25:11 UTC 2023


On Mon, 20 Mar 2023 at 15:14, Tvrtko Ursulin
<tvrtko.ursulin at linux.intel.com> wrote:
>
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>
> 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 at intel.com>
> Fixes: bb6287cb1886 ("drm/i915: Track context current active time")
> Cc: <stable at vger.kernel.org> # v5.19+

Seems reasonable to me, fwiw,
Reviewed-by: Matthew Auld <matthew.auld at intel.com>


More information about the dri-devel mailing list