Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8250971imu; Thu, 15 Nov 2018 08:44:08 -0800 (PST) X-Google-Smtp-Source: AJdET5fZgLWK/8NSAK2UzRxIPelsUCpuRZsp4b0Yt0d4Z0Pp6LB7s13Na7ZTJORdVy3aXT0u8LIY X-Received: by 2002:a63:1444:: with SMTP id 4mr6567949pgu.430.1542300248513; Thu, 15 Nov 2018 08:44:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542300248; cv=none; d=google.com; s=arc-20160816; b=VR7k6ER2v74rdR9s/QtrwEvzFfLWepQs/OZAd2RUk7nE+kKDoEXkK8l/yjaJ8HS8hY 2HJ0zvf0y4qdPyQDuUFh2pvwYY+eZNm6AgkOiwsLDxnVdOYnDPXIaAw7OLncCR3QyIo/ KpXkpU/emMKG2h8kXk4qfNDy3EGD44+O84Eyv2NEwaxy33kBZPI1qjL28n8SrrMKMqnO tyyj/IkLAUHNh1tZyKLqwCapD4F5j3V5iadaBHcwbpz1eA8khGOmzJUmIxT7H8OBZlR7 0HrIXQSZxAIhZUIJ1vTBI+6Lzo8aykgG8wgZmL2KYjpB8oalC1HhPo3OqTelPWTxESLA dLmw== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=kMIhnjw3tad+ogHCBDY3SDeWU152taN+kqKl3MryT4I=; b=EzK9Ix3pGg+PNm0/2uL3MxAslQ+vFei5xY027MhvjeLMmH5cnC5smJ60DmoL4HzUyT 4PS1sltTznUaZpnGupsg7gAHEczGfombZ5mmhtO14bXcXlaH43//Sev6zH3StTKGeLnH aRokd2Ae9clFY2WmfSgP7W/HFjqC6u+u2Fb3HgkUppWGUP0njlhPpuf/QPgYK3Ed4ys/ u9Yo8drVvdVI2WEihG7B4fkwlFS00pRIrHKnFopHR5Immqcpx/0WQ/A4r7jZVw3XlXiT 2UW0lCK/9SUatyZbVyez1dD/h3pIiE8dYVoh2iCPM6k//vdDbQATtr//DYcbO9h+x6Ns 2QhQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3-v6si5596678plb.214.2018.11.15.08.43.44; Thu, 15 Nov 2018 08:44:08 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388455AbeKPCvc (ORCPT + 99 others); Thu, 15 Nov 2018 21:51:32 -0500 Received: from mail.bootlin.com ([62.4.15.54]:48971 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387839AbeKPCvc (ORCPT ); Thu, 15 Nov 2018 21:51:32 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 4803C207AD; Thu, 15 Nov 2018 17:42:57 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.2 Received: from bbrezillon (aaubervilliers-681-1-13-146.w90-88.abo.wanadoo.fr [90.88.134.146]) by mail.bootlin.com (Postfix) with ESMTPSA id 849262074D; Thu, 15 Nov 2018 17:42:39 +0100 (CET) Date: Thu, 15 Nov 2018 17:42:39 +0100 From: Boris Brezillon To: Paul Kocialkowski Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Thomas Petazzoni , Eric Anholt Subject: Re: [PATCH] drm/fb-helper: Blacklist writeback when adding connectors to fbdev Message-ID: <20181115174239.773b71e9@bbrezillon> In-Reply-To: <20181115163248.21168-1-paul.kocialkowski@bootlin.com> References: <20181115163248.21168-1-paul.kocialkowski@bootlin.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 15 Nov 2018 17:32:48 +0100 Paul Kocialkowski wrote: > Writeback connectors do not produce any on-screen output and require > special care for use. Such connectors are hidden from enumeration in > DRM resources by default, but they are still picked-up by fbdev. > This makes rather little sense since fbdev is not really adapted for > dealing with writeback. > > Moreover, this is also a source of issues when userspace disables the > CRTC (and associated plane) without detaching the CRTC from the > connector (which is hidden by default). In this case, the connector is > still using the CRTC, leading to am "enabled/connectors mismatch" and ^an > eventually the failure of the associated atomic commit. This situation > happens with VC4 testing under IGT GPU Tools. > > Filter out writeback connectors in the fbdev helper to solve this. > > Signed-off-by: Paul Kocialkowski Reviewed-by: Boris Brezillon > --- > drivers/gpu/drm/drm_fb_helper.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c > index a502f3e519fd..dd852a25d375 100644 > --- a/drivers/gpu/drm/drm_fb_helper.c > +++ b/drivers/gpu/drm/drm_fb_helper.c > @@ -219,6 +219,9 @@ int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper) > mutex_lock(&fb_helper->lock); > drm_connector_list_iter_begin(dev, &conn_iter); > drm_for_each_connector_iter(connector, &conn_iter) { > + if (connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK) > + continue; > + > ret = __drm_fb_helper_add_one_connector(fb_helper, connector); > if (ret) > goto fail;