Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp658278pxv; Thu, 15 Jul 2021 12:41:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAtsBdJ3aWXWHyWOCeZ+2B6+D1rhpDEygXr9C9eJc7/hJcxbDoWM4ntZl1PIhbxa6Ng2LO X-Received: by 2002:a17:906:d1d1:: with SMTP id bs17mr7182633ejb.492.1626378115002; Thu, 15 Jul 2021 12:41:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626378114; cv=none; d=google.com; s=arc-20160816; b=umKTHC0rxqnCdBhIvA+pEjpC6C27VC3eFjNMDbsAHDz8xxZWwbg8E7QXyLJKIs6//Y 22C+3xB4rOWvg30opfe1An2mUhf/zWlY90eySPmupVl8vO1BZgYuu/5CaFIWGGF/MHmt GLTtfgLjnHnn9ALusTzkECjZ60BthlHD24wzdM7rSb9puEdST8gD03BEZlHT+2ToYUdw LZAb3zgOuGTzg87JE7gVV1wNE3DXjzMOdfGeZbHfM5A1FUaIGnaCQpmsCSwGPWdk7Hqe pxTZ0PPK80TtGxyxuVrw2WAJVEr+8QKJXvYMzmSLmZF18RGmZYGDxitt5w+dm9liRNzX 9cjQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UHNiFzT4Dn49U4Un5ezB79YiTGWKZ5VP3iidwgPOSw8=; b=K8iHFezYhYjBViQxSI4dS8F1ut005VJH329CiwG+L5khrxXMjQbf/Z7Wpy/dm5XdR6 UdYGrxPD0VzslS82oDV1RtHGbhA8ClD84+viZ3LtRsNot3Dcl6KkJxNBEtWhaZhx3M8w IiWbC1k7c45zRPTioqonziux6kOMGsld6uPxudOl5C683SvnZ18TlcbV3DFQdD7bqvIM CtF8YDzqRuTx82Y3605qsVKr6vdaw3VkUle2F+UXQUAKy6FkmS31elDjODSCR8MEjw9f kD+pIBdC4fZzXRyxuvCUx9Iu6mvjc4auU/zkYrzcyS9YiV5NqdBG7CxJqdntIKPOlKP+ 1ITQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="fkR/tTbQ"; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i22si8068352ejh.547.2021.07.15.12.41.31; Thu, 15 Jul 2021 12:41:54 -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=@linuxfoundation.org header.s=korg header.b="fkR/tTbQ"; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343687AbhGOTlW (ORCPT + 99 others); Thu, 15 Jul 2021 15:41:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:51284 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244635AbhGOTO7 (ORCPT ); Thu, 15 Jul 2021 15:14:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2AFD5613F9; Thu, 15 Jul 2021 19:10:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626376257; bh=Eo8Jbmb8tL5W0zT3vAsE3KWlJekJz4W0Ag3DYmH9gQQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fkR/tTbQOT1QGjGVO4kY94P+ZghfhXwSCgjnwvmUimk6GzoqP4cujPWUfXGMPifzt QitrWL5Om6+RJ5XYKr6IHt0bwauL2FUMc32FQuxn9LSRWmmFhorRxDeo/hn+hVN0tP gi2dYlaaEXSfQ09IbFCBsMzhk2ImmQCzPdHMr88Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Zimmermann , Maxime Ripard Subject: [PATCH 5.13 193/266] drm/vc4: crtc: Skip the TXP Date: Thu, 15 Jul 2021 20:39:08 +0200 Message-Id: <20210715182644.854900682@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182613.933608881@linuxfoundation.org> References: <20210715182613.933608881@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Maxime Ripard commit 47a50743031ad4138050ae6d266ddd3dfe845ead upstream. 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 Link: https://patchwork.freedesktop.org/patch/msgid/20210507150515.257424-3-maxime@cerno.tech Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/vc4/vc4_crtc.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c @@ -1076,6 +1076,9 @@ static void vc4_set_crtc_possible_masks( 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]) {