From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 69B962EF285; Thu, 3 Jul 2025 15:23:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751556206; cv=none; b=KSsljrIiKpDU/BXLdmXbt5rESRKpkzEIOiJcXaxc/P92cGjiLvEnXlko0NoCWOlxv918Yy429+2coUSyz5qKYgMiZtdGDlz2lrEduyAasu3gn1G4+5LZ+WkpLDb0q1Mlp9pVCRZMmIgc1vgXxdTcuLTP1/atzc2q0aYhWYWyqP4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751556206; c=relaxed/simple; bh=OIzitvXx9cdGNV6K4G127XTCrraY/uwgFrSETti6+qg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UZFRBuamWyBT21PA1wU3AMcgSHZbsl37phuPTpEWUSkfrsuArvNtG046QqydRgmL6FSnK3Z82wO9OglvKQ0X+DSyzR6nfgaGzw6Fpx+iGDmcS4Nrz/Dw+nFwCMEtEsw9DAcsiktBoRtLXFp0I0kRD6tIM4isfk5CIyoEC1PZePk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WwbvzG6z; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="WwbvzG6z" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7639BC4CEE3; Thu, 3 Jul 2025 15:23:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1751556205; bh=OIzitvXx9cdGNV6K4G127XTCrraY/uwgFrSETti6+qg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WwbvzG6zbVTdLxKl0uTrlZWQc8fqo9LDUNAxPSEpIMKoh0Yf0v7razitkEZMM0m8S iKttY4t9xstVGi6ZLDAMJcYIebvLC/2kh5Duq5nAS26cpNC2r69sob0CNgKs8X3LxP RO46GPI/1aDKY2gbowkzNxY/GDPN8mQdPpj3+5lo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Tomi Valkeinen , Dmitry Baryshkov , Aradhya Bhatia , Aradhya Bhatia , Dmitry Baryshkov Subject: [PATCH 6.1 108/132] drm/bridge: cdns-dsi: Fix the clock variable for mode_valid() Date: Thu, 3 Jul 2025 16:43:17 +0200 Message-ID: <20250703143943.628341161@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250703143939.370927276@linuxfoundation.org> References: <20250703143939.370927276@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Aradhya Bhatia commit 132bdcec399be6ae947582249a134b38cf56731c upstream. The crtc_* mode parameters do not get generated (duplicated in this case) from the regular parameters before the mode validation phase begins. The rest of the code conditionally uses the crtc_* parameters only during the bridge enable phase, but sticks to the regular parameters for mode validation. In this singular instance, however, the driver tries to use the crtc_clock parameter even during the mode validation, causing the validation to fail. Allow the D-Phy config checks to use mode->clock instead of mode->crtc_clock during mode_valid checks, like everywhere else in the driver. Fixes: fced5a364dee ("drm/bridge: cdns: Convert to phy framework") Cc: stable@vger.kernel.org Reviewed-by: Tomi Valkeinen Reviewed-by: Dmitry Baryshkov Tested-by: Tomi Valkeinen Signed-off-by: Aradhya Bhatia Signed-off-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20250329113925.68204-4-aradhya.bhatia@linux.dev Signed-off-by: Dmitry Baryshkov Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/bridge/cdns-dsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/bridge/cdns-dsi.c +++ b/drivers/gpu/drm/bridge/cdns-dsi.c @@ -609,13 +609,14 @@ static int cdns_dsi_check_conf(struct cd struct phy_configure_opts_mipi_dphy *phy_cfg = &output->phy_opts.mipi_dphy; unsigned long dsi_hss_hsa_hse_hbp; unsigned int nlanes = output->dev->lanes; + int mode_clock = (mode_valid_check ? mode->clock : mode->crtc_clock); int ret; ret = cdns_dsi_mode2cfg(dsi, mode, dsi_cfg, mode_valid_check); if (ret) return ret; - phy_mipi_dphy_get_default_config(mode->crtc_clock * 1000, + phy_mipi_dphy_get_default_config(mode_clock * 1000, mipi_dsi_pixel_format_to_bpp(output->dev->format), nlanes, phy_cfg);