Lines Matching refs:bytes
209 static bool vmw_fifo_is_full(struct vmw_private *dev_priv, uint32_t bytes) in vmw_fifo_is_full() argument
217 return ((max - next_cmd) + (stop - min) <= bytes); in vmw_fifo_is_full()
221 uint32_t bytes, bool interruptible, in vmw_fifo_wait_noirq() argument
234 if (!vmw_fifo_is_full(dev_priv, bytes)) in vmw_fifo_wait_noirq()
254 uint32_t bytes, bool interruptible, in vmw_fifo_wait() argument
260 if (likely(!vmw_fifo_is_full(dev_priv, bytes))) in vmw_fifo_wait()
265 return vmw_fifo_wait_noirq(dev_priv, bytes, in vmw_fifo_wait()
282 !vmw_fifo_is_full(dev_priv, bytes), timeout); in vmw_fifo_wait()
286 !vmw_fifo_is_full(dev_priv, bytes), timeout); in vmw_fifo_wait()
315 void *vmw_fifo_reserve(struct vmw_private *dev_priv, uint32_t bytes) in vmw_fifo_reserve() argument
330 if (unlikely(bytes >= (max - min))) in vmw_fifo_reserve()
336 fifo_state->reserved_size = bytes; in vmw_fifo_reserve()
344 if (likely((next_cmd + bytes < max || in vmw_fifo_reserve()
345 (next_cmd + bytes == max && stop > min)))) in vmw_fifo_reserve()
348 else if (vmw_fifo_is_full(dev_priv, bytes)) { in vmw_fifo_reserve()
349 ret = vmw_fifo_wait(dev_priv, bytes, in vmw_fifo_reserve()
358 if (likely((next_cmd + bytes < stop))) in vmw_fifo_reserve()
361 ret = vmw_fifo_wait(dev_priv, bytes, in vmw_fifo_reserve()
369 if (reserveable || bytes <= sizeof(uint32_t)) { in vmw_fifo_reserve()
373 iowrite32(bytes, fifo_mem + in vmw_fifo_reserve()
383 if (bytes < fifo_state->static_buffer_size) in vmw_fifo_reserve()
386 fifo_state->dynamic_buffer = vmalloc(bytes); in vmw_fifo_reserve()
400 uint32_t max, uint32_t min, uint32_t bytes) in vmw_fifo_res_copy() argument
407 if (bytes < chunk_size) in vmw_fifo_res_copy()
408 chunk_size = bytes; in vmw_fifo_res_copy()
410 iowrite32(bytes, fifo_mem + SVGA_FIFO_RESERVED); in vmw_fifo_res_copy()
413 rest = bytes - chunk_size; in vmw_fifo_res_copy()
422 uint32_t max, uint32_t min, uint32_t bytes) in vmw_fifo_slow_copy() argument
427 while (bytes > 0) { in vmw_fifo_slow_copy()
435 bytes -= sizeof(uint32_t); in vmw_fifo_slow_copy()
439 void vmw_fifo_commit(struct vmw_private *dev_priv, uint32_t bytes) in vmw_fifo_commit() argument
448 BUG_ON((bytes & 3) != 0); in vmw_fifo_commit()
449 BUG_ON(bytes > fifo_state->reserved_size); in vmw_fifo_commit()
456 next_cmd, max, min, bytes); in vmw_fifo_commit()
459 next_cmd, max, min, bytes); in vmw_fifo_commit()
470 next_cmd += bytes; in vmw_fifo_commit()
491 uint32_t bytes = sizeof(__le32) + sizeof(*cmd_fence); in vmw_fifo_send_fence() local
493 fm = vmw_fifo_reserve(dev_priv, bytes); in vmw_fifo_send_fence()
522 vmw_fifo_commit(dev_priv, bytes); in vmw_fifo_send_fence()