Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1875196yba; Thu, 4 Apr 2019 21:47:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqxUusDQfo+239PnPARDffRr6SyUmM0Xds88HQF5yv/ICTX76bFcpEvJuCdbsmV87CGvg3OU X-Received: by 2002:a17:902:168:: with SMTP id 95mr10363889plb.212.1554439626326; Thu, 04 Apr 2019 21:47:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554439626; cv=none; d=google.com; s=arc-20160816; b=EHt6Z/QiLL7coKuBf/UwLnsSVr2FbwMnkFAWxuBaWhUokvGp/SaR67CqPeyNhD6g1u LlIFYSaZX1yhFSkRoZVlAAkiX5S/HqQSKBODetNYkVnPYfVec4F8Wb/DZVmmfpJH/Ubo Lkqxu/zWXlfg23RBrUp0O9pA3RO4eHhgDcq1UmQmhDu+uGfDqQgGRSQNofFgfpIPqkMZ 51knVsl6STynpSEg6A+J8iS+PqfUzcXXaUGUdpOUdOshuSuxYSCh62r4b+aJeWWCk38o 71bVA+WPAhdRJDbZvE6KN99TC4KqwhhfMWvEgp1vt6RWPiMotkL+facIz8i/g9yko6IU 6Zwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=fUCb09XrBXufRpMZUSMdkoyGGGgGUKjkEs1xrEH35zE=; b=rVgwcXUGtYzx7Tx1A94qxMf76CESrhoCOnsgMGc7B9IaWMHBvFuN7nJ+CHpgca+JcS eJOP+A5B3gP8mdTziYEJ97H1RXbpBIXkLa/ZpG0FNt2AkG3OIwVOOSZp0+NLJrOo62eO /FbGUOkU2sF9DcWTgrJnyigpax6eO+K/4REcFEb8aKLjzBesjEC/14QaJKEvTiHDG6AD SemI4bGnbrx1GTWTwxNnEDuyug9joTnwzttckq66aCwVgw/yYaWwhz1THJ/m8HYfPbAU R5f/uF3V6jwjH+R/NjblHC0lK/3nxzfk/h0/CUK177S/7v9mOfdLxqPo9q0lrdyoZ6K/ 3cqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s29si18017771pga.152.2019.04.04.21.46.50; Thu, 04 Apr 2019 21:47:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726663AbfDEEqH (ORCPT + 99 others); Fri, 5 Apr 2019 00:46:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55250 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725973AbfDEEqH (ORCPT ); Fri, 5 Apr 2019 00:46:07 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AD85CC04D943; Fri, 5 Apr 2019 04:46:06 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-22.ams2.redhat.com [10.36.116.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9F57460C05; Fri, 5 Apr 2019 04:46:03 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id AB9A316E2C; Fri, 5 Apr 2019 06:46:02 +0200 (CEST) From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org Cc: jcmvbkbc@gmail.com, Gerd Hoffmann , David Airlie , Daniel Vetter , virtualization@lists.linux-foundation.org (open list:VIRTIO GPU DRIVER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] drm/virtio: move drm_connector_update_edid_property() call Date: Fri, 5 Apr 2019 06:46:02 +0200 Message-Id: <20190405044602.2334-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 05 Apr 2019 04:46:07 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org drm_connector_update_edid_property can sleep, we must not call it while holding a spinlock. Move the callsize. Reported-by: Max Filippov Signed-off-by: Gerd Hoffmann --- 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