Home | History | Annotate | Download | only in vmwgfx

Lines Matching refs:bytes

215 static bool vmw_fifo_is_full(struct vmw_private *dev_priv, uint32_t bytes)
223 return ((max - next_cmd) + (stop - min) <= bytes);
227 uint32_t bytes, bool interruptible,
246 if (!vmw_fifo_is_full(dev_priv, bytes))
257 !vmw_fifo_is_full(dev_priv, bytes));
262 !vmw_fifo_is_full(dev_priv, bytes));
292 uint32_t bytes, bool interruptible,
299 if (likely(!vmw_fifo_is_full(dev_priv, bytes))) {
306 ret = vmw_fifo_wait_noirq(dev_priv, bytes,
318 !vmw_fifo_is_full(dev_priv, bytes));
322 !vmw_fifo_is_full(dev_priv, bytes));
338 * Reserve @bytes number of bytes in the fifo.
341 * If it timeouts waiting for fifo space, or if @bytes is larger than the
348 uint32_t bytes)
363 if (unlikely(bytes >= (max - min)))
369 fifo_state->reserved_size = bytes;
377 if (likely((next_cmd + bytes < max ||
378 (next_cmd + bytes == max && stop > min))))
381 else if (vmw_fifo_is_full(dev_priv, bytes)) {
382 ret = vmw_fifo_wait(dev_priv, bytes,
391 if (likely((next_cmd + bytes < stop)))
394 ret = vmw_fifo_wait(dev_priv, bytes,
402 if (reserveable || bytes <= sizeof(uint32_t)) {
406 vmw_mmio_write(bytes, fifo_mem +
417 if (bytes < fifo_state->static_buffer_size)
420 fifo_state->dynamic_buffer = vmalloc(bytes);
434 void *vmw_fifo_reserve_dx(struct vmw_private *dev_priv, uint32_t bytes,
440 ret = vmw_cmdbuf_reserve(dev_priv->cman, bytes,
443 ret = vmw_local_fifo_reserve(dev_priv, bytes);
457 uint32_t max, uint32_t min, uint32_t bytes)
464 if (bytes < chunk_size)
465 chunk_size = bytes;
467 vmw_mmio_write(bytes, fifo_mem + SVGA_FIFO_RESERVED);
470 rest = bytes - chunk_size;
478 uint32_t max, uint32_t min, uint32_t bytes)
483 while (bytes > 0) {
491 bytes -= sizeof(uint32_t);
495 static void vmw_local_fifo_commit(struct vmw_private *dev_priv, uint32_t bytes)
505 bytes += sizeof(struct vmw_temp_set_context);
508 BUG_ON((bytes & 3) != 0);
509 BUG_ON(bytes > fifo_state->reserved_size);
516 next_cmd, max, min, bytes);
519 next_cmd, max, min, bytes);
530 next_cmd += bytes;
545 void vmw_fifo_commit(struct vmw_private *dev_priv, uint32_t bytes)
548 vmw_cmdbuf_commit(dev_priv->cman, bytes, NULL, false);
550 vmw_local_fifo_commit(dev_priv, bytes);
558 * @bytes: Number of bytes to commit.
560 void vmw_fifo_commit_flush(struct vmw_private *dev_priv, uint32_t bytes)
563 vmw_cmdbuf_commit(dev_priv->cman, bytes, NULL, true);
565 vmw_local_fifo_commit(dev_priv, bytes);
591 uint32_t bytes = sizeof(u32) + sizeof(*cmd_fence);
593 fm = VMW_FIFO_RESERVE(dev_priv, bytes);
620 vmw_fifo_commit_flush(dev_priv, bytes);