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 2A4C62EE99C; Thu, 3 Jul 2025 14:52:48 +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=1751554368; cv=none; b=EK9JXML2hbEL/WRTKaHIjd74vYcdZLT2sl6hVJHIZ35fZDz1j8byLFg+EjKee5gMwMPHhCwcraj2ITxSUcL57tw0/gckBriippHmd8n74y9HNr01SNJEJuotzonvPbld8RjHeHunDFRd5IedNgfm4Fv/bqEK/FVjGdoFcMdUZN0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751554368; c=relaxed/simple; bh=g8JQYJmEEp689Azks5dHpOLLHvG2WKJk3+N+HSQhuzQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QfpqzuRBfgFijAb+hlZcCfPBTAgHJwxMmz07MuT1s1r7F/WUfPc0YF4Z7ekBYdtwbqOcgztyxW7noVBqKLLLlOePbGmK0qGz8z5b6uVfZaaJKkoKZz4LrXVyAhCWsVmA6wonUFF6pCQmImMIxWbRsi4GvNUoQ0wzr/D+7BD/AGc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VQxm81Yv; 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="VQxm81Yv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E97EC4CEE3; Thu, 3 Jul 2025 14:52:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1751554368; bh=g8JQYJmEEp689Azks5dHpOLLHvG2WKJk3+N+HSQhuzQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VQxm81YvfRmSY4Rf4NxNvBtzODkEHsmT6hxu8U/0K6l0R/t5RFjx6U2LYqSZwPNQt Lk6DOAtmJGTnvTCtcXocyNVA9XdjPFECYShK+wmUGW+gydsUixZSzy/pi9clQroiP6 wWEGXgc1xc1V3bDntbPzkdMrYXLrk1O/YWxj++Sk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Dmitry Baryshkov , Tomi Valkeinen , Aradhya Bhatia , Aradhya Bhatia , Dmitry Baryshkov Subject: [PATCH 6.12 157/218] drm/bridge: cdns-dsi: Fix phy de-init and flag it so Date: Thu, 3 Jul 2025 16:41:45 +0200 Message-ID: <20250703144002.428082137@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250703143955.956569535@linuxfoundation.org> References: <20250703143955.956569535@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.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Aradhya Bhatia commit fd2611c13f69cbbc6b81d9fc7502abf4f7031d21 upstream. The driver code doesn't have a Phy de-initialization path as yet, and so it does not clear the phy_initialized flag while suspending. This is a problem because after resume the driver looks at this flag to determine if a Phy re-initialization is required or not. It is in fact required because the hardware is resuming from a suspend, but the driver does not carry out any re-initialization causing the D-Phy to not work at all. Call the counterparts of phy_init() and phy_power_on(), that are phy_exit() and phy_power_off(), from _bridge_post_disable(), and clear the flags so that the Phy can be initialized again when required. Fixes: fced5a364dee ("drm/bridge: cdns: Convert to phy framework") Cc: stable@vger.kernel.org Reviewed-by: Dmitry Baryshkov Reviewed-by: Tomi Valkeinen Tested-by: Tomi Valkeinen Signed-off-by: Aradhya Bhatia Signed-off-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20250329113925.68204-3-aradhya.bhatia@linux.dev Signed-off-by: Dmitry Baryshkov Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c +++ b/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c @@ -681,6 +681,11 @@ static void cdns_dsi_bridge_post_disable struct cdns_dsi_input *input = bridge_to_cdns_dsi_input(bridge); struct cdns_dsi *dsi = input_to_dsi(input); + dsi->phy_initialized = false; + dsi->link_initialized = false; + phy_power_off(dsi->dphy); + phy_exit(dsi->dphy); + pm_runtime_put(dsi->base.dev); } @@ -1153,7 +1158,6 @@ static int __maybe_unused cdns_dsi_suspe clk_disable_unprepare(dsi->dsi_sys_clk); clk_disable_unprepare(dsi->dsi_p_clk); reset_control_assert(dsi->dsi_p_rst); - dsi->link_initialized = false; return 0; }