Lines Matching defs:surf
332 int qxl_io_update_area(struct qxl_device *qdev, struct qxl_bo *surf,
339 if (!surf->hw_surf_alloc)
342 if (surf->is_primary)
345 surface_id = surf->surface_id;
346 surface_width = surf->surf.width;
347 surface_height = surf->surf.height;
393 create->format = bo->surf.format;
394 create->width = bo->surf.width;
395 create->height = bo->surf.height;
396 create->stride = bo->surf.stride;
427 struct qxl_bo *surf)
450 surf->surface_id = handle;
467 struct qxl_bo *surf)
473 if (surf->hw_surf_alloc)
490 cmd->u.surface_create.format = surf->surf.format;
491 cmd->u.surface_create.width = surf->surf.width;
492 cmd->u.surface_create.height = surf->surf.height;
493 cmd->u.surface_create.stride = surf->surf.stride;
494 cmd->u.surface_create.data = qxl_bo_physical_address(qdev, surf, 0);
495 cmd->surface_id = surf->surface_id;
498 surf->surf_create = release;
506 surf->hw_surf_alloc = true;
508 idr_replace(&qdev->surf_id_idr, surf, surf->surface_id);
514 struct qxl_bo *surf)
521 if (!surf->hw_surf_alloc)
525 surf->surf_create,
530 surf->surf_create = NULL;
533 idr_replace(&qdev->surf_id_idr, NULL, surf->surface_id);
535 surf->hw_surf_alloc = false;
537 id = surf->surface_id;
538 surf->surface_id = 0;
552 static int qxl_update_surface(struct qxl_device *qdev, struct qxl_bo *surf)
560 rect.right = surf->surf.width;
562 rect.bottom = surf->surf.height;
564 ret = qxl_io_update_area(qdev, surf, &rect);
570 static void qxl_surface_evict_locked(struct qxl_device *qdev, struct qxl_bo *surf, bool do_update_area)
574 qxl_update_surface(qdev, surf);
577 qxl_hw_surface_dealloc(qdev, surf);
580 void qxl_surface_evict(struct qxl_device *qdev, struct qxl_bo *surf, bool do_update_area)
583 qxl_surface_evict_locked(qdev, surf, do_update_area);
587 static int qxl_reap_surf(struct qxl_device *qdev, struct qxl_bo *surf, bool stall)
591 ret = qxl_bo_reserve(surf);
598 ret = ttm_bo_wait(&surf->tbo, true, !stall);
603 qxl_bo_unreserve(surf);
607 qxl_surface_evict_locked(qdev, surf, true);
608 qxl_bo_unreserve(surf);