v3d/simulator: wait for cache flushes
authorAlejandro Piñeiro <apinheiro@igalia.com>
Tue, 25 May 2021 21:52:48 +0000 (23:52 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Tue, 1 Jun 2021 10:22:28 +0000 (12:22 +0200)
commit7f3e34bcb4d9188aa06a0bafd7fd62f13ca92bed
tree1b10f2be1840d77c55bb777d9cba1ba5fdc1000a
parent9bd8d26969c51916e1cb39e66864f033294b9409
v3d/simulator: wait for cache flushes

Current code just assumes that flushes are instant, as simulator
doesn't really model the caches. So right now we have just an assert
that the flush has been done.

But that can change on the future, so let's change the assert for a
wait.

Note that for the l1t case we are writing on the field TMUWCF. So I
understand that then we need to wait for TMUWCF_SET, even if the
previous code was using L2TFLS_SET.

This also happpens on the kernel side. We need to check if this was a
typo on the kernel side.

v2 (from Juan feedback)
   * Add comment about the TMUWCF vs L2TFLS difference between this
     commit and the kernel.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11039>
src/broadcom/simulator/v3dx_simulator.c