Lines Matching refs:bytes

186 static bool vmw_fifo_is_full(struct vmw_private *dev_priv, uint32_t bytes)  in vmw_fifo_is_full()  argument
193 return ((max - next_cmd) + (stop - min) <= bytes); in vmw_fifo_is_full()
197 uint32_t bytes, bool interruptible, in vmw_fifo_wait_noirq() argument
210 if (!vmw_fifo_is_full(dev_priv, bytes)) in vmw_fifo_wait_noirq()
230 uint32_t bytes, bool interruptible, in vmw_fifo_wait() argument
235 if (likely(!vmw_fifo_is_full(dev_priv, bytes))) in vmw_fifo_wait()
240 return vmw_fifo_wait_noirq(dev_priv, bytes, in vmw_fifo_wait()
249 !vmw_fifo_is_full(dev_priv, bytes), timeout); in vmw_fifo_wait()
253 !vmw_fifo_is_full(dev_priv, bytes), timeout); in vmw_fifo_wait()
277 uint32_t bytes) in vmw_local_fifo_reserve() argument
292 if (unlikely(bytes >= (max - min))) in vmw_local_fifo_reserve()
298 fifo_state->reserved_size = bytes; in vmw_local_fifo_reserve()
306 if (likely((next_cmd + bytes < max || in vmw_local_fifo_reserve()
307 (next_cmd + bytes == max && stop > min)))) in vmw_local_fifo_reserve()
310 else if (vmw_fifo_is_full(dev_priv, bytes)) { in vmw_local_fifo_reserve()
311 ret = vmw_fifo_wait(dev_priv, bytes, in vmw_local_fifo_reserve()
320 if (likely((next_cmd + bytes < stop))) in vmw_local_fifo_reserve()
323 ret = vmw_fifo_wait(dev_priv, bytes, in vmw_local_fifo_reserve()
331 if (reserveable || bytes <= sizeof(uint32_t)) { in vmw_local_fifo_reserve()
337 bytes); in vmw_local_fifo_reserve()
347 if (bytes < fifo_state->static_buffer_size) in vmw_local_fifo_reserve()
350 fifo_state->dynamic_buffer = vmalloc(bytes); in vmw_local_fifo_reserve()
364 void *vmw_cmd_ctx_reserve(struct vmw_private *dev_priv, uint32_t bytes, in vmw_cmd_ctx_reserve() argument
370 ret = vmw_cmdbuf_reserve(dev_priv->cman, bytes, in vmw_cmd_ctx_reserve()
373 ret = vmw_local_fifo_reserve(dev_priv, bytes); in vmw_cmd_ctx_reserve()
387 uint32_t max, uint32_t min, uint32_t bytes) in vmw_fifo_res_copy() argument
395 if (bytes < chunk_size) in vmw_fifo_res_copy()
396 chunk_size = bytes; in vmw_fifo_res_copy()
398 vmw_fifo_mem_write(vmw, SVGA_FIFO_RESERVED, bytes); in vmw_fifo_res_copy()
401 rest = bytes - chunk_size; in vmw_fifo_res_copy()
409 uint32_t max, uint32_t min, uint32_t bytes) in vmw_fifo_slow_copy() argument
414 while (bytes > 0) { in vmw_fifo_slow_copy()
422 bytes -= sizeof(uint32_t); in vmw_fifo_slow_copy()
426 static void vmw_local_fifo_commit(struct vmw_private *dev_priv, uint32_t bytes) in vmw_local_fifo_commit() argument
434 BUG_ON((bytes & 3) != 0); in vmw_local_fifo_commit()
435 BUG_ON(bytes > fifo_state->reserved_size); in vmw_local_fifo_commit()
442 next_cmd, max, min, bytes); in vmw_local_fifo_commit()
445 next_cmd, max, min, bytes); in vmw_local_fifo_commit()
456 next_cmd += bytes; in vmw_local_fifo_commit()
471 void vmw_cmd_commit(struct vmw_private *dev_priv, uint32_t bytes) in vmw_cmd_commit() argument
474 vmw_cmdbuf_commit(dev_priv->cman, bytes, NULL, false); in vmw_cmd_commit()
476 vmw_local_fifo_commit(dev_priv, bytes); in vmw_cmd_commit()
486 void vmw_cmd_commit_flush(struct vmw_private *dev_priv, uint32_t bytes) in vmw_cmd_commit_flush() argument
489 vmw_cmdbuf_commit(dev_priv->cman, bytes, NULL, true); in vmw_cmd_commit_flush()
491 vmw_local_fifo_commit(dev_priv, bytes); in vmw_cmd_commit_flush()
516 uint32_t bytes = sizeof(u32) + sizeof(*cmd_fence); in vmw_cmd_send_fence() local
518 fm = VMW_CMD_RESERVE(dev_priv, bytes); in vmw_cmd_send_fence()
545 vmw_cmd_commit_flush(dev_priv, bytes); in vmw_cmd_send_fence()