From nobody Thu Dec 18 21:11:41 2025 Received: from out-185.mta0.migadu.com (out-185.mta0.migadu.com [91.218.175.185]) (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 92CBB23A0FF for ; Tue, 14 Jan 2025 05:57:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.185 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736834222; cv=none; b=GW82zMmZZuUd/KL+2MfMt2328Ii0V976OeXRj/Mep97zzKcleOLVUan8VEN9mvO9cRZYr5X94uMxIDggbH/BF6w3D8ZLbZCA5HHT6fINRpadZErXZoohFP7CsI92IcqODTFGw40ZbycLooUjizh1iOcRICbJYNLzMeOxk8d4L+Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736834222; c=relaxed/simple; bh=OWR1y5UbXd+nIZWVNGuKG43ji/uY+F9GCelktxkYqqI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=u6Eazs+K9pu5RZJ2ro5HEHgTNKGiOBQLnxNYkb4b2y+OYML3MNE7NrfISHZuxOXhR18a+xxC7YZG9rnyTCdiKeYVSerJkAoE7j2HX2kCmX0kHaYWOOsbVGDlIx/UYediUWl5HjXLGdPSpxYij/KIv2A/Mn5OcFiXiVqSWbLrJBw= 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=IxmezzX4; arc=none smtp.client-ip=91.218.175.185 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="IxmezzX4" 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=1736834218; 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=UH2zGmcA5HXp21+So6ChmmD6SFUtGHmJj7f4jX4RLU4=; b=IxmezzX4XGWW0CG796RKhKRF/gOG2OVLgtc0CJK3NaKT6XdKqaRic0z8OAHmR9CyMUQrfQ JJ7YgoKdqYwdVS5D+wxTZ/dH/hDLv+LCbVsTd0QZ+fBFBeYOKHXuOZaIz04CdxMqC729km F2A6XjVynMQYknqUm30qdH5+P2ynDOc= 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 Subject: [PATCH v7 03/12] drm/bridge: cdns-dsi: Fix phy de-init and flag it so Date: Tue, 14 Jan 2025 11:26:17 +0530 Message-Id: <20250114055626.18816-4-aradhya.bhatia@linux.dev> In-Reply-To: <20250114055626.18816-1-aradhya.bhatia@linux.dev> References: <20250114055626.18816-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_disable(), and clear the flags so that the Phy can be initialized again when required. Fixes: fced5a364dee ("drm/bridge: cdns: Convert to phy framework") 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 056583e81155..039c5eb7fb66 100644 --- a/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c +++ b/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c @@ -672,6 +672,11 @@ static void cdns_dsi_bridge_disable(struct drm_bridge = *bridge) if (dsi->platform_ops && dsi->platform_ops->disable) dsi->platform_ops->disable(dsi); =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 @@ -1130,7 +1135,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