[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20190829103301.3539-7-kraxel@redhat.com>
Date: Thu, 29 Aug 2019 12:32:49 +0200
From: Gerd Hoffmann <kraxel@...hat.com>
To: dri-devel@...ts.freedesktop.org
Cc: olvaffe@...il.com, gurchetansingh@...omium.org,
Gerd Hoffmann <kraxel@...hat.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
virtualization@...ts.linux-foundation.org (open list:VIRTIO GPU DRIVER),
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH v9 06/18] drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve,unreserve}
Call reservation_object_* directly instead
of using ttm_bo_{reserve,unreserve}.
v4: check for EINTR only.
v3: check for EINTR too.
Signed-off-by: Gerd Hoffmann <kraxel@...hat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@...ll.ch>
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h
index d886c0e3502a..db57bbb36216 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.h
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
@@ -402,9 +402,9 @@ static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo)
{
int r;
- r = ttm_bo_reserve(&bo->tbo, true, false, NULL);
+ r = dma_resv_lock_interruptible(bo->gem_base.resv, NULL);
if (unlikely(r != 0)) {
- if (r != -ERESTARTSYS) {
+ if (r != -EINTR) {
struct virtio_gpu_device *qdev =
bo->gem_base.dev->dev_private;
dev_err(qdev->dev, "%p reserve failed\n", bo);
@@ -416,7 +416,7 @@ static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo)
static inline void virtio_gpu_object_unreserve(struct virtio_gpu_object *bo)
{
- ttm_bo_unreserve(&bo->tbo);
+ dma_resv_unlock(bo->gem_base.resv);
}
/* virgl debufs */
--
2.18.1
Powered by blists - more mailing lists