Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp458935ybd; Wed, 26 Jun 2019 00:54:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJdFFy+CqY6fLVRswi8cHZb4gvpvpBdV7YCb9PtZKQMt8wLkObRE6+kW4ITkGe5wFgqhT0 X-Received: by 2002:a17:90a:9289:: with SMTP id n9mr3123100pjo.35.1561535673644; Wed, 26 Jun 2019 00:54:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561535673; cv=none; d=google.com; s=arc-20160816; b=ssrJAloL2FyfEX6Mbo1MoFYPrTRRf+eZ8VnLYMgPC5Tcj1q2/2l/es3v1Gx93EH4z8 fzy224hN07zuOx+7HsA4LbCV34vaVwpaTAEvNvgf9Rvt678Yfo/FQ+FAG3eeTVeC32W4 v1g8nLBTVgKLZtWmdIMVsrrz5gAx9gByxc7B3XYvWdw3ce2kf0NqwfdpA94mFEuXQMS8 eavuNQ2dmR2ixo+iunfJWK4mujS5qqShht8U5E2lonLmmhh5cjUxLF/hk99oHYyOkHFJ gy1R95Z4hbn8+7BHYs4+qHODCa8mzGiHjFWkj1aQzzG/6H24Zyg4fdZNxNCdQws5uPXo omFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=zGUAK+K2yaPzsTuMfB5QItFu9LLH6vfeZM5UUrn5/Wc=; b=TNtOcLbcjbJNGn/jrkAXpYFUTYAYLY9XJ2IKkPjHAKia+Dbh2DdWwX/K0QewUT0LtA B5lj7P4k80rHOV9uLwBJ6FwLunp5xrRuaqWzCZWlW/MOVPNhU8VodwoVTkFwlQ5Ra3Qr 5fQNECFbW4jbiNPO3hWsZSoa/2azSfK+f90+VcyiWg4ZL+mdzRyBZV4lcAKPRGqxfz9G yl+wuykSTpjnaX+p6nae51Z0paCANjv4xkKE6NBNJDBc/TZBS03mI7EdxpZs5PhGB1wd 25DBMAYYcYRyacm/7u9pD3XeTEPWiWkkqXHuZ0bSXjYPinAf5MpIrtduXhl/CO9xf7OJ yAXA== 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 z14si16432480pgc.581.2019.06.26.00.54.16; Wed, 26 Jun 2019 00:54:33 -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 S1726871AbfFZHv7 (ORCPT + 99 others); Wed, 26 Jun 2019 03:51:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57348 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725379AbfFZHv7 (ORCPT ); Wed, 26 Jun 2019 03:51:59 -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 985483087BA9; Wed, 26 Jun 2019 07:51:58 +0000 (UTC) Received: from gondolin (dhcp-192-222.str.redhat.com [10.33.192.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id 296F660C6E; Wed, 26 Jun 2019 07:51:48 +0000 (UTC) Date: Wed, 26 Jun 2019 09:51:46 +0200 From: Cornelia Huck To: Gerd Hoffmann Cc: dri-devel@lists.freedesktop.org, jcmvbkbc@gmail.com, David Airlie , Daniel Vetter , 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 Message-ID: <20190626095146.2731a2dc.cohuck@redhat.com> In-Reply-To: <20190405044602.2334-1-kraxel@redhat.com> References: <20190405044602.2334-1-kraxel@redhat.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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.45]); Wed, 26 Jun 2019 07:51:58 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 5 Apr 2019 06:46:02 +0200 Gerd Hoffmann 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 > 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); 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 I have also looked at the code a bit, but don't feel confident enough to give an R-b. Acked-by: Cornelia Huck