• Home
  • Raw
  • Download

Lines Matching refs:fifo_state

317 	struct vmw_fifo_state *fifo_state = &dev_priv->fifo;  in vmw_fifo_reserve()  local
322 uint32_t reserveable = fifo_state->capabilities & SVGA_FIFO_CAP_RESERVE; in vmw_fifo_reserve()
325 mutex_lock(&fifo_state->fifo_mutex); in vmw_fifo_reserve()
333 BUG_ON(fifo_state->reserved_size != 0); in vmw_fifo_reserve()
334 BUG_ON(fifo_state->dynamic_buffer != NULL); in vmw_fifo_reserve()
336 fifo_state->reserved_size = bytes; in vmw_fifo_reserve()
370 fifo_state->using_bounce_buffer = false; in vmw_fifo_reserve()
382 fifo_state->using_bounce_buffer = true; in vmw_fifo_reserve()
383 if (bytes < fifo_state->static_buffer_size) in vmw_fifo_reserve()
384 return fifo_state->static_buffer; in vmw_fifo_reserve()
386 fifo_state->dynamic_buffer = vmalloc(bytes); in vmw_fifo_reserve()
387 if (!fifo_state->dynamic_buffer) in vmw_fifo_reserve()
389 return fifo_state->dynamic_buffer; in vmw_fifo_reserve()
394 fifo_state->reserved_size = 0; in vmw_fifo_reserve()
395 mutex_unlock(&fifo_state->fifo_mutex); in vmw_fifo_reserve()
399 static void vmw_fifo_res_copy(struct vmw_fifo_state *fifo_state, in vmw_fifo_res_copy() argument
406 uint32_t *buffer = (fifo_state->dynamic_buffer != NULL) ? in vmw_fifo_res_copy()
407 fifo_state->dynamic_buffer : fifo_state->static_buffer; in vmw_fifo_res_copy()
421 static void vmw_fifo_slow_copy(struct vmw_fifo_state *fifo_state, in vmw_fifo_slow_copy() argument
426 uint32_t *buffer = (fifo_state->dynamic_buffer != NULL) ? in vmw_fifo_slow_copy()
427 fifo_state->dynamic_buffer : fifo_state->static_buffer; in vmw_fifo_slow_copy()
443 struct vmw_fifo_state *fifo_state = &dev_priv->fifo; in vmw_fifo_commit() local
448 bool reserveable = fifo_state->capabilities & SVGA_FIFO_CAP_RESERVE; in vmw_fifo_commit()
451 BUG_ON(bytes > fifo_state->reserved_size); in vmw_fifo_commit()
453 fifo_state->reserved_size = 0; in vmw_fifo_commit()
455 if (fifo_state->using_bounce_buffer) { in vmw_fifo_commit()
457 vmw_fifo_res_copy(fifo_state, fifo_mem, in vmw_fifo_commit()
460 vmw_fifo_slow_copy(fifo_state, fifo_mem, in vmw_fifo_commit()
463 if (fifo_state->dynamic_buffer) { in vmw_fifo_commit()
464 vfree(fifo_state->dynamic_buffer); in vmw_fifo_commit()
465 fifo_state->dynamic_buffer = NULL; in vmw_fifo_commit()
470 down_write(&fifo_state->rwsem); in vmw_fifo_commit()
471 if (fifo_state->using_bounce_buffer || reserveable) { in vmw_fifo_commit()
482 up_write(&fifo_state->rwsem); in vmw_fifo_commit()
484 mutex_unlock(&fifo_state->fifo_mutex); in vmw_fifo_commit()
489 struct vmw_fifo_state *fifo_state = &dev_priv->fifo; in vmw_fifo_send_fence() local
508 if (!(fifo_state->capabilities & SVGA_FIFO_CAP_FENCE)) { in vmw_fifo_send_fence()
525 (void) vmw_marker_push(&fifo_state->marker_queue, *seqno); in vmw_fifo_send_fence()
526 vmw_update_seqno(dev_priv, fifo_state); in vmw_fifo_send_fence()