Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp372964pxj; Fri, 7 May 2021 10:26:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwop8d0wptbkCOcW+Y4eCLnOKeuqIOZmOYA0z9mLRSNWiBD3jSo9qjLcXXxLwqnZHHvDxoK X-Received: by 2002:a05:6402:26d1:: with SMTP id x17mr12783778edd.14.1620408361164; Fri, 07 May 2021 10:26:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620408361; cv=none; d=google.com; s=arc-20160816; b=lBCoNEX4YEXV5B+VWQqQrHSSIVKVgDDvj40Enibwxw378uSmjW0knYeHtbfcndOgN9 fj8Mj16R4/hjOZodN7Ww+C3p3v1oH7YJraAGVShKNNeYuOZpZXD1ll2Gf/ZZYDEkVUrw 8LflRl0wU8NKxDfwd9CMHFqGpi3Y/EVoJ4HfP2bZpuW5rmbxKD8zkGBpS81An0VLWVDZ d0WzwZbRQZ3YR72AlLSgMssHWe7AtX2EMfofYcrKl9u2jaLyUUS4286QuZPfSKbapn7W cfUUxH1QwA8niyI7G2sHpMGAsHYpQjZsFNlcHOPMVN/ZOCUm6zSFF0jfiL+d28q0A9V2 kS8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=SudjKN4UEIfT0/YepqLSU7wGC8AZ2ev0B9T1BBipTNo=; b=I/bV9j2Na/IA0BkWKKWqxqJoMRw2o4MjeAaYOLKSM6aDlZnO5Yqeu7THlw2Ipxs4ME T2uuhOW3AjtJcqGZhc8LCVp1lkGjeG9Z5Zu3mpmgh1rtMbcyAC6CjTa3IAKtmRagkOAB 0cAB+jzB2JtFvKBUHnecm/e6S2e2DnsYRAFEKFZVF25/ORN1GpCpBR2qYV7y+x4TTsxi pJSbkTSIxyZ/K2fwmP+p/fkCc/K5jJSakMkFZYMbv93p/8g2d8q5u7EkDAH5qVVCyAjf 2pTD3vxUzQ+e7qOhCgBFSkKjL2qUoxkeDPp0OHn7xGm5/CjZ9fpIwxwsHNbmVcX7Voc0 D5hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=hTxsRX3E; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=godHAfnM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u11si5345383edq.89.2021.05.07.10.25.36; Fri, 07 May 2021 10:26:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=hTxsRX3E; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=godHAfnM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237786AbhEGPGh (ORCPT + 99 others); Fri, 7 May 2021 11:06:37 -0400 Received: from wnew4-smtp.messagingengine.com ([64.147.123.18]:44291 "EHLO wnew4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233118AbhEGPGe (ORCPT ); Fri, 7 May 2021 11:06:34 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.west.internal (Postfix) with ESMTP id 5EF3612F1; Fri, 7 May 2021 11:05:33 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 07 May 2021 11:05:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=SudjKN4UEIfT0 /YepqLSU7wGC8AZ2ev0B9T1BBipTNo=; b=hTxsRX3EMtYdRvmlUd//K/1rRCnDq GyPlEGIJgnGKxjnzHFVMKtNJJrfTUzLD1YBbOc4GUkyg1UAtLC16Es9ixefWB0+s rd/GmOcCUgq7/b5D5eJUjsloCV39E2XVW/C+y8D3TJSfbmlWW2HbvxqfuK9q+jqQ R8eX04NsqQ4X6jCJtgPPTCMQiwfPdhYsucxjyO2xktz267BhAh49KgL3ybayERSz Ic1ekCDKKNLxZpuX6QAEGFEqSRua3kSzKXBMdDUK0LR71uf1emMgkv+pMh2tviKx dM+XM/zar5qj+C4ItbVhyNKg6tM/imyn301GKXq87EEmQwS7UCRK9rOGw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=SudjKN4UEIfT0/YepqLSU7wGC8AZ2ev0B9T1BBipTNo=; b=godHAfnM WQ6z2L4vdd7zmXh7icV7eubwRH6D0uvIwQej6n/ou71lxzzrPqWLn0n7U5Z8WSqL xypasSrvTzfUjDYGdU/DESLQ26MOdkciW+8rW6yW/Qs9Uxmwj+A6eUVCGRKNscPN ZkSiCXprnPIcOw4PyDrfKaHbzNYHxJeJ9+8yCWJ/W4bBa3QMQ2GD9cTEXiLPvlw7 HJCYYMY58Or55R6/QCEf+3Nkwzunni7OGiGBNyXOnSrV3dNbjxa/NdY832izchIB YfnR/agzLBVjsNL5TQFtdoHHFKcXflBTb2W3cvO++sMXutwqP2pI3Xmte2oiCVFh sIN6Vc40O1eLBg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdegvddgkeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 7 May 2021 11:05:32 -0400 (EDT) From: Maxime Ripard To: Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , dri-devel@lists.freedesktop.org, Daniel Vetter , David Airlie Cc: Eric Anholt , Nicolas Saenz Julienne , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Dave Stevenson , Phil Elwell , Tim Gover , Dom Cobley , linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH v4 02/12] drm/vc4: crtc: Skip the TXP Date: Fri, 7 May 2021 17:05:05 +0200 Message-Id: <20210507150515.257424-3-maxime@cerno.tech> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210507150515.257424-1-maxime@cerno.tech> References: <20210507150515.257424-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The vc4_set_crtc_possible_masks is meant to run over all the encoders and then set their possible_crtcs mask to their associated pixelvalve. However, since the commit 39fcb2808376 ("drm/vc4: txp: Turn the TXP into a CRTC of its own"), the TXP has been turned to a CRTC and encoder of its own, and while it does indeed register an encoder, it no longer has an associated pixelvalve. The code will thus run over the TXP encoder and set a bogus possible_crtcs mask, overriding the one set in the TXP bind function. In order to fix this, let's skip any virtual encoder. Cc: # v5.9+ Fixes: 39fcb2808376 ("drm/vc4: txp: Turn the TXP into a CRTC of its own") Acked-by: Thomas Zimmermann Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c index 269390bc586e..f1f2e8cbce79 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c @@ -1018,6 +1018,9 @@ static void vc4_set_crtc_possible_masks(struct drm_device *drm, struct vc4_encoder *vc4_encoder; int i; + if (encoder->encoder_type == DRM_MODE_ENCODER_VIRTUAL) + continue; + vc4_encoder = to_vc4_encoder(encoder); for (i = 0; i < ARRAY_SIZE(pv_data->encoder_types); i++) { if (vc4_encoder->type == encoder_types[i]) { -- 2.31.1