Lines Matching refs:bytes

206 static bool vmw_fifo_is_full(struct vmw_private *dev_priv, uint32_t bytes)  in vmw_fifo_is_full()  argument
214 return ((max - next_cmd) + (stop - min) <= bytes); in vmw_fifo_is_full()
218 uint32_t bytes, bool interruptible, in vmw_fifo_wait_noirq() argument
231 if (!vmw_fifo_is_full(dev_priv, bytes)) in vmw_fifo_wait_noirq()
251 uint32_t bytes, bool interruptible, in vmw_fifo_wait() argument
256 if (likely(!vmw_fifo_is_full(dev_priv, bytes))) in vmw_fifo_wait()
261 return vmw_fifo_wait_noirq(dev_priv, bytes, in vmw_fifo_wait()
270 !vmw_fifo_is_full(dev_priv, bytes), timeout); in vmw_fifo_wait()
274 !vmw_fifo_is_full(dev_priv, bytes), timeout); in vmw_fifo_wait()
298 uint32_t bytes) in vmw_local_fifo_reserve() argument
313 if (unlikely(bytes >= (max - min))) in vmw_local_fifo_reserve()
319 fifo_state->reserved_size = bytes; in vmw_local_fifo_reserve()
327 if (likely((next_cmd + bytes < max || in vmw_local_fifo_reserve()
328 (next_cmd + bytes == max && stop > min)))) in vmw_local_fifo_reserve()
331 else if (vmw_fifo_is_full(dev_priv, bytes)) { in vmw_local_fifo_reserve()
332 ret = vmw_fifo_wait(dev_priv, bytes, in vmw_local_fifo_reserve()
341 if (likely((next_cmd + bytes < stop))) in vmw_local_fifo_reserve()
344 ret = vmw_fifo_wait(dev_priv, bytes, in vmw_local_fifo_reserve()
352 if (reserveable || bytes <= sizeof(uint32_t)) { in vmw_local_fifo_reserve()
356 vmw_mmio_write(bytes, fifo_mem + in vmw_local_fifo_reserve()
367 if (bytes < fifo_state->static_buffer_size) in vmw_local_fifo_reserve()
370 fifo_state->dynamic_buffer = vmalloc(bytes); in vmw_local_fifo_reserve()
382 void *vmw_fifo_reserve_dx(struct vmw_private *dev_priv, uint32_t bytes, in vmw_fifo_reserve_dx() argument
388 ret = vmw_cmdbuf_reserve(dev_priv->cman, bytes, in vmw_fifo_reserve_dx()
391 ret = vmw_local_fifo_reserve(dev_priv, bytes); in vmw_fifo_reserve_dx()
398 (unsigned) bytes); in vmw_fifo_reserve_dx()
409 uint32_t max, uint32_t min, uint32_t bytes) in vmw_fifo_res_copy() argument
416 if (bytes < chunk_size) in vmw_fifo_res_copy()
417 chunk_size = bytes; in vmw_fifo_res_copy()
419 vmw_mmio_write(bytes, fifo_mem + SVGA_FIFO_RESERVED); in vmw_fifo_res_copy()
422 rest = bytes - chunk_size; in vmw_fifo_res_copy()
430 uint32_t max, uint32_t min, uint32_t bytes) in vmw_fifo_slow_copy() argument
435 while (bytes > 0) { in vmw_fifo_slow_copy()
443 bytes -= sizeof(uint32_t); in vmw_fifo_slow_copy()
447 static void vmw_local_fifo_commit(struct vmw_private *dev_priv, uint32_t bytes) in vmw_local_fifo_commit() argument
457 bytes += sizeof(struct vmw_temp_set_context); in vmw_local_fifo_commit()
460 BUG_ON((bytes & 3) != 0); in vmw_local_fifo_commit()
461 BUG_ON(bytes > fifo_state->reserved_size); in vmw_local_fifo_commit()
468 next_cmd, max, min, bytes); in vmw_local_fifo_commit()
471 next_cmd, max, min, bytes); in vmw_local_fifo_commit()
482 next_cmd += bytes; in vmw_local_fifo_commit()
497 void vmw_fifo_commit(struct vmw_private *dev_priv, uint32_t bytes) in vmw_fifo_commit() argument
500 vmw_cmdbuf_commit(dev_priv->cman, bytes, NULL, false); in vmw_fifo_commit()
502 vmw_local_fifo_commit(dev_priv, bytes); in vmw_fifo_commit()
512 void vmw_fifo_commit_flush(struct vmw_private *dev_priv, uint32_t bytes) in vmw_fifo_commit_flush() argument
515 vmw_cmdbuf_commit(dev_priv->cman, bytes, NULL, true); in vmw_fifo_commit_flush()
517 vmw_local_fifo_commit(dev_priv, bytes); in vmw_fifo_commit_flush()
543 uint32_t bytes = sizeof(u32) + sizeof(*cmd_fence); in vmw_fifo_send_fence() local
545 fm = vmw_fifo_reserve(dev_priv, bytes); in vmw_fifo_send_fence()
572 vmw_fifo_commit_flush(dev_priv, bytes); in vmw_fifo_send_fence()
701 void *vmw_fifo_reserve(struct vmw_private *dev_priv, uint32_t bytes) in vmw_fifo_reserve() argument
703 return vmw_fifo_reserve_dx(dev_priv, bytes, SVGA3D_INVALID_ID); in vmw_fifo_reserve()