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 82DBF2EE288; Tue, 15 Jul 2025 13:54:28 +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=1752587668; cv=none; b=NqhgjbPETUIkrdVefA2EpZefJdDwMEcr676WHtTkC18iOcUqYigW7JsGKtLmsLNzMSkmtGT8xzDTFDW2eY9sROi58Hfv+kQnURJbIX0j4QPUTK7aJbLZ9S4tjn3v9h9uTCNJwcWp7SHTLAgH+NRSYeysXies2qRPPRM/SeEfcXo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752587668; c=relaxed/simple; bh=Aw2is9KBur5/lrusqwhgzjT/3sqM7eJoSMgchFJTacs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JdIX8wZWy7KlNsK0afeZzRoxHFEc70xNLorH96qcRTpM21sGDFtfKsXcsFhMnvqvKtO6yucRpECuGkqQw/u+TgCt8MaGTtRgnznB4NcmzEuWL3Wqa3njVI03M0qqvuKqQCS6sJJDPEXc9R+qA6GFWzB/K3DcT/BYxSntrUayvaY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=t9WZwMg5; 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="t9WZwMg5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16870C4CEE3; Tue, 15 Jul 2025 13:54:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1752587668; bh=Aw2is9KBur5/lrusqwhgzjT/3sqM7eJoSMgchFJTacs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t9WZwMg5hIHJzI2GwjYKeX0Ba+hhGDxoGfgS6AlOd0NNIavsHGfLtvvFfqUg/k9ZO aqT858hW1NtuFHGXUaAJBOEfopdFBl6Jo5wLVNsmpQwutTUaKBar2TgpZpfyrlPuiB aTI6iAzVUYHMASwSpEjIj99iAwUzE3jfRxbubliY= 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 5.10 067/208] drm/bridge: cdns-dsi: Fix the clock variable for mode_valid() Date: Tue, 15 Jul 2025 15:12:56 +0200 Message-ID: <20250715130813.636611490@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250715130810.830580412@linuxfoundation.org> References: <20250715130810.830580412@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 5.10-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 @@ -608,13 +608,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);