The upload path is intended to avoid stalling on host in order to mmap
recently allocated buffers. But if we already had to mmap it, no point
in taking the upload path.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18604>
{
struct virtio_bo *virtio_bo = to_virtio_bo(bo);
+ /* If we've already taken the hit of mmap'ing the buffer, then no reason
+ * to take the upload path:
+ */
+ if (bo->map)
+ return false;
+
if (len > 0x4000)
return false;