From nobody Tue Oct 14 01:24:36 2025 Received: from out-178.mta0.migadu.com (out-178.mta0.migadu.com [91.218.175.178]) (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 117A41CAA63 for ; Sat, 29 Mar 2025 11:39:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743248388; cv=none; b=uuIVkCRe12P64UpI7hS7k86ZZVOxJ4FwKngii0fHzMKvbwCArIU/wBAePoNOEVtKrsmfP9iJf1ps2DCGWQ8Ct/tBUxcs8WT9Y+W2D1UeqhIRYWrkCfWUPwpuslHK1uwKKgAr7jLyI4fb1YAMgwrkn2sz43DdxChlRnx+SVmaV94= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743248388; c=relaxed/simple; bh=YKi8hBb20v+kVNc/kFoCwjQjQydfT/uSE7FTAI+bQCQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cHAx9N0hHKF2gdqsarN13aGcEPJD4DmuqXXtLDKeknT7TlgpzLk4ktU4sDGSpXuoGKR+gDG9EzCuQGtLjXg/yqy5rVgl9soh/3EvMI/7NJIX28BT+Lk605Dxf1lHbgukfmY2a6OzGIfzYzlZvJcJIFQrQjeixDV5GF0+aaPP9Xo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=HK9PY80h; arc=none smtp.client-ip=91.218.175.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="HK9PY80h" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1743248385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GsA1pQnRlR6l2x6bKdBI0zxehwHaTt8i7wNnjmPpXMo=; b=HK9PY80hlcRf+/+QHcyfYvY2bAQXNx1M2TMRyAS64ywg6Y3GaaYgQDbxVEnrp/zomC1bo3 JIwtYnpS+64EMpReMnRXCUv800yJqHMEF5WYXTQyQM8x0pAJxgki3t/IIX72u+msotrhMB zKG6xXjSFliqecNk1Vv7o8uJXh6osx0= From: Aradhya Bhatia To: Tomi Valkeinen , Dmitry Baryshkov , Laurent Pinchart , Andrzej Hajda , Neil Armstrong , Robert Foss , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: Nishanth Menon , Vignesh Raghavendra , Devarsh Thakkar , Praneeth Bajjuri , Udit Kumar , Jayesh Choudhary , Alexander Sverdlin , Dominik Haller , DRI Development List , Linux Kernel List , Aradhya Bhatia , stable@vger.kernel.org Subject: [PATCH v11 02/14] drm/bridge: cdns-dsi: Fix phy de-init and flag it so Date: Sat, 29 Mar 2025 17:09:13 +0530 Message-Id: <20250329113925.68204-3-aradhya.bhatia@linux.dev> In-Reply-To: <20250329113925.68204-1-aradhya.bhatia@linux.dev> References: <20250329113925.68204-1-aradhya.bhatia@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" From: Aradhya Bhatia 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 --- drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c b/drivers/gpu/d= rm/bridge/cadence/cdns-dsi-core.c index 1cfe17865b06..3b15528713fe 100644 --- a/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c +++ b/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c @@ -683,6 +683,11 @@ static void cdns_dsi_bridge_atomic_post_disable(struct= drm_bridge *bridge, struct cdns_dsi_input *input =3D bridge_to_cdns_dsi_input(bridge); struct cdns_dsi *dsi =3D input_to_dsi(input); =20 + dsi->phy_initialized =3D false; + dsi->link_initialized =3D false; + phy_power_off(dsi->dphy); + phy_exit(dsi->dphy); + pm_runtime_put(dsi->base.dev); } =20 @@ -1166,7 +1171,6 @@ static int __maybe_unused cdns_dsi_suspend(struct dev= ice *dev) clk_disable_unprepare(dsi->dsi_sys_clk); clk_disable_unprepare(dsi->dsi_p_clk); reset_control_assert(dsi->dsi_p_rst); - dsi->link_initialized =3D false; return 0; } =20 --=20 2.34.1