panfrost: Make sure we always add a reader -> write dependency when needed

We shouldn't reset the ->writer field when a reader comes in because we
want subsequent readers to have a dependency on the writer too. Let's
add a new field encoding the last access type and use it to replace the
writer != NULL test.

Reported-by: Roman Elshin
Fixes: c6ebff3ecdde ("panfrost: Remove panfrost_bo_access type")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7831>
(cherry picked from commit 387221e4f2b9339633f84d8b91774ddd302ed60a)
2 files changed