Displaying 2 results from an estimated 2 matches for "nouveau_buffer_sync".
2013 Dec 02
2
[PATCH] nouveau: Add lots of comments to the buffer transfer logic
...*nv, struct nouveau_transfer *tx,
    nouveau_fence_ref(nv->screen->fence.current, &buf->fence_wr);
 }
 
-
+/* Does a CPU wait for the buffer's backing data to become reliably accessible
+ * for write/read by waiting on the buffer's relevant fences.
+ */
 static INLINE boolean
 nouveau_buffer_sync(struct nv04_resource *buf, unsigned rw)
 {
@@ -283,6 +292,7 @@ nouveau_buffer_transfer_del(struct nouveau_context *nv,
    }
 }
 
+/* Creates a cache in system memory of the buffer data. */
 static boolean
 nouveau_buffer_cache(struct nouveau_context *nv, struct nv04_resource *buf)
 {
@@ -317,6 +32...
2016 Jun 05
0
[RFC PATCH] nouveau: add locking
...fer_transfer_map(struct pipe_context *pipe,
       if (unlikely(usage & PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE)) {
          /* Discarding was not possible, must sync because
           * subsequent transfers might use UNSYNCHRONIZED. */
+         pipe_mutex_lock(screen->push_mutex);
          nouveau_buffer_sync(nv, buf, usage & PIPE_TRANSFER_READ_WRITE);
+         pipe_mutex_unlock(screen->push_mutex);
       } else
       if (usage & PIPE_TRANSFER_DISCARD_RANGE) {
          /* The whole range is being discarded, so it doesn't matter what was
@@ -488,10 +496,13 @@ nouveau_buffer_transfer_ma...