Lines Matching full: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()
288 * Reserve @bytes number of bytes in the fifo.
291 * If it timeouts waiting for fifo space, or if @bytes is larger than the
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()
384 void *vmw_fifo_reserve_dx(struct vmw_private *dev_priv, uint32_t bytes, in vmw_fifo_reserve_dx() argument
390 ret = vmw_cmdbuf_reserve(dev_priv->cman, bytes, in vmw_fifo_reserve_dx()
393 ret = vmw_local_fifo_reserve(dev_priv, bytes); in vmw_fifo_reserve_dx()
407 uint32_t max, uint32_t min, uint32_t bytes) in vmw_fifo_res_copy() argument
414 if (bytes < chunk_size) in vmw_fifo_res_copy()
415 chunk_size = bytes; in vmw_fifo_res_copy()
417 vmw_mmio_write(bytes, fifo_mem + SVGA_FIFO_RESERVED); in vmw_fifo_res_copy()
420 rest = bytes - chunk_size; in vmw_fifo_res_copy()
428 uint32_t max, uint32_t min, uint32_t bytes) in vmw_fifo_slow_copy() argument
433 while (bytes > 0) { in vmw_fifo_slow_copy()
441 bytes -= sizeof(uint32_t); in vmw_fifo_slow_copy()
445 static void vmw_local_fifo_commit(struct vmw_private *dev_priv, uint32_t bytes) in vmw_local_fifo_commit() argument
455 bytes += sizeof(struct vmw_temp_set_context); in vmw_local_fifo_commit()
458 BUG_ON((bytes & 3) != 0); in vmw_local_fifo_commit()
459 BUG_ON(bytes > fifo_state->reserved_size); in vmw_local_fifo_commit()
466 next_cmd, max, min, bytes); in vmw_local_fifo_commit()
469 next_cmd, max, min, bytes); in vmw_local_fifo_commit()
480 next_cmd += bytes; in vmw_local_fifo_commit()
495 void vmw_fifo_commit(struct vmw_private *dev_priv, uint32_t bytes) in vmw_fifo_commit() argument
498 vmw_cmdbuf_commit(dev_priv->cman, bytes, NULL, false); in vmw_fifo_commit()
500 vmw_local_fifo_commit(dev_priv, bytes); in vmw_fifo_commit()
508 * @bytes: Number of bytes to commit.
510 void vmw_fifo_commit_flush(struct vmw_private *dev_priv, uint32_t bytes) in vmw_fifo_commit_flush() argument
513 vmw_cmdbuf_commit(dev_priv->cman, bytes, NULL, true); in vmw_fifo_commit_flush()
515 vmw_local_fifo_commit(dev_priv, bytes); in vmw_fifo_commit_flush()
541 uint32_t bytes = sizeof(u32) + sizeof(*cmd_fence); in vmw_fifo_send_fence() local
543 fm = VMW_FIFO_RESERVE(dev_priv, bytes); in vmw_fifo_send_fence()
570 vmw_fifo_commit_flush(dev_priv, bytes); in vmw_fifo_send_fence()