Lines Matching refs:surf
333 int qxl_io_update_area(struct qxl_device *qdev, struct qxl_bo *surf, in qxl_io_update_area() argument
340 if (!surf->hw_surf_alloc) in qxl_io_update_area()
343 if (surf->is_primary) in qxl_io_update_area()
346 surface_id = surf->surface_id; in qxl_io_update_area()
347 surface_width = surf->surf.width; in qxl_io_update_area()
348 surface_height = surf->surf.height; in qxl_io_update_area()
394 create->format = bo->surf.format; in qxl_io_create_primary()
395 create->width = bo->surf.width; in qxl_io_create_primary()
396 create->height = bo->surf.height; in qxl_io_create_primary()
397 create->stride = bo->surf.stride; in qxl_io_create_primary()
428 struct qxl_bo *surf) in qxl_surface_id_alloc() argument
451 surf->surface_id = handle; in qxl_surface_id_alloc()
468 struct qxl_bo *surf) in qxl_hw_surface_alloc() argument
474 if (surf->hw_surf_alloc) in qxl_hw_surface_alloc()
491 cmd->u.surface_create.format = surf->surf.format; in qxl_hw_surface_alloc()
492 cmd->u.surface_create.width = surf->surf.width; in qxl_hw_surface_alloc()
493 cmd->u.surface_create.height = surf->surf.height; in qxl_hw_surface_alloc()
494 cmd->u.surface_create.stride = surf->surf.stride; in qxl_hw_surface_alloc()
495 cmd->u.surface_create.data = qxl_bo_physical_address(qdev, surf, 0); in qxl_hw_surface_alloc()
496 cmd->surface_id = surf->surface_id; in qxl_hw_surface_alloc()
499 surf->surf_create = release; in qxl_hw_surface_alloc()
507 surf->hw_surf_alloc = true; in qxl_hw_surface_alloc()
509 idr_replace(&qdev->surf_id_idr, surf, surf->surface_id); in qxl_hw_surface_alloc()
515 struct qxl_bo *surf) in qxl_hw_surface_dealloc() argument
522 if (!surf->hw_surf_alloc) in qxl_hw_surface_dealloc()
526 surf->surf_create, in qxl_hw_surface_dealloc()
531 surf->surf_create = NULL; in qxl_hw_surface_dealloc()
534 idr_replace(&qdev->surf_id_idr, NULL, surf->surface_id); in qxl_hw_surface_dealloc()
536 surf->hw_surf_alloc = false; in qxl_hw_surface_dealloc()
538 id = surf->surface_id; in qxl_hw_surface_dealloc()
539 surf->surface_id = 0; in qxl_hw_surface_dealloc()
553 static int qxl_update_surface(struct qxl_device *qdev, struct qxl_bo *surf) in qxl_update_surface() argument
561 rect.right = surf->surf.width; in qxl_update_surface()
563 rect.bottom = surf->surf.height; in qxl_update_surface()
565 ret = qxl_io_update_area(qdev, surf, &rect); in qxl_update_surface()
571 static void qxl_surface_evict_locked(struct qxl_device *qdev, struct qxl_bo *surf, bool do_update_a… in qxl_surface_evict_locked() argument
575 qxl_update_surface(qdev, surf); in qxl_surface_evict_locked()
578 qxl_hw_surface_dealloc(qdev, surf); in qxl_surface_evict_locked()
581 void qxl_surface_evict(struct qxl_device *qdev, struct qxl_bo *surf, bool do_update_area) in qxl_surface_evict() argument
584 qxl_surface_evict_locked(qdev, surf, do_update_area); in qxl_surface_evict()
588 static int qxl_reap_surf(struct qxl_device *qdev, struct qxl_bo *surf, bool stall) in qxl_reap_surf() argument
592 ret = qxl_bo_reserve(surf); in qxl_reap_surf()
599 ret = ttm_bo_wait(&surf->tbo, true, !stall); in qxl_reap_surf()
604 qxl_bo_unreserve(surf); in qxl_reap_surf()
608 qxl_surface_evict_locked(qdev, surf, true); in qxl_reap_surf()
609 qxl_bo_unreserve(surf); in qxl_reap_surf()