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)
diff --git a/.pick_status.json b/.pick_status.json
index e363361..dbe839e 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -301,7 +301,7 @@
         "description": "panfrost: Make sure we always add a reader -> write dependency when needed",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "c6ebff3ecdde46ef7925326522395b4a50dd65a3"
     },