Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp634604pxv; Thu, 15 Jul 2021 12:04:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlGy1Cwg+e58o9BmnR1OHK/MNBfhGN35kSiKFLJudg4s9SFnZNdvItAQRlgKTZCmxkK1nE X-Received: by 2002:a92:7f07:: with SMTP id a7mr3544393ild.202.1626375876093; Thu, 15 Jul 2021 12:04:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626375876; cv=none; d=google.com; s=arc-20160816; b=JcXPlkE/7tHLEohP2q2fH10oXXDlRnCbthDIrzZEyFx6hDNwIQlGSOmhoTfmg4VEtT UXhrqPEcJKBYwgqziOA5XFVwWweBwLhiYUxKA7/DJMdMaMaBy0RFphL6acE2QvbaYp6f /BtJakXBHzTuHxDP8qUtasBAv43YWCpU65/iBQyG9vM0KAQRElkzDEuoZeWD4uR/T+2d 6KDtoH/4b7mvABRxap+uodWlu0rfZfXpWjY1B/PqNpX6TH7GmOcUR7Fh2Kc9RdJMo8Lw kZisdl+E19E0lQJJ+ofhAkQNf2/82Yr2tXeIEv72CRRrPdClb6pjTJUzB3phgi9UKPhM u2cg== 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=r7FmE1En6HopWXd1BiI5zxd43xkBREbj/b9hZ5K3qm0=; b=eKkwua3skcHaLbY1fjhfmC7XBhKvaWGgNDB41wP5zSxCwSdV+LproIEhfpjqz7nJbb +NF6JUVggT0VRvLuekPSx45LcvlUtTnn8xd2cxYzvbqf2WJh8g+m7tGpPujWT/2w/x1c v08sg1eWOsXLUaKbMNSfMkPh4rm7XK9tSSBJx2T2JDxQ/ijODImdwYNCr8TvSL0DiicL 0mbd7/DWZ0pYJ+81TXeuMx/CuXVJVebS3BmsXRO+c3+muxfKKFfVlMDSPy4iUIgIbN0D VGatd7gV76rcUgE/sMl5uDb/fninH2mLMuhvEqx7wxWYRBmQaYxUxRvVMC+gVvOd8ExU cb8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=S7khkaJq; 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 x29si7656294jap.52.2021.07.15.12.04.23; Thu, 15 Jul 2021 12:04: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=S7khkaJq; 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 S241073AbhGOTFu (ORCPT + 99 others); Thu, 15 Jul 2021 15:05:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:60762 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241909AbhGOS4D (ORCPT ); Thu, 15 Jul 2021 14:56:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0C5C2613C4; Thu, 15 Jul 2021 18:53:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375188; bh=pJZwj/2qO08ARvSq+wP2r6Sdm1b7xs+2pt2ITJOuBXY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S7khkaJqDqaNJ/rVsE9aIS25AOqx3JuZws3XjGnrho6rsKq2isqkenu7YreYZBhS6 ZEQ4WZCwPYXTZ3RLhz7KV2lh4eNYnCsFp0GZwyYUZI15KKDMHjg5DUt1o3IXGLF6W4 9Wb1kamu4NlKcuDzv0Uc1pOsA9JSdlRPwTUL/6v8= 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.10 154/215] drm/vc4: crtc: Skip the TXP Date: Thu, 15 Jul 2021 20:38:46 +0200 Message-Id: <20210715182626.726856393@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182558.381078833@linuxfoundation.org> References: <20210715182558.381078833@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 @@ -1042,6 +1042,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]) {