Skip to contentSkip to conversation

drm/virtio: add missing virtio_gpu_array_lock_resv call

PATCH In review Gerd Hoffmann 3 participants 4 messages Jan 10, 2020

Subsystems (4)
lore
Share & tools
lore

Gerd Hoffmann

author maintainer
#0 lore raw

PATCH 1/1 drm/virtio: add missing virtio_gpu_array_lock_resv call

When submitting a fenced command we must lock the object reservations because virtio_gpu_queue_fenced_ctrl_buffer() unlocks after adding the fence.

---
 drivers/gpu/drm/virtio/virtgpu_plane.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/virtio/virtgpu_plane.c +1 -0
index 390524143139..1635a9ff4794 100644
@@ -232,6 +232,7 @@ static void virtio_gpu_cursor_plane_update(struct drm_plane *plane,
 		if (!objs)
 			return;
 		virtio_gpu_array_add_obj(objs, vgfb->base.obj[0]);
+		virtio_gpu_array_lock_resv(objs);
 		virtio_gpu_cmd_transfer_to_host_2d
 			(vgdev, 0,
 			 plane->state->crtc_w,
Signature · 6 lines
2.18.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Tested-by on v1 1/1
#1 lore raw
Quoted 3 lines · Gerd Hoffmann

When submitting a fenced command we must lock the object reservations because virtio_gpu_queue_fenced_ctrl_buffer() unlocks after adding the fence.

Thanks a lot! With this patch applied, my VM doesn't throw lockdep warnings anymore. If you want, you can add:

Quoted 5 lines
---
 drivers/gpu/drm/virtio/virtgpu_plane.c | 1 +
 1 file changed, 1 insertion(+)
reviewer Reviewed-by
#2 lore raw
Quoted 13 lines · Jann Horn
Quoted 3 lines · Gerd Hoffmann

When submitting a fenced command we must lock the object reservations because virtio_gpu_queue_fenced_ctrl_buffer() unlocks after adding the fence.

Thanks a lot! With this patch applied, my VM doesn't throw lockdep warnings anymore. If you want, you can add:

Quoted 2 lines
Quoted 3 lines
Quoted 3 lines
---
 drivers/gpu/drm/virtio/virtgpu_plane.c | 1 +
 1 file changed, 1 insertion(+)
reviewer Reviewed-by
#3 lore raw
In reply to Jann Horn
Quoted 13 lines · Jann Horn
Quoted 3 lines · Gerd Hoffmann

When submitting a fenced command we must lock the object reservations because virtio_gpu_queue_fenced_ctrl_buffer() unlocks after adding the fence.

Thanks a lot! With this patch applied, my VM doesn't throw lockdep warnings anymore. If you want, you can add:

Quoted 2 lines
Quoted 3 lines
Quoted 3 lines
---
 drivers/gpu/drm/virtio/virtgpu_plane.c | 1 +
 1 file changed, 1 insertion(+)

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel