All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/virtio: add missing virtio_gpu_array_lock_resv call
@ 2020-01-10  9:45 ` Gerd Hoffmann
  0 siblings, 0 replies; 9+ messages in thread
From: Gerd Hoffmann @ 2020-01-10  9:45 UTC (permalink / raw)
  To: dri-devel
  Cc: gurchetansingh, olvaffe, jannh, Gerd Hoffmann, David Airlie,
	Daniel Vetter, open list:VIRTIO GPU DRIVER, open list

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

Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 drivers/gpu/drm/virtio/virtgpu_plane.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
index 390524143139..1635a9ff4794 100644
--- a/drivers/gpu/drm/virtio/virtgpu_plane.c
+++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
@@ -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,
-- 
2.18.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] drm/virtio: add missing virtio_gpu_array_lock_resv call
@ 2020-01-10  9:45 ` Gerd Hoffmann
  0 siblings, 0 replies; 9+ messages in thread
From: Gerd Hoffmann @ 2020-01-10  9:45 UTC (permalink / raw)
  To: dri-devel
  Cc: jannh, David Airlie, open list, gurchetansingh, Gerd Hoffmann,
	open list:VIRTIO GPU DRIVER

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

Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 drivers/gpu/drm/virtio/virtgpu_plane.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
index 390524143139..1635a9ff4794 100644
--- a/drivers/gpu/drm/virtio/virtgpu_plane.c
+++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
@@ -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,
-- 
2.18.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/virtio: add missing virtio_gpu_array_lock_resv call
  2020-01-10  9:45 ` Gerd Hoffmann
  (?)
@ 2020-01-10 14:26   ` Jann Horn via Virtualization
  -1 siblings, 0 replies; 9+ messages in thread
From: Jann Horn @ 2020-01-10 14:26 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: dri-devel, gurchetansingh, Chia-I Wu, David Airlie,
	Daniel Vetter, open list:VIRTIO GPU DRIVER, open list

On Fri, Jan 10, 2020 at 10:45 AM Gerd Hoffmann <kraxel@redhat.com> wrote:
> 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:

Tested-by: Jann Horn <jannh@google.com>

> Reported-by: Jann Horn <jannh@google.com>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  drivers/gpu/drm/virtio/virtgpu_plane.c | 1 +
>  1 file changed, 1 insertion(+)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/virtio: add missing virtio_gpu_array_lock_resv call
@ 2020-01-10 14:26   ` Jann Horn via Virtualization
  0 siblings, 0 replies; 9+ messages in thread
From: Jann Horn via Virtualization @ 2020-01-10 14:26 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: David Airlie, open list, dri-devel, open list:VIRTIO GPU DRIVER,
	Daniel Vetter, gurchetansingh, Chia-I Wu

On Fri, Jan 10, 2020 at 10:45 AM Gerd Hoffmann <kraxel@redhat.com> wrote:
> 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:

Tested-by: Jann Horn <jannh@google.com>

> Reported-by: Jann Horn <jannh@google.com>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  drivers/gpu/drm/virtio/virtgpu_plane.c | 1 +
>  1 file changed, 1 insertion(+)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/virtio: add missing virtio_gpu_array_lock_resv call
@ 2020-01-10 14:26   ` Jann Horn via Virtualization
  0 siblings, 0 replies; 9+ messages in thread
From: Jann Horn @ 2020-01-10 14:26 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: David Airlie, open list, dri-devel, open list:VIRTIO GPU DRIVER,
	gurchetansingh

On Fri, Jan 10, 2020 at 10:45 AM Gerd Hoffmann <kraxel@redhat.com> wrote:
> 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:

Tested-by: Jann Horn <jannh@google.com>

> Reported-by: Jann Horn <jannh@google.com>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  drivers/gpu/drm/virtio/virtgpu_plane.c | 1 +
>  1 file changed, 1 insertion(+)
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/virtio: add missing virtio_gpu_array_lock_resv call
  2020-01-10 14:26   ` Jann Horn via Virtualization
@ 2020-01-10 21:02     ` Chia-I Wu
  -1 siblings, 0 replies; 9+ messages in thread
From: Chia-I Wu @ 2020-01-10 21:02 UTC (permalink / raw)
  To: Jann Horn
  Cc: Gerd Hoffmann, ML dri-devel, Gurchetan Singh, David Airlie,
	Daniel Vetter, open list:VIRTIO GPU DRIVER, open list

On Fri, Jan 10, 2020 at 6:27 AM Jann Horn <jannh@google.com> wrote:
>
> On Fri, Jan 10, 2020 at 10:45 AM Gerd Hoffmann <kraxel@redhat.com> wrote:
> > 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:
>
> Tested-by: Jann Horn <jannh@google.com>
>
> > Reported-by: Jann Horn <jannh@google.com>
> > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
> > ---
> >  drivers/gpu/drm/virtio/virtgpu_plane.c | 1 +
> >  1 file changed, 1 insertion(+)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/virtio: add missing virtio_gpu_array_lock_resv call
  2020-01-10 14:26   ` Jann Horn via Virtualization
  (?)
  (?)
@ 2020-01-10 21:02   ` Chia-I Wu
  -1 siblings, 0 replies; 9+ messages in thread
From: Chia-I Wu @ 2020-01-10 21:02 UTC (permalink / raw)
  To: Jann Horn
  Cc: David Airlie, open list, ML dri-devel,
	open list:VIRTIO GPU DRIVER, Daniel Vetter, Gurchetan Singh

On Fri, Jan 10, 2020 at 6:27 AM Jann Horn <jannh@google.com> wrote:
>
> On Fri, Jan 10, 2020 at 10:45 AM Gerd Hoffmann <kraxel@redhat.com> wrote:
> > 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:
>
> Tested-by: Jann Horn <jannh@google.com>
>
> > Reported-by: Jann Horn <jannh@google.com>
> > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
> > ---
> >  drivers/gpu/drm/virtio/virtgpu_plane.c | 1 +
> >  1 file changed, 1 insertion(+)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/virtio: add missing virtio_gpu_array_lock_resv call
@ 2020-01-10 21:02     ` Chia-I Wu
  0 siblings, 0 replies; 9+ messages in thread
From: Chia-I Wu @ 2020-01-10 21:02 UTC (permalink / raw)
  To: Jann Horn
  Cc: David Airlie, open list, ML dri-devel,
	open list:VIRTIO GPU DRIVER, Gerd Hoffmann, Gurchetan Singh

On Fri, Jan 10, 2020 at 6:27 AM Jann Horn <jannh@google.com> wrote:
>
> On Fri, Jan 10, 2020 at 10:45 AM Gerd Hoffmann <kraxel@redhat.com> wrote:
> > 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:
>
> Tested-by: Jann Horn <jannh@google.com>
>
> > Reported-by: Jann Horn <jannh@google.com>
> > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
> > ---
> >  drivers/gpu/drm/virtio/virtgpu_plane.c | 1 +
> >  1 file changed, 1 insertion(+)
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] drm/virtio: add missing virtio_gpu_array_lock_resv call
@ 2020-01-10  9:45 Gerd Hoffmann
  0 siblings, 0 replies; 9+ messages in thread
From: Gerd Hoffmann @ 2020-01-10  9:45 UTC (permalink / raw)
  To: dri-devel
  Cc: jannh, David Airlie, open list, gurchetansingh, Daniel Vetter,
	open list:VIRTIO GPU DRIVER, olvaffe

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

Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 drivers/gpu/drm/virtio/virtgpu_plane.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
index 390524143139..1635a9ff4794 100644
--- a/drivers/gpu/drm/virtio/virtgpu_plane.c
+++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
@@ -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,
-- 
2.18.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-01-12 12:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-10  9:45 [PATCH] drm/virtio: add missing virtio_gpu_array_lock_resv call Gerd Hoffmann
2020-01-10  9:45 ` Gerd Hoffmann
2020-01-10 14:26 ` Jann Horn
2020-01-10 14:26   ` Jann Horn
2020-01-10 14:26   ` Jann Horn via Virtualization
2020-01-10 21:02   ` Chia-I Wu
2020-01-10 21:02   ` Chia-I Wu
2020-01-10 21:02     ` Chia-I Wu
  -- strict thread matches above, loose matches on Subject: below --
2020-01-10  9:45 Gerd Hoffmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.