David Riley
2019-Sep-10 20:06 UTC
[PATCH v3 1/2] drm/virtio: Rewrite virtio_gpu_queue_ctrl_buffer using fenced version.
Factor function in preparation to generating scatterlist prior to locking. Signed-off-by: David Riley <davidriley at chromium.org> --- drivers/gpu/drm/virtio/virtgpu_vq.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index 981ee16e3ee9..bf5a4a50b002 100644 --- a/drivers/gpu/drm/virtio/virtgpu_vq.c +++ b/drivers/gpu/drm/virtio/virtgpu_vq.c @@ -299,17 +299,6 @@ static int virtio_gpu_queue_ctrl_buffer_locked(struct virtio_gpu_device *vgdev, return ret; } -static int virtio_gpu_queue_ctrl_buffer(struct virtio_gpu_device *vgdev, - struct virtio_gpu_vbuffer *vbuf) -{ - int rc; - - spin_lock(&vgdev->ctrlq.qlock); - rc = virtio_gpu_queue_ctrl_buffer_locked(vgdev, vbuf); - spin_unlock(&vgdev->ctrlq.qlock); - return rc; -} - static int virtio_gpu_queue_fenced_ctrl_buffer(struct virtio_gpu_device *vgdev, struct virtio_gpu_vbuffer *vbuf, struct virtio_gpu_ctrl_hdr *hdr, @@ -335,13 +324,19 @@ static int virtio_gpu_queue_fenced_ctrl_buffer(struct virtio_gpu_device *vgdev, goto again; } - if (fence) + if (hdr && fence) virtio_gpu_fence_emit(vgdev, hdr, fence); rc = virtio_gpu_queue_ctrl_buffer_locked(vgdev, vbuf); spin_unlock(&vgdev->ctrlq.qlock); return rc; } +static int virtio_gpu_queue_ctrl_buffer(struct virtio_gpu_device *vgdev, + struct virtio_gpu_vbuffer *vbuf) +{ + return virtio_gpu_queue_fenced_ctrl_buffer(vgdev, vbuf, NULL, NULL); +} + static int virtio_gpu_queue_cursor(struct virtio_gpu_device *vgdev, struct virtio_gpu_vbuffer *vbuf) { -- 2.23.0.162.g0b9fbb3734-goog
Gerd Hoffmann
2019-Sep-11 05:12 UTC
[PATCH v3 1/2] drm/virtio: Rewrite virtio_gpu_queue_ctrl_buffer using fenced version.
On Tue, Sep 10, 2019 at 01:06:50PM -0700, David Riley wrote:> Factor function in preparation to generating scatterlist prior to locking.Patches are looking good now, but they don't apply. What tree was used to create them? Latest virtio-gpu driver bits are in drm-misc-next (see https://cgit.freedesktop.org/drm/drm-misc). cheers, Gerd
David Riley
2019-Sep-11 17:35 UTC
[PATCH v3 1/2] drm/virtio: Rewrite virtio_gpu_queue_ctrl_buffer using fenced version.
They were based off of Linus' https://github.com/torvalds/linux master from yesterday. I can rebase onto drm-misc-next. On Tue, Sep 10, 2019 at 10:12 PM Gerd Hoffmann <kraxel at redhat.com> wrote:> > On Tue, Sep 10, 2019 at 01:06:50PM -0700, David Riley wrote: > > Factor function in preparation to generating scatterlist prior to locking. > > Patches are looking good now, but they don't apply. What tree was used > to create them? > > Latest virtio-gpu driver bits are in drm-misc-next (see > https://cgit.freedesktop.org/drm/drm-misc). > > cheers, > Gerd
Reasonably Related Threads
- [PATCH v3 1/2] drm/virtio: Rewrite virtio_gpu_queue_ctrl_buffer using fenced version.
- [PATCH v4 1/2] drm/virtio: Rewrite virtio_gpu_queue_ctrl_buffer using fenced version.
- [PATCH v3 2/2] drm/virtio: Use vmalloc for command buffer allocations.
- [PATCH v4 2/2] drm/virtio: Use vmalloc for command buffer allocations.
- [PATCH v2] drm/virtio: Use vmalloc for command buffer allocations.