search for: pipe_transfer_discard_whole_resourc

Displaying 2 results from an estimated 2 matches for "pipe_transfer_discard_whole_resourc".

2013 Dec 02
2
[PATCH] nouveau: Add lots of comments to the buffer transfer logic
...ystem memory of the buffer data. */ static boolean nouveau_buffer_cache(struct nouveau_context *nv, struct nv04_resource *buf) { @@ -317,6 +327,10 @@ nouveau_buffer_cache(struct nouveau_context *nv, struct nv04_resource *buf) #define NOUVEAU_TRANSFER_DISCARD \ (PIPE_TRANSFER_DISCARD_RANGE | PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE) +/* Checks whether it is possible to completely discard the memory backing this + * resource. This can be useful if we would otherwise have to wait for a read + * operation to complete on this data. + */ static INLINE boolean nouveau_buffer_should_discard(struct nv04_resource *buf, unsigned u...
2016 Jun 05
0
[RFC PATCH] nouveau: add locking
...uveau_buffer_cache(nv, buf); + pipe_mutex_unlock(screen->push_mutex); + } } } return buf->data ? (buf->data + box->x) : tx->map; @@ -479,7 +485,9 @@ nouveau_buffer_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...