提交 c610c713 编写于 作者: F Frediano Ziglio 提交者: Dave Airlie

drm/qxl: Handle all errors in qxl_surface_evict

Only EBUSY error was handled. This could cause code to believe
reserve was successful while it failed.
Signed-off-by: NFrediano Ziglio <fziglio@redhat.com>
Reviewed-by: NDave Airlie <airlied@redhat.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 fe2af53b
......@@ -618,8 +618,8 @@ static int qxl_reap_surf(struct qxl_device *qdev, struct qxl_bo *surf, bool stal
int ret;
ret = qxl_bo_reserve(surf, false);
if (ret == -EBUSY)
return -EBUSY;
if (ret)
return ret;
if (stall)
mutex_unlock(&qdev->surf_evict_mutex);
......@@ -628,9 +628,9 @@ static int qxl_reap_surf(struct qxl_device *qdev, struct qxl_bo *surf, bool stal
if (stall)
mutex_lock(&qdev->surf_evict_mutex);
if (ret == -EBUSY) {
if (ret) {
qxl_bo_unreserve(surf);
return -EBUSY;
return ret;
}
qxl_surface_evict_locked(qdev, surf, true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部