Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp710280pxv; Thu, 15 Jul 2021 14:07:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9/SLkjBK0dZsSgHWPGENx5TXTzt7mimZoaKyaV6W9L0scagMhtT8Zgx/EMQ7CKHq1ntnA X-Received: by 2002:a17:906:4f02:: with SMTP id t2mr7596547eju.217.1626383256593; Thu, 15 Jul 2021 14:07:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626383256; cv=none; d=google.com; s=arc-20160816; b=kfTKnTBy3OdwA8LHyp0PCyMmN4XzFhdfe8Si3hb8ZBoKB6eg9LQrtfLItGr2AJs9mq fasv+UNXMJRjKxAhDnbG3CCuvB4EViqAt3zSInUsCSK+FPqP+gq73ddRevPb40zgB02g ETgvfvAozkTM78pS1/7LsaO+xaW0D4kUaFXw4fsCLriyafGZLTPmxGTeCggNf4LV2mvt mOuxoE9tjBBBEgKPF3PgOBjo2p6eQpPXQcUZZ2GnmtKz4Turt75sTDrTodn6F4dEsIKA ZqKDQMFqCRXuKiKaH9rn0QlatO3qQFGwuSMWBEAX7LsGGJG5OgBmZq4/4DAWANYvALbi ftKA== 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=faWxBruKcdmf+oRh4inthDZCwz/D8pUG63ggzQxd23lHlnCjs11lNJigK0yxAfGpln Vf1sdjWWIOEvFYh3wiH3I8iEriGARRbON0Fs+T6MqWvGIMMAB6DYsvxG35+I9gqp7/bN aGwWYnRo7hsCnErfj7pPJO1BLrmgCTmea04ZFa3wJkrr3UcxfP2qVSODeXqVLp7rNmla I+in8iPuvWTEsWt5A+3TY50ExYwIAb3Lo2kPhX2GWSDBaNtOPF4NPiJxftX9KwWVbrIC 6Gw31vhekUwo5PioyFk1zyXXJXmj4sz30AMrxS4JarMUg4czxtY6wL7dGFRIJfdKmhDH 4W+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QKsdVKz4; 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 r11si8135773eja.61.2021.07.15.14.07.11; Thu, 15 Jul 2021 14:07:36 -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=QKsdVKz4; 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 S245101AbhGOTTS (ORCPT + 99 others); Thu, 15 Jul 2021 15:19:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:38428 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243670AbhGOTEi (ORCPT ); Thu, 15 Jul 2021 15:04:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 65DE7613E9; Thu, 15 Jul 2021 19:00:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375628; bh=Eo8Jbmb8tL5W0zT3vAsE3KWlJekJz4W0Ag3DYmH9gQQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QKsdVKz44dg4J6oJqWmXhZ9tjDGEHhRKJ93BUCGxXYGc+/TfLAfScdlv8UfPJXZ8p Y9tBb2r4r3qQEQLj7dFVepRQSCKpctwZgGPEpgpXWyiDm/Y2VUsV7e88thkVWZ6aVe XCyBysGC+7izrOol15labCwVKrXsx2rHa97Nw0IQ= 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.12 169/242] drm/vc4: crtc: Skip the TXP Date: Thu, 15 Jul 2021 20:38:51 +0200 Message-Id: <20210715182622.996843908@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182551.731989182@linuxfoundation.org> References: <20210715182551.731989182@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]) {