Re: [PATCH v2] drm/vc4: Add a debugfs entry to disable/enable the load tracker

From: Paul Kocialkowski
Date: Sat Dec 01 2018 - 04:57:38 EST


Hi Eric,

Le vendredi 30 novembre 2018 Ã 12:30 -0800, Eric Anholt a Ãcrit :
> Paul Kocialkowski <paul.kocialkowski@xxxxxxxxxxx> writes:
>
> > In order to test whether the load tracker is working as expected, we
> > need the ability to compare the commit result with the underrun
> > indication. With the load tracker always enabled, commits that are
> > expected to trigger an underrun are always rejected, so userspace
> > cannot get the actual underrun indication from the hardware.
> >
> > Add a debugfs entry to disable/enable the load tracker, so that a DRM
> > commit expected to trigger an underrun can go through with the load
> > tracker disabled. The underrun indication is then available to
> > userspace and can be checked against the commit result with the load
> > tracker enabled.
> >
> > Signed-off-by: Paul Kocialkowski <paul.kocialkowski@xxxxxxxxxxx>
>
> Given that the load tracker is going to be conservative and say things
> will underrun even when they might not in practice, will this actually
> be useful for automated testing? Or is the intent to make it easier to
> tune the load tracker by disabling it so that you can experiment freely?

The intent here is to be able to compare the load tracker's result with
the underrun indication from the HVS.

The idea is to have the following testing scheme:
1. enable the load tracker
2. try a commit and get the errno if it fails
3. disable the load tracker
4. do the commit
5. wait for vblank and get the underrun indication
6. check that the underrun occurs when errno == -ENOSPC

This way, we can find out when the load tracker gave us a false
positive and refine the load calculation.

Cheers,

Paul