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 E9D4115442C; Thu, 3 Jul 2025 15:07:08 +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=1751555229; cv=none; b=duXMixY867XNMQyWqrZLkKyqNOyZs8kwMLS1AZKsN1c0cE0ZyKhLctyGdSkz9lUYuymgR/FU+/doI+jZZkbg4Y5UAraiCrtpnH5fBMVVKilp0lXNo7oyX7ih1RPPOLbn91YCeF9rq9Ou+rgwQ0O3/Z2CovoD7o4w/RbaJIp1yrk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751555229; c=relaxed/simple; bh=ajumfJV/mQRSGZTH+Z3lwWtvR6mtJ9WGs+4C0GmPCqo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Oot4K0m0c6nDoTqKSoHudW/TGv/vqqRjo2N9Gs8JfWC9BXwA8QIwcxWfKeha+XaIMNrpIMIis6nbwejr97FRMCIzMJBleI1iiYQzNhh/LILxN4EBcXgq2YxgsfKAcSeBgKcFyfPAe/MjCobNdYBOD43JVFpttJdnUdvbKBGdQcc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=HqQfI4av; 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="HqQfI4av" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E9B4C4CEE3; Thu, 3 Jul 2025 15:07:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1751555228; bh=ajumfJV/mQRSGZTH+Z3lwWtvR6mtJ9WGs+4C0GmPCqo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HqQfI4avDUlyWv8bNrxfY3zsrlfJzmdnLGdCNRpz1HstHn9GTHcX9GymLLjY2EBlp GYnSlV4UiPtmGw1XTp4ePkj+ykDLp42Ko2KwjD9sugcZqdgGt7Lw3h6QBajARExFI4 Pll8lGNIOxqQDX8C9IQriSLtOE9Gk/8OFraC22tk= 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.15 215/263] drm/bridge: cdns-dsi: Fix phy de-init and flag it so Date: Thu, 3 Jul 2025 16:42:15 +0200 Message-ID: <20250703144013.008043425@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250703144004.276210867@linuxfoundation.org> References: <20250703144004.276210867@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.15-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; }