search for: virtio_gpu_cmd_transfer_to_host_2d

Displaying 20 results from an estimated 89 matches for "virtio_gpu_cmd_transfer_to_host_2d".

2019 Oct 18
1
[PATCH] drm/virtio: move byteorder handling into virtio_gpu_cmd_transfer_to_host_2d function
...gpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 314e02f94d9c..0b56ba005e25 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -267,8 +267,8 @@ void virtio_gpu_cmd_unref_resource(struct virtio_gpu_device *vgdev, uint32_t resource_id); void virtio_gpu_cmd_transfer_to_host_2d(struct virtio_gpu_device *vgdev, uint64_t offset, - __le32 width, __le32 height, - __le32 x, __le32 y, + uint32_t width, uint32_t height, + uint32_t x, uint32_t y, struct virtio_gpu_object_array *objs, struct virtio_gpu_fence *fence); void virtio_gpu_cmd_resource_...
2019 Oct 22
0
[PATCH 2/5] drm/virtio: move byteorder handling into virtio_gpu_cmd_transfer_to_host_2d function
...gpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 314e02f94d9c..0b56ba005e25 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -267,8 +267,8 @@ void virtio_gpu_cmd_unref_resource(struct virtio_gpu_device *vgdev, uint32_t resource_id); void virtio_gpu_cmd_transfer_to_host_2d(struct virtio_gpu_device *vgdev, uint64_t offset, - __le32 width, __le32 height, - __le32 x, __le32 y, + uint32_t width, uint32_t height, + uint32_t x, uint32_t y, struct virtio_gpu_object_array *objs, struct virtio_gpu_fence *fence); void virtio_gpu_cmd_resource_...
2018 Sep 20
0
[PATCH] drm/virtio: pass virtio_gpu_object to virtio_gpu_cmd_transfer_to_host_{2d, 3d}
Pass virtio_gpu_object down to virtio_gpu_cmd_transfer_to_host_2d and virtio_gpu_cmd_transfer_to_host_3d functions, instead of passing just the virtio resource handle. This is needed to lookup the scatter list of the object, for dma sync. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/virtgpu_drv.h | 6 ++++-- drivers/g...
2019 Aug 02
0
[PATCH v7 11/18] drm/virtio: rework virtio_gpu_transfer_to_host_ioctl fencing
...9180e69ea 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -279,10 +279,10 @@ void virtio_gpu_cmd_create_resource(struct virtio_gpu_device *vgdev, void virtio_gpu_cmd_unref_resource(struct virtio_gpu_device *vgdev, uint32_t resource_id); void virtio_gpu_cmd_transfer_to_host_2d(struct virtio_gpu_device *vgdev, - struct virtio_gpu_object *bo, uint64_t offset, __le32 width, __le32 height, __le32 x, __le32 y, + struct virtio_gpu_object_array *objs, struct virtio_gpu_fence *fence); void virtio_gpu_cmd_resource_flush(struct virtio_gpu_device *v...
2019 Jul 04
2
[PATCH v6 15/18] drm/virtio: rework virtio_gpu_transfer_to_host_ioctl fencing
Hi, > > convert_to_hw_box(&box, &args->box); > > if (!vgdev->has_virgl_3d) { > > virtio_gpu_cmd_transfer_to_host_2d > > - (vgdev, qobj, offset, > > + (vgdev, gem_to_virtio_gpu_obj(objs->objs[0]), offset, > > box.w, box.h, box.x, box.y, NULL); > > + virtio_gpu_array_put_free(objs); > Don't we need...
2019 Jul 04
2
[PATCH v6 15/18] drm/virtio: rework virtio_gpu_transfer_to_host_ioctl fencing
Hi, > > convert_to_hw_box(&box, &args->box); > > if (!vgdev->has_virgl_3d) { > > virtio_gpu_cmd_transfer_to_host_2d > > - (vgdev, qobj, offset, > > + (vgdev, gem_to_virtio_gpu_obj(objs->objs[0]), offset, > > box.w, box.h, box.x, box.y, NULL); > > + virtio_gpu_array_put_free(objs); > Don't we need...
2019 Jul 05
1
[PATCH v6 15/18] drm/virtio: rework virtio_gpu_transfer_to_host_ioctl fencing
...wrote: > On Thu, Jul 4, 2019 at 4:51 AM Gerd Hoffmann <kraxel at redhat.com> wrote: > > > > Hi, > > > > > > convert_to_hw_box(&box, &args->box); > > > > if (!vgdev->has_virgl_3d) { > > > > virtio_gpu_cmd_transfer_to_host_2d > > > > - (vgdev, qobj, offset, > > > > + (vgdev, gem_to_virtio_gpu_obj(objs->objs[0]), offset, > > > > box.w, box.h, box.x, box.y, NULL); > > > > + virtio_gpu_array...
2019 Dec 11
1
[PATCH 3/3] virtio-gpu: use damage info for display updates.
...->src_x >> 16); + uint32_t y = rect->y1 + (state->src_y >> 16); + uint32_t off = x * state->fb->format->cpp[0] + + y * state->fb->pitches[0]; objs = virtio_gpu_array_alloc(1); if (!objs) return; virtio_gpu_array_add_obj(objs, &bo->base.base); - virtio_gpu_cmd_transfer_to_host_2d - (vgdev, 0, - state->src_w >> 16, - state->src_h >> 16, - state->src_x >> 16, - state->src_y >> 16, - objs, NULL); + + virtio_gpu_cmd_transfer_to_host_2d(vgdev, off, w, h, x, y, + objs, NULL); } static void virtio_gpu_primary_plane_update(s...
2019 Jul 04
0
[PATCH v6 15/18] drm/virtio: rework virtio_gpu_transfer_to_host_ioctl fencing
On Thu, Jul 4, 2019 at 4:51 AM Gerd Hoffmann <kraxel at redhat.com> wrote: > > Hi, > > > > convert_to_hw_box(&box, &args->box); > > > if (!vgdev->has_virgl_3d) { > > > virtio_gpu_cmd_transfer_to_host_2d > > > - (vgdev, qobj, offset, > > > + (vgdev, gem_to_virtio_gpu_obj(objs->objs[0]), offset, > > > box.w, box.h, box.x, box.y, NULL); > > > + virtio_gpu_array_put_free(objs); &gt...
2019 Oct 22
0
[PATCH 5/5] drm/virtio: factor out virtio_gpu_update_dumb_bo
..._gpu_update_dumb_bo(struct virtio_gpu_device *vgdev, + struct virtio_gpu_object *bo, + struct drm_plane_state *state) +{ + struct virtio_gpu_object_array *objs; + + objs = virtio_gpu_array_alloc(1); + if (!objs) + return; + virtio_gpu_array_add_obj(objs, &bo->base.base); + virtio_gpu_cmd_transfer_to_host_2d + (vgdev, 0, + state->src_w >> 16, + state->src_h >> 16, + state->src_x >> 16, + state->src_y >> 16, + objs, NULL); +} + static void virtio_gpu_primary_plane_update(struct drm_plane *plane, struct drm_plane_state *old_state) { @@ -129,21 +1...
2019 Oct 23
0
[PATCH v2 3/3] drm/virtio: factor out virtio_gpu_update_dumb_bo
..._gpu_update_dumb_bo(struct virtio_gpu_device *vgdev, + struct virtio_gpu_object *bo, + struct drm_plane_state *state) +{ + struct virtio_gpu_object_array *objs; + + objs = virtio_gpu_array_alloc(1); + if (!objs) + return; + virtio_gpu_array_add_obj(objs, &bo->base.base); + virtio_gpu_cmd_transfer_to_host_2d + (vgdev, 0, + state->src_w >> 16, + state->src_h >> 16, + state->src_x >> 16, + state->src_y >> 16, + objs, NULL); +} + static void virtio_gpu_primary_plane_update(struct drm_plane *plane, struct drm_plane_state *old_state) { @@ -129,21 +1...
2019 Dec 12
0
[PATCH v2 3/3] virtio-gpu: use damage info for display updates.
...= rect->y2 - rect->y1; + uint32_t x = rect->x1; + uint32_t y = rect->y1; + uint32_t off = x * state->fb->format->cpp[0] + + y * state->fb->pitches[0]; objs = virtio_gpu_array_alloc(1); if (!objs) return; virtio_gpu_array_add_obj(objs, &bo->base.base); - virtio_gpu_cmd_transfer_to_host_2d - (vgdev, 0, - state->src_w >> 16, - state->src_h >> 16, - state->src_x >> 16, - state->src_y >> 16, - objs, NULL); + + virtio_gpu_cmd_transfer_to_host_2d(vgdev, off, w, h, x, y, + objs, NULL); } static void virtio_gpu_primary_plane_update(s...
2019 Oct 22
0
[PATCH 4/5] drm/virtio: Simplify virtio_gpu_primary_plane_update workflow.
...fb = to_virtio_gpu_framebuffer(plane->state->fb); + bo = gem_to_virtio_gpu_obj(vgfb->base.obj[0]); + if (bo->dumb) { + struct virtio_gpu_object_array *objs; - objs = virtio_gpu_array_alloc(1); - if (!objs) - return; - virtio_gpu_array_add_obj(objs, vgfb->base.obj[0]); - virtio_gpu_cmd_transfer_to_host_2d - (vgdev, 0, - plane->state->src_w >> 16, - plane->state->src_h >> 16, - plane->state->src_x >> 16, - plane->state->src_y >> 16, - objs, NULL); - } - } else { - handle = 0; + objs = virtio_gpu_array_alloc(1); + if (!objs) +...
2019 Oct 23
0
[PATCH v2 2/3] drm/virtio: Simplify virtio_gpu_primary_plane_update workflow.
...fb = to_virtio_gpu_framebuffer(plane->state->fb); + bo = gem_to_virtio_gpu_obj(vgfb->base.obj[0]); + if (bo->dumb) { + struct virtio_gpu_object_array *objs; - objs = virtio_gpu_array_alloc(1); - if (!objs) - return; - virtio_gpu_array_add_obj(objs, vgfb->base.obj[0]); - virtio_gpu_cmd_transfer_to_host_2d - (vgdev, 0, - plane->state->src_w >> 16, - plane->state->src_h >> 16, - plane->state->src_x >> 16, - plane->state->src_y >> 16, - objs, NULL); - } - } else { - handle = 0; + objs = virtio_gpu_array_alloc(1); + if (!objs) +...
2019 Jul 02
2
[PATCH v6 15/18] drm/virtio: rework virtio_gpu_transfer_to_host_ioctl fencing
...virtio_gpu_array_from_handles(file, &args->bo_handle, 1); + if (objs == NULL) return -ENOENT; - qobj = gem_to_virtio_gpu_obj(gobj); - - ret = virtio_gpu_object_reserve(qobj); - if (ret) - goto out; - convert_to_hw_box(&box, &args->box); if (!vgdev->has_virgl_3d) { virtio_gpu_cmd_transfer_to_host_2d - (vgdev, qobj, offset, + (vgdev, gem_to_virtio_gpu_obj(objs->objs[0]), offset, box.w, box.h, box.x, box.y, NULL); + virtio_gpu_array_put_free(objs); } else { + ret = virtio_gpu_array_lock_resv(objs); + if (ret != 0) + goto err_put_free; + + ret = -ENOMEM; fence = virtio_gpu_...
2019 Jul 02
2
[PATCH v6 15/18] drm/virtio: rework virtio_gpu_transfer_to_host_ioctl fencing
...virtio_gpu_array_from_handles(file, &args->bo_handle, 1); + if (objs == NULL) return -ENOENT; - qobj = gem_to_virtio_gpu_obj(gobj); - - ret = virtio_gpu_object_reserve(qobj); - if (ret) - goto out; - convert_to_hw_box(&box, &args->box); if (!vgdev->has_virgl_3d) { virtio_gpu_cmd_transfer_to_host_2d - (vgdev, qobj, offset, + (vgdev, gem_to_virtio_gpu_obj(objs->objs[0]), offset, box.w, box.h, box.x, box.y, NULL); + virtio_gpu_array_put_free(objs); } else { + ret = virtio_gpu_array_lock_resv(objs); + if (ret != 0) + goto err_put_free; + + ret = -ENOMEM; fence = virtio_gpu_...
2020 Feb 13
0
[PATCH v3 2/4] drm/virtio: batch plane updates (pageflip)
...pu_notify(vgdev); } void virtio_gpu_cmd_resource_flush(struct virtio_gpu_device *vgdev, @@ -589,7 +588,6 @@ void virtio_gpu_cmd_resource_flush(struct virtio_gpu_device *vgdev, cmd_p->r.y = cpu_to_le32(y); virtio_gpu_queue_ctrl_buffer(vgdev, vbuf); - virtio_gpu_notify(vgdev); } void virtio_gpu_cmd_transfer_to_host_2d(struct virtio_gpu_device *vgdev, @@ -622,7 +620,6 @@ void virtio_gpu_cmd_transfer_to_host_2d(struct virtio_gpu_device *vgdev, cmd_p->r.y = cpu_to_le32(y); virtio_gpu_queue_fenced_ctrl_buffer(vgdev, vbuf, fence); - virtio_gpu_notify(vgdev); } static void @@ -1048,7 +1045,6 @@ void virti...
2020 Feb 14
0
[PATCH v4 3/6] drm/virtio: batch plane updates (pageflip)
...pu_notify(vgdev); } void virtio_gpu_cmd_resource_flush(struct virtio_gpu_device *vgdev, @@ -590,7 +589,6 @@ void virtio_gpu_cmd_resource_flush(struct virtio_gpu_device *vgdev, cmd_p->r.y = cpu_to_le32(y); virtio_gpu_queue_ctrl_buffer(vgdev, vbuf); - virtio_gpu_notify(vgdev); } void virtio_gpu_cmd_transfer_to_host_2d(struct virtio_gpu_device *vgdev, @@ -623,7 +621,6 @@ void virtio_gpu_cmd_transfer_to_host_2d(struct virtio_gpu_device *vgdev, cmd_p->r.y = cpu_to_le32(y); virtio_gpu_queue_fenced_ctrl_buffer(vgdev, vbuf, fence); - virtio_gpu_notify(vgdev); } static void @@ -1049,7 +1046,6 @@ void virti...
2016 May 27
2
[PATCH] Add virtio gpu driver.
...lookup the cursor */ > - gobj = drm_gem_object_lookup(crtc->dev, file_priv, handle); > - if (gobj == NULL) > - return -ENOENT; > - > - qobj = gem_to_virtio_gpu_obj(gobj); > - > - if (!qobj->hw_res_handle) { > - ret = -EINVAL; > - goto out; > - } > - > - virtio_gpu_cmd_transfer_to_host_2d(vgdev, qobj->hw_res_handle, 0, > - cpu_to_le32(64), > - cpu_to_le32(64), > - 0, 0, &fence); > - ret = virtio_gpu_object_reserve(qobj, false); > - if (!ret) { > - reservation_object_add_excl_fence(qobj->tbo.resv, > - &fence->f); >...
2016 May 27
2
[PATCH] Add virtio gpu driver.
...lookup the cursor */ > - gobj = drm_gem_object_lookup(crtc->dev, file_priv, handle); > - if (gobj == NULL) > - return -ENOENT; > - > - qobj = gem_to_virtio_gpu_obj(gobj); > - > - if (!qobj->hw_res_handle) { > - ret = -EINVAL; > - goto out; > - } > - > - virtio_gpu_cmd_transfer_to_host_2d(vgdev, qobj->hw_res_handle, 0, > - cpu_to_le32(64), > - cpu_to_le32(64), > - 0, 0, &fence); > - ret = virtio_gpu_object_reserve(qobj, false); > - if (!ret) { > - reservation_object_add_excl_fence(qobj->tbo.resv, > - &fence->f); >...