Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c610c713 authored by Frediano Ziglio's avatar Frediano Ziglio Committed by Dave Airlie
Browse files

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: default avatarFrediano Ziglio <fziglio@redhat.com>
Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent fe2af53b
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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);