Commit 678e5b22 authored by Christian König's avatar Christian König

drm/qxl: stop using ttm_bo_wait

TTM is just wrapping core DMA functionality here, remove the mid-layer.
No functional change.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Acked-by: default avatarDave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221125102137.1801-6-christian.koenig@amd.com
parent 5d930605
......@@ -579,7 +579,7 @@ void qxl_surface_evict(struct qxl_device *qdev, struct qxl_bo *surf, bool do_upd
static int qxl_reap_surf(struct qxl_device *qdev, struct qxl_bo *surf, bool stall)
{
int ret;
long ret;
ret = qxl_bo_reserve(surf);
if (ret)
......@@ -588,7 +588,19 @@ static int qxl_reap_surf(struct qxl_device *qdev, struct qxl_bo *surf, bool stal
if (stall)
mutex_unlock(&qdev->surf_evict_mutex);
ret = ttm_bo_wait(&surf->tbo, true, !stall);
if (stall) {
ret = dma_resv_wait_timeout(surf->tbo.base.resv,
DMA_RESV_USAGE_BOOKKEEP, true,
15 * HZ);
if (ret > 0)
ret = 0;
else if (ret == 0)
ret = -EBUSY;
} else {
ret = dma_resv_test_signaled(surf->tbo.base.resv,
DMA_RESV_USAGE_BOOKKEEP);
ret = ret ? -EBUSY : 0;
}
if (stall)
mutex_lock(&qdev->surf_evict_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment