Gerd Hoffmann
2019-Apr-05 04:46 UTC
[PATCH] drm/virtio: move drm_connector_update_edid_property() call
drm_connector_update_edid_property can sleep, we must not call it while holding a spinlock. Move the callsize. Reported-by: Max Filippov <jcmvbkbc at gmail.com> Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/virtgpu_vq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index e62fe24b1a2e..5bb0f0a084e9 100644 --- a/drivers/gpu/drm/virtio/virtgpu_vq.c +++ b/drivers/gpu/drm/virtio/virtgpu_vq.c @@ -619,11 +619,11 @@ static void virtio_gpu_cmd_get_edid_cb(struct virtio_gpu_device *vgdev, output = vgdev->outputs + scanout; new_edid = drm_do_get_edid(&output->conn, virtio_get_edid_block, resp); + drm_connector_update_edid_property(&output->conn, new_edid); spin_lock(&vgdev->display_info_lock); old_edid = output->edid; output->edid = new_edid; - drm_connector_update_edid_property(&output->conn, output->edid); spin_unlock(&vgdev->display_info_lock); kfree(old_edid); -- 2.18.1
Max Filippov
2019-Apr-05 06:51 UTC
[PATCH] drm/virtio: move drm_connector_update_edid_property() call
On Thu, Apr 4, 2019 at 9:46 PM Gerd Hoffmann <kraxel at redhat.com> wrote:> > drm_connector_update_edid_property can sleep, we must not > call it while holding a spinlock. Move the callsize. > > Reported-by: Max Filippov <jcmvbkbc at gmail.com> > Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> > --- > drivers/gpu/drm/virtio/virtgpu_vq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)This change fixes the warning for me, thanks! Tested-by: Max Filippov <jcmvbkbc at gmail.com> -- Thanks. -- Max
Cornelia Huck
2019-Jun-26 07:51 UTC
[PATCH] drm/virtio: move drm_connector_update_edid_property() call
On Fri, 5 Apr 2019 06:46:02 +0200 Gerd Hoffmann <kraxel at redhat.com> wrote:> drm_connector_update_edid_property can sleep, we must not > call it while holding a spinlock. Move the callsize.s/callsize/callsite/> > Reported-by: Max Filippov <jcmvbkbc at gmail.com> > Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> > --- > drivers/gpu/drm/virtio/virtgpu_vq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c > index e62fe24b1a2e..5bb0f0a084e9 100644 > --- a/drivers/gpu/drm/virtio/virtgpu_vq.c > +++ b/drivers/gpu/drm/virtio/virtgpu_vq.c > @@ -619,11 +619,11 @@ static void virtio_gpu_cmd_get_edid_cb(struct virtio_gpu_device *vgdev, > output = vgdev->outputs + scanout; > > new_edid = drm_do_get_edid(&output->conn, virtio_get_edid_block, resp); > + drm_connector_update_edid_property(&output->conn, new_edid); > > spin_lock(&vgdev->display_info_lock); > old_edid = output->edid; > output->edid = new_edid; > - drm_connector_update_edid_property(&output->conn, output->edid); > spin_unlock(&vgdev->display_info_lock); > > kfree(old_edid);This gets rid of the sleeping while atomic traces I've been seeing with an s390x guest (both virtio-gpu-pci and virtio-gpu-ccw). Tested-by: Cornelia Huck <cohuck at redhat.com> I have also looked at the code a bit, but don't feel confident enough to give an R-b. Acked-by: Cornelia Huck <cohuck at redhat.com>
Gerd Hoffmann
2019-Jun-26 09:15 UTC
[PATCH] drm/virtio: move drm_connector_update_edid_property() call
On Wed, Jun 26, 2019 at 09:51:46AM +0200, Cornelia Huck wrote:> On Fri, 5 Apr 2019 06:46:02 +0200 > Gerd Hoffmann <kraxel at redhat.com> wrote: > > > drm_connector_update_edid_property can sleep, we must not > > call it while holding a spinlock. Move the callsize. > > s/callsize/callsite/Fixed on commit.> This gets rid of the sleeping while atomic traces I've been seeing with > an s390x guest (both virtio-gpu-pci and virtio-gpu-ccw). > > Tested-by: Cornelia Huck <cohuck at redhat.com> > > I have also looked at the code a bit, but don't feel confident enough > to give an R-b. > > Acked-by: Cornelia Huck <cohuck at redhat.com>Thanks. Pushed to drm-misc-fixes. cheers, Gerd
Apparently Analagous Threads
- [PATCH] drm/virtio: move drm_connector_update_edid_property() call
- [PATCH AUTOSEL 5.1 03/11] drm/virtio: move drm_connector_update_edid_property() call
- [PATCH 3/3] drm/virtio: add edid support
- [PATCH v2] drm/nouveau/kms: Fix NULL pointer dereference in nouveau_connector_detect_depth
- [PATCH (repost) 5/5] drm/amdgpu: add DisplayPort CEC-Tunneling-over-AUX support