Re: [PATCH v2 03/17] drm/msm/a6xx: Switch to preemption safe AO counter
From: Rob Clark
Date: Mon Mar 30 2026 - 17:38:16 EST
On Mon, Mar 30, 2026 at 1:51 PM Akhil P Oommen <akhilpo@xxxxxxxxxxxxxxxx> wrote:
>
> On 3/27/2026 5:02 PM, Konrad Dybcio wrote:
> > On 3/27/26 1:13 AM, Akhil P Oommen wrote:
> >> CP_ALWAYS_ON_COUNTER is not save-restored during preemption, so it won't
> >> provide accurate data about the 'submit' when preemption is enabled.
> >> Switch to CP_ALWAYS_ON_CONTEXT which is preemption safe.
> >>
> >> Fixes: e7ae83da4a28 ("drm/msm/a6xx: Implement preemption for a7xx targets")
> >> Signed-off-by: Akhil P Oommen <akhilpo@xxxxxxxxxxxxxxxx>
> >> ---
> >
> > (this is not a blocking comment)
> >
> > would the _COUNTER counter be useful to keep for any other purpose?
>
> That is actually a good question. I was fixated on the fdinfo aspect
> that I missed that this is used in the submit_retire trace too. In the
> trace, I think it is preferable to use the _COUNTER (or keep both) so
> that we can visualize the order in which GPU processed the submits.
>
> Rob, what do you think? If required we can drop this patch from this
> series. Or I can send a fix up as this affect only the ftrace.
So.. there was some really old ftrace based gpu timeline visualization
in chrome ("catapult"), but that has been superceded by perfetto
userspace traces. The latter uses RB_DONE_TS event to record
timestamps.
I guess being able to record a sensable duration is the main thing.
BR,
-R