Home | History | Annotate | Download | only in qxl

Lines Matching refs:surf

337 int qxl_io_update_area(struct qxl_device *qdev, struct qxl_bo *surf,
344 if (!surf->hw_surf_alloc)
347 if (surf->is_primary)
350 surface_id = surf->surface_id;
351 surface_width = surf->surf.width;
352 surface_height = surf->surf.height;
398 create->format = bo->surf.format;
399 create->width = bo->surf.width;
400 create->height = bo->surf.height;
401 create->stride = bo->surf.stride;
432 struct qxl_bo *surf)
455 surf->surface_id = handle;
472 struct qxl_bo *surf)
478 if (surf->hw_surf_alloc)
494 cmd->u.surface_create.format = surf->surf.format;
495 cmd->u.surface_create.width = surf->surf.width;
496 cmd->u.surface_create.height = surf->surf.height;
497 cmd->u.surface_create.stride = surf->surf.stride;
498 cmd->u.surface_create.data = qxl_bo_physical_address(qdev, surf, 0);
499 cmd->surface_id = surf->surface_id;
502 surf->surf_create = release;
510 surf->hw_surf_alloc = true;
512 idr_replace(&qdev->surf_id_idr, surf, surf->surface_id);
518 struct qxl_bo *surf)
525 if (!surf->hw_surf_alloc)
529 surf->surf_create,
534 surf->surf_create = NULL;
537 idr_replace(&qdev->surf_id_idr, NULL, surf->surface_id);
539 surf->hw_surf_alloc = false;
541 id = surf->surface_id;
542 surf->surface_id = 0;
557 static int qxl_update_surface(struct qxl_device *qdev, struct qxl_bo *surf)
565 rect.right = surf->surf.width;
567 rect.bottom = surf->surf.height;
569 ret = qxl_io_update_area(qdev, surf, &rect);
575 static void qxl_surface_evict_locked(struct qxl_device *qdev, struct qxl_bo *surf, bool do_update_area)
579 qxl_update_surface(qdev, surf);
582 qxl_hw_surface_dealloc(qdev, surf);
585 void qxl_surface_evict(struct qxl_device *qdev, struct qxl_bo *surf, bool do_update_area)
588 qxl_surface_evict_locked(qdev, surf, do_update_area);
592 static int qxl_reap_surf(struct qxl_device *qdev, struct qxl_bo *surf, bool stall)
596 ret = qxl_bo_reserve(surf, false);
603 ret = ttm_bo_wait(&surf->tbo, true, !stall);
608 qxl_bo_unreserve(surf);
612 qxl_surface_evict_locked(qdev, surf, true);
613 qxl_bo_unreserve(surf);