Lines Matching full:bytes

208 static bool vmw_fifo_is_full(struct vmw_private *dev_priv, uint32_t bytes)  in vmw_fifo_is_full()  argument
216 return ((max - next_cmd) + (stop - min) <= bytes); in vmw_fifo_is_full()
220 uint32_t bytes, bool interruptible, in vmw_fifo_wait_noirq() argument
233 if (!vmw_fifo_is_full(dev_priv, bytes)) in vmw_fifo_wait_noirq()
253 uint32_t bytes, bool interruptible, in vmw_fifo_wait() argument
258 if (likely(!vmw_fifo_is_full(dev_priv, bytes))) in vmw_fifo_wait()
263 return vmw_fifo_wait_noirq(dev_priv, bytes, in vmw_fifo_wait()
272 !vmw_fifo_is_full(dev_priv, bytes), timeout); in vmw_fifo_wait()
276 !vmw_fifo_is_full(dev_priv, bytes), timeout); in vmw_fifo_wait()
290 * Reserve @bytes number of bytes in the fifo.
293 * If it timeouts waiting for fifo space, or if @bytes is larger than the
300 uint32_t bytes) in vmw_local_fifo_reserve() argument
315 if (unlikely(bytes >= (max - min))) in vmw_local_fifo_reserve()
321 fifo_state->reserved_size = bytes; in vmw_local_fifo_reserve()
329 if (likely((next_cmd + bytes < max || in vmw_local_fifo_reserve()
330 (next_cmd + bytes == max && stop > min)))) in vmw_local_fifo_reserve()
333 else if (vmw_fifo_is_full(dev_priv, bytes)) { in vmw_local_fifo_reserve()
334 ret = vmw_fifo_wait(dev_priv, bytes, in vmw_local_fifo_reserve()
343 if (likely((next_cmd + bytes < stop))) in vmw_local_fifo_reserve()
346 ret = vmw_fifo_wait(dev_priv, bytes, in vmw_local_fifo_reserve()
354 if (reserveable || bytes <= sizeof(uint32_t)) { in vmw_local_fifo_reserve()
358 vmw_mmio_write(bytes, fifo_mem + in vmw_local_fifo_reserve()
369 if (bytes < fifo_state->static_buffer_size) in vmw_local_fifo_reserve()
372 fifo_state->dynamic_buffer = vmalloc(bytes); in vmw_local_fifo_reserve()
386 void *vmw_fifo_reserve_dx(struct vmw_private *dev_priv, uint32_t bytes, in vmw_fifo_reserve_dx() argument
392 ret = vmw_cmdbuf_reserve(dev_priv->cman, bytes, in vmw_fifo_reserve_dx()
395 ret = vmw_local_fifo_reserve(dev_priv, 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()
510 * @bytes: Number of bytes to 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()