Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2535423imu; Thu, 29 Nov 2018 06:32:37 -0800 (PST) X-Google-Smtp-Source: AFSGD/V4q6iFUByJDsQ/IgHMp0C8ZqjnLZKFA0HkpHJNdkpJ2QNkajR7A1LsZMYI8L3seEJxLmBp X-Received: by 2002:a17:902:44a:: with SMTP id 68-v6mr1591236ple.73.1543501957942; Thu, 29 Nov 2018 06:32:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543501957; cv=none; d=google.com; s=arc-20160816; b=g6vM827BQJstM9CFn9BId5+9ghjEDQzxqeY55VqRgMPBslz5RPo36Cicxt47ScWihs 1L8Qt09NjnhVF+zS7EsqauBJQl4oBkwZ65fLlKgY0PEi158DeWj27C8mtS3t2R05bwFo dXMSAfCwBYkDEulkIGXRxiw6PZ4uyvIT+fUP9dBThRtWOs/JosXezOHxzPYDXY43HhyT 7T8tbtVbbv7ApoLgYHYgS56ymnXdlwJ/RJmhCqMiDEgN+8JG4+L+ipIgFK6TNrEd05vn wMNlX0twFkcckMKcz88z7NSWKhOMaY19nKsQUx3LqEQ0vvaX1FE9KBhwCUMg64nG76oA ZFTQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yUpGXX+szBmBMZP7crFTKFphFiQzZs1vXP39WQR9PAc=; b=S+j5/BpHOuZ3JYcdBsebIG8D7q0yb2tVLIl9UxX5DjNSplx1iye83MO1J6DVZsLNwx xU3z4BqtedAMDdn0Nt6T5NqmtCqU19gNXJP+YJT9sFnS1ds5msX85a25PSocpIjX/gre uURrPH8od9KFERi5mGpfn/IVzWxqXNY0rR9US7PktRaQx7CLCWp5KSJS1mnVk0q8YbI4 nZbXAEHNXGtC09KhWkxKLL5L7fDMI2jl6b5EPpqZ+80w/mpyrhXmfRnIppcJNtUqmjta GBiyDJxkbBgZvniDSnsl41dcdWucQUP+z6J6T2MBMrwL7YEefbXtBMeR9I+yiitFe++F IO7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zAIN2cvM; 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 q24si2470321pls.325.2018.11.29.06.32.09; Thu, 29 Nov 2018 06:32:37 -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; dkim=pass header.i=@kernel.org header.s=default header.b=zAIN2cvM; 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 S2388551AbeK3BfU (ORCPT + 99 others); Thu, 29 Nov 2018 20:35:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:37124 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732084AbeK3BfT (ORCPT ); Thu, 29 Nov 2018 20:35:19 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 087A521479; Thu, 29 Nov 2018 14:29:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543501786; bh=KIxA3Sl8roLGedwVi883FYcBGEtHyGFlIVeFwaZfNhg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zAIN2cvMLvOqx++dGlsQoYfZvdb6zgD8pGCC/vSacYbXCqyNucJOB6VVVtMUfhpGd fWuQACUlCd7rEI2C8RX3hJLLy9P5bRF3jTBbvBt7qgjBuIe+c12+HNxTyQUwsmaZ6o jhIsQzKcjINuMnpAjWiu5ToXBlsdsg8Ysj/7l1uk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Kocialkowski , Boris Brezillon , Maxime Ripard , Daniel Vetter Subject: [PATCH 4.19 040/110] drm/fb-helper: Blacklist writeback when adding connectors to fbdev Date: Thu, 29 Nov 2018 15:12:11 +0100 Message-Id: <20181129135922.880925714@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129135921.231283053@linuxfoundation.org> References: <20181129135921.231283053@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Paul Kocialkowski commit 8fd3b90300bec541806dac271de2fd44e2e4e2d2 upstream. 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 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 Reviewed-by: Maxime Ripard Tested-by: Maxime Ripard Fixes: 935774cd71fe ("drm: Add writeback connector type") Cc: # v4.19+ Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181115163248.21168-1-paul.kocialkowski@bootlin.com Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/drm_fb_helper.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -200,6 +200,9 @@ int drm_fb_helper_single_add_all_connect 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;