[Intel-gfx] [PATCH 2/4] drm/i915: Introduce SAGV mutex.
Rodrigo Vivi
rodrigo.vivi at intel.com
Mon Feb 26 22:20:38 UTC 2018
On Mon, Feb 26, 2018 at 09:21:19PM +0000, Chris Wilson wrote:
> Quoting Rodrigo Vivi (2018-02-26 20:53:07)
> > Now that we are spreading the places we can manipulate
> > sagv status let's protect it.
>
> This needs a lot more information about the protection you need. "sagv
> status" is too similar to sagv_status, so it seems like you are simply
> talking about protecting access to that variable, which doesn't make
> sense. So I presume you are talking about ordering enable/disable, which
> opens up a heap of questions as to why, and what should be done about
> the implied races in wanting to disable sagv
> before/during/immediately-after enabling it. (Even accepting the race
> conditions exist, you only needed to correct access to sagv; a mutex for
> a single variable is massive overkill. So again, the reader is left
> presuming you intend more.)
Yeap... Many intentions missing here indeed... sorry.
The intention here is to disable SAGV on any first fifo underrun interrupt
that could happen at anytime. And keep that disabled forever.
I don't want the sagv enable during modeset to enable that again. Because
I don't know what is happening to the machine anymore. Better to waste some
power than having the risk of hanging the machine.
So the sagv status variable already contain the
SAGV_NOT_CONTROLLED state and I wanted to use that to block SAGV.
I also want to disable SAGV as needed on any atomic commit, not only on
full modeset. [1] (Main missing part on this series probably)
The concurrence on disable wouldn't be a problem because the disable
sequence itself is already protected by the pcu mutex. However
the end result of sagv.status would be problematic. Because if plane
update disable sagv leaving STATUS_DISABLED, the next modeset would
enable SAGV back.
[1] https://patchwork.freedesktop.org/series/38806/
> -Chris
More information about the Intel-gfx
mailing list