Skip to contentSkip to conversation

drm/virtio: move drm_connector_update_edid_property() call

PATCH In review Gerd Hoffmann 3 participants 7 messages Apr 5, 2019 – Jun 26, 2019

Subsystems (4)
lore
Share & tools
lore

Gerd Hoffmann

author maintainer
#0 lore raw

PATCH 1/1 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.

---
 drivers/gpu/drm/virtio/virtgpu_vq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/virtio/virtgpu_vq.c +1 -1
index e62fe24b1a2e..5bb0f0a084e9 100644
@@ -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);
Signature · 1 line
2.18.1
Tested-by on v1 1/1
#1 lore raw
Quoted 9 lines · Gerd Hoffmann

drm_connector_update_edid_property can sleep, we must not call it while holding a spinlock. Move the callsize.

---
 drivers/gpu/drm/virtio/virtgpu_vq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This change fixes the warning for me, thanks!

Signature · 2 lines
Thanks.
-- Max
Tested-by on v1 1/1
#2 lore raw
In reply to Gerd Hoffmann
Quoted 9 lines · Gerd Hoffmann

drm_connector_update_edid_property can sleep, we must not call it while holding a spinlock. Move the callsize.

---
 drivers/gpu/drm/virtio/virtgpu_vq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This change fixes the warning for me, thanks!

Signature · 2 lines
Thanks.
-- Max
Tested-by Acked-by on v1 1/1
#3 lore raw
In reply to Gerd Hoffmann
Quoted 2 lines · On Fri, 5 Apr 2019 06:46:02 +0200 Gerd Hoffmann <[email protected]> wrote:

drm_connector_update_edid_property can sleep, we must not call it while holding a spinlock. Move the callsize.

s/callsize/callsite/

Quoted 14 lines
---
 drivers/gpu/drm/virtio/virtgpu_vq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/virtio/virtgpu_vq.c +0 -0
index e62fe24b1a2e..5bb0f0a084e9 100644
@@ -619,11 +619,11 @@ static void virtio_gpu_cmd_get_edid_cb(struct virtio_gpu_device *vgdev,
 	output = vgdev->outputs + scanout;
 

drivers/gpu/drm/virtio/virtgpu_vq.c static void virtio_gpu_cmd_get_edid_cb(struct virtio_gpu_device *vgdev, · line 629

Quoted 10 lines
drivers/gpu/drm/virtio/virtgpu_vq.c +1 -1
 	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).

I have also looked at the code a bit, but don't feel confident enough to give an R-b.

Tested-by Acked-by on v1 1/1
#4 lore raw
In reply to Gerd Hoffmann
Quoted 2 lines · On Fri, 5 Apr 2019 06:46:02 +0200 Gerd Hoffmann <[email protected]> wrote:

drm_connector_update_edid_property can sleep, we must not call it while holding a spinlock. Move the callsize.

s/callsize/callsite/

Quoted 14 lines
---
 drivers/gpu/drm/virtio/virtgpu_vq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/virtio/virtgpu_vq.c +0 -0
index e62fe24b1a2e..5bb0f0a084e9 100644
@@ -619,11 +619,11 @@ static void virtio_gpu_cmd_get_edid_cb(struct virtio_gpu_device *vgdev,
 	output = vgdev->outputs + scanout;
 

drivers/gpu/drm/virtio/virtgpu_vq.c static void virtio_gpu_cmd_get_edid_cb(struct virtio_gpu_device *vgdev, · line 629

Quoted 10 lines
drivers/gpu/drm/virtio/virtgpu_vq.c +1 -1
 	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).

I have also looked at the code a bit, but don't feel confident enough to give an R-b.

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

author maintainer
#5 lore raw
Quoted 7 lines · Cornelia Huck
Quoted 2 lines · On Fri, 5 Apr 2019 06:46:02 +0200 Gerd Hoffmann <[email protected]> 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.

Quoted 9 lines

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).

I have also looked at the code a bit, but don't feel confident enough to give an R-b.

Thanks. Pushed to drm-misc-fixes.

cheers,
Gerd

author maintainer
#6 lore raw
In reply to Cornelia Huck
Quoted 7 lines · Cornelia Huck
Quoted 2 lines · On Fri, 5 Apr 2019 06:46:02 +0200 Gerd Hoffmann <[email protected]> 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.

Quoted 9 lines

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).

I have also looked at the code a bit, but don't feel confident enough to give an R-b.

Thanks. Pushed to drm-misc-fixes.

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