Displaying 20 results from an estimated 94 matches for "virtio_gpu_object_reserve".
2019 Jun 19
1
[PATCH v3 06/12] drm/virtio: drop no_wait argument from virtio_gpu_object_reserve
...256ba37..06cc0e961df6 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.h
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
@@ -398,12 +398,11 @@ static inline u64 virtio_gpu_object_mmap_offset(struct virtio_gpu_object *bo)
return drm_vma_node_offset_addr(&bo->tbo.vma_node);
}
-static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo,
- bool no_wait)
+static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo)
{
int r;
- r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
+ r = ttm_bo_reserve(&bo->tbo, true, false, NULL);
if (unlikely(r != 0)) {
if (r != -ER...
2019 Jun 18
0
[PATCH v2 05/12] drm/virtio: drop no_wait argument from virtio_gpu_object_reserve
...256ba37..06cc0e961df6 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.h
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
@@ -398,12 +398,11 @@ static inline u64 virtio_gpu_object_mmap_offset(struct virtio_gpu_object *bo)
return drm_vma_node_offset_addr(&bo->tbo.vma_node);
}
-static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo,
- bool no_wait)
+static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo)
{
int r;
- r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
+ r = ttm_bo_reserve(&bo->tbo, true, false, NULL);
if (unlikely(r != 0)) {
if (r != -ER...
2019 Jun 20
0
[PATCH v4 05/12] drm/virtio: drop no_wait argument from virtio_gpu_object_reserve
...256ba37..06cc0e961df6 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.h
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
@@ -398,12 +398,11 @@ static inline u64 virtio_gpu_object_mmap_offset(struct virtio_gpu_object *bo)
return drm_vma_node_offset_addr(&bo->tbo.vma_node);
}
-static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo,
- bool no_wait)
+static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo)
{
int r;
- r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
+ r = ttm_bo_reserve(&bo->tbo, true, false, NULL);
if (unlikely(r != 0)) {
if (r != -ER...
2019 Jun 28
0
[PATCH v5 05/12] drm/virtio: drop no_wait argument from virtio_gpu_object_reserve
...256ba37..06cc0e961df6 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.h
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
@@ -398,12 +398,11 @@ static inline u64 virtio_gpu_object_mmap_offset(struct virtio_gpu_object *bo)
return drm_vma_node_offset_addr(&bo->tbo.vma_node);
}
-static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo,
- bool no_wait)
+static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo)
{
int r;
- r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
+ r = ttm_bo_reserve(&bo->tbo, true, false, NULL);
if (unlikely(r != 0)) {
if (r != -ER...
2019 Jul 02
0
[PATCH v6 05/18] drm/virtio: drop no_wait argument from virtio_gpu_object_reserve
...256ba37..06cc0e961df6 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.h
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
@@ -398,12 +398,11 @@ static inline u64 virtio_gpu_object_mmap_offset(struct virtio_gpu_object *bo)
return drm_vma_node_offset_addr(&bo->tbo.vma_node);
}
-static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo,
- bool no_wait)
+static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo)
{
int r;
- r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
+ r = ttm_bo_reserve(&bo->tbo, true, false, NULL);
if (unlikely(r != 0)) {
if (r != -ER...
2019 Aug 02
0
[PATCH v7 05/18] drm/virtio: drop no_wait argument from virtio_gpu_object_reserve
...3fc1c47..cf6be2cfb812 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.h
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
@@ -398,12 +398,11 @@ static inline u64 virtio_gpu_object_mmap_offset(struct virtio_gpu_object *bo)
return drm_vma_node_offset_addr(&bo->tbo.vma_node);
}
-static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo,
- bool no_wait)
+static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo)
{
int r;
- r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
+ r = ttm_bo_reserve(&bo->tbo, true, false, NULL);
if (unlikely(r != 0)) {
if (r != -ER...
2019 Jun 18
1
[PATCH v2 06/12] drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve, unreserve}
...file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h
index 06cc0e961df6..91c320819a8c 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.h
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
@@ -402,7 +402,7 @@ static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo)
{
int r;
- r = ttm_bo_reserve(&bo->tbo, true, false, NULL);
+ r = reservation_object_lock_interruptible(bo->gem_base.resv, NULL);
if (unlikely(r != 0)) {
if (r != -ERESTARTSYS) {
struct virtio_gpu_device *qdev =
@@ -416,7 +416,7 @@ static inline...
2019 Jun 19
1
[PATCH v3 07/12] drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve, unreserve}
...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 06cc0e961df6..77ac69a8e6cc 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 = reservation_object_lock_interruptible(bo->gem_base.resv, NULL);
if (unlikely(r != 0)) {
- if (r != -ERESTARTSYS) {
+ if (r != -ERESTARTSYS && r != -EINTR) {
struct virtio_g...
2019 Jul 02
2
[PATCH v6 06/18] drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve, unreserve}
...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 06cc0e961df6..07f6001ea91e 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 = reservation_object_lock_interruptible(bo->gem_base.resv, NULL);
if (unlikely(r != 0)) {
- if (r != -ERESTARTSYS) {
+ if (r != -EINTR) {
struct virtio_gpu_device *qdev =
bo->...
2019 Jul 02
2
[PATCH v6 06/18] drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve, unreserve}
...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 06cc0e961df6..07f6001ea91e 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 = reservation_object_lock_interruptible(bo->gem_base.resv, NULL);
if (unlikely(r != 0)) {
- if (r != -ERESTARTSYS) {
+ if (r != -EINTR) {
struct virtio_gpu_device *qdev =
bo->...
2019 Jul 02
2
[PATCH v6 16/18] drm/virtio: rework virtio_gpu_cmd_context_{attach, detach}_resource
...t *obj,
{
struct virtio_gpu_device *vgdev = obj->dev->dev_private;
struct virtio_gpu_fpriv *vfpriv = file->driver_priv;
- struct virtio_gpu_object *qobj = gem_to_virtio_gpu_obj(obj);
- int r;
+ struct virtio_gpu_object_array *objs;
if (!vgdev->has_virgl_3d)
return 0;
- r = virtio_gpu_object_reserve(qobj);
- if (r)
- return r;
+ objs = virtio_gpu_array_alloc(1);
+ if (!objs)
+ return -ENOMEM;
+ virtio_gpu_array_add_obj(objs, obj);
virtio_gpu_cmd_context_attach_resource(vgdev, vfpriv->ctx_id,
- qobj->hw_res_handle);
- virtio_gpu_object_unreserve(qobj);
+ objs);...
2019 Jul 02
2
[PATCH v6 16/18] drm/virtio: rework virtio_gpu_cmd_context_{attach, detach}_resource
...t *obj,
{
struct virtio_gpu_device *vgdev = obj->dev->dev_private;
struct virtio_gpu_fpriv *vfpriv = file->driver_priv;
- struct virtio_gpu_object *qobj = gem_to_virtio_gpu_obj(obj);
- int r;
+ struct virtio_gpu_object_array *objs;
if (!vgdev->has_virgl_3d)
return 0;
- r = virtio_gpu_object_reserve(qobj);
- if (r)
- return r;
+ objs = virtio_gpu_array_alloc(1);
+ if (!objs)
+ return -ENOMEM;
+ virtio_gpu_array_add_obj(objs, obj);
virtio_gpu_cmd_context_attach_resource(vgdev, vfpriv->ctx_id,
- qobj->hw_res_handle);
- virtio_gpu_object_unreserve(qobj);
+ objs);...
2019 Jun 20
0
[PATCH v4 06/12] drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve, unreserve}
...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 06cc0e961df6..07f6001ea91e 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 = reservation_object_lock_interruptible(bo->gem_base.resv, NULL);
if (unlikely(r != 0)) {
- if (r != -ERESTARTSYS) {
+ if (r != -EINTR) {
struct virtio_gpu_device *qdev =
bo->...
2019 Jun 28
0
[PATCH v5 06/12] drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve, unreserve}
...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 06cc0e961df6..07f6001ea91e 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 = reservation_object_lock_interruptible(bo->gem_base.resv, NULL);
if (unlikely(r != 0)) {
- if (r != -ERESTARTSYS) {
+ if (r != -EINTR) {
struct virtio_gpu_device *qdev =
bo->...
2019 Jul 03
0
[PATCH v6 06/18] drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve, unreserve}
..., 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h
> index 06cc0e961df6..07f6001ea91e 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 = reservation_object_lock_interruptible(bo->gem_base.resv, NULL);
Can you elaborate a bit about how TTM keeps the BOs alive in, for
example, virtio_g...
2019 Aug 02
0
[PATCH v7 06/18] drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve, unreserve}
...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 cf6be2cfb812..3473b602ec35 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 = reservation_object_lock_interruptible(bo->gem_base.resv, NULL);
if (unlikely(r != 0)) {
- if (r != -ERESTARTSYS) {
+ if (r != -EINTR) {
struct virtio_gpu_device *qdev =
bo->...
2019 Jun 17
2
[PATCH 3/4] drm/virtio: simplify cursor updates
...te->crtc)
output = drm_crtc_to_virtio_gpu_output(plane->state->crtc);
@@ -208,15 +207,9 @@ static void virtio_gpu_cursor_plane_update(struct drm_plane *plane,
cpu_to_le32(plane->state->crtc_w),
cpu_to_le32(plane->state->crtc_h),
0, 0, vgfb->fence);
- ret = virtio_gpu_object_reserve(bo, false);
- if (!ret) {
- reservation_object_add_excl_fence(bo->tbo.resv,
- &vgfb->fence->f);
- dma_fence_put(&vgfb->fence->f);
- vgfb->fence = NULL;
- virtio_gpu_object_unreserve(bo);
- virtio_gpu_object_wait(bo, false);
- }
+ dma_fence_wait(&vg...
2019 Jun 17
2
[PATCH 3/4] drm/virtio: simplify cursor updates
...te->crtc)
output = drm_crtc_to_virtio_gpu_output(plane->state->crtc);
@@ -208,15 +207,9 @@ static void virtio_gpu_cursor_plane_update(struct drm_plane *plane,
cpu_to_le32(plane->state->crtc_w),
cpu_to_le32(plane->state->crtc_h),
0, 0, vgfb->fence);
- ret = virtio_gpu_object_reserve(bo, false);
- if (!ret) {
- reservation_object_add_excl_fence(bo->tbo.resv,
- &vgfb->fence->f);
- dma_fence_put(&vgfb->fence->f);
- vgfb->fence = NULL;
- virtio_gpu_object_unreserve(bo);
- virtio_gpu_object_wait(bo, false);
- }
+ dma_fence_wait(&vg...
2019 Aug 02
0
[PATCH v7 12/18] drm/virtio: rework virtio_gpu_cmd_context_{attach, detach}_resource
...t *obj,
{
struct virtio_gpu_device *vgdev = obj->dev->dev_private;
struct virtio_gpu_fpriv *vfpriv = file->driver_priv;
- struct virtio_gpu_object *qobj = gem_to_virtio_gpu_obj(obj);
- int r;
+ struct virtio_gpu_object_array *objs;
if (!vgdev->has_virgl_3d)
return 0;
- r = virtio_gpu_object_reserve(qobj);
- if (r)
- return r;
+ objs = virtio_gpu_array_alloc(1);
+ if (!objs)
+ return -ENOMEM;
+ virtio_gpu_array_add_obj(objs, obj);
virtio_gpu_cmd_context_attach_resource(vgdev, vfpriv->ctx_id,
- qobj->hw_res_handle);
- virtio_gpu_object_unreserve(qobj);
+ objs);...
2019 Jul 03
0
[PATCH v6 16/18] drm/virtio: rework virtio_gpu_cmd_context_{attach, detach}_resource
...truct virtio_gpu_fpriv *vfpriv = file->driver_priv;
> - struct virtio_gpu_object *qobj = gem_to_virtio_gpu_obj(obj);
> - int r;
> + struct virtio_gpu_object_array *objs;
>
> if (!vgdev->has_virgl_3d)
> return 0;
>
> - r = virtio_gpu_object_reserve(qobj);
> - if (r)
> - return r;
> + objs = virtio_gpu_array_alloc(1);
> + if (!objs)
> + return -ENOMEM;
> + virtio_gpu_array_add_obj(objs, obj);
>
> virtio_gpu_cmd_context_attach_resource(vgdev, vfpriv->ctx_id,...