linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: dri-devel@lists.freedesktop.org, jcmvbkbc@gmail.com,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	virtualization@lists.linux-foundation.org (open list:VIRTIO GPU
	DRIVER), linux-kernel@vger.kernel.org (open list)
Subject: Re: [PATCH] drm/virtio: move drm_connector_update_edid_property() call
Date: Wed, 26 Jun 2019 09:51:46 +0200	[thread overview]
Message-ID: <20190626095146.2731a2dc.cohuck@redhat.com> (raw)
In-Reply-To: <20190405044602.2334-1-kraxel@redhat.com>

On Fri,  5 Apr 2019 06:46:02 +0200
Gerd Hoffmann <kraxel@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@gmail.com>
> Signed-off-by: Gerd Hoffmann <kraxel@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@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@redhat.com>

  parent reply	other threads:[~2019-06-26  7:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05  4:46 [PATCH] drm/virtio: move drm_connector_update_edid_property() call Gerd Hoffmann
2019-04-05  6:51 ` Max Filippov
2019-06-26  7:51 ` Cornelia Huck [this message]
2019-06-26  9:15   ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190626095146.2731a2dc.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).