From nobody Mon Feb 9 17:56:43 2026 Received: from out-186.mta0.migadu.com (out-186.mta0.migadu.com [91.218.175.186]) (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 A27D2175D4F for ; Sun, 26 Jan 2025 19:16:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.186 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737918987; cv=none; b=GPXTkXx2PO+nfiblw9VFyjeb3zb0H+abBG15XD7Y060mIYaiRGcx+p04SRkK6seoRLrr/zs/l5xT/6/4wiHifSKyY4T0+DUIrvV3GMrZTd3sJRr0kBqrSgztGV4ghdNeUImyT9QPVTOKXkuFpJdbUzTDL2F/4APb6IES9JkZ2Yw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737918987; c=relaxed/simple; bh=hPHcB4dKWUzFtW6o7dJU7ENTugLBqBWL9XKh6PQpa2s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UhWv+GnNep8pniSv4kmsauLle4+4mrFGIyQ07MWbNlmdGG1vdNWlUxDNfCK+GYNUw0uIGrNwpKPLJ6s7hoKqonksrOa+urB9F0XllZOpn+EksBnC6s2oMFgw9v24ISp32JmuEWH27Ktf2882MMmMfEgHaxt3UzT8yQwD1JYGvcM= 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=ItEduPE4; arc=none smtp.client-ip=91.218.175.186 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="ItEduPE4" 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=1737918978; 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=SVQl+/Q/FRo9O752Ko3yMLZpaSxtIIZ7yHyHN2KPnws=; b=ItEduPE4jLQ7A1R5Ofr7aJr1zOTJe1BmDVZ/bLOWfLufHVniPaDR4tnC2JaOWtFt/Gd0sW khcCZiaGuu6l6IU+HM1b4fFqCvLsIea/eH88qFNMx+hwRu4QmVGFQYw7uH1ZIk9TEzC8C9 KumZNmyLcIi0kFigma/gmN50LcW+k6Y= 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 , DRI Development List , Linux Kernel List , Aradhya Bhatia , Stable List Subject: [PATCH v8 02/13] drm/bridge: cdns-dsi: Fix phy de-init and flag it so Date: Mon, 27 Jan 2025 00:45:40 +0530 Message-Id: <20250126191551.741957-3-aradhya.bhatia@linux.dev> In-Reply-To: <20250126191551.741957-1-aradhya.bhatia@linux.dev> References: <20250126191551.741957-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 List Signed-off-by: Aradhya Bhatia Signed-off-by: Aradhya Bhatia Reviewed-by: Dmitry Baryshkov Reviewed-by: Tomi Valkeinen --- 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 2f897ea5e80a..b0a1a6774ea6 100644 --- a/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c +++ b/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c @@ -680,6 +680,11 @@ static void cdns_dsi_bridge_post_disable(struct drm_br= idge *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 @@ -1152,7 +1157,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