From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-m32108.qiye.163.com (mail-m32108.qiye.163.com [220.197.32.108]) (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 B59A4471268; Mon, 28 Sep 2026 08:20:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=220.197.32.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790583638; cv=none; b=uuYhNC6ai8d75Uhq9km4gC122xQbV0vwshxBair5HB3D7kHbFDh5ay6lCHVITPRqkjasSoeMZ24FuOXBjPagwHBE/XszYhxhskLMuCtTtyVM7ehkScwY/aT73bKoVyVE040C2cb+fniqc6xb+fuwhaAZ1tid/nxd4wiRSNgiNHI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790583638; c=relaxed/simple; bh=7494V5Z64wNDTN9W3AWBrDv1Gn+fLADTbuWDlAVShc0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=I9YDn/pkaFNK7c2ymAFXNnod8qHc0ZC6e9UnuxPBevpkJlSzl6uPAoBGV+RdyHw+NIG7CddQzqkwP928+FJ5XnnFpDJOukj5nNq6B3roJZEqUCFktkO4gNZRLC9UOBtOgC7MUz6/vyg7bA3KmKqG1WgT9J43SPmmNGECGDlStuA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rock-chips.com; spf=pass smtp.mailfrom=rock-chips.com; dkim=pass (1024-bit key) header.d=rock-chips.com header.i=@rock-chips.com header.b=cq1J3ON0; arc=none smtp.client-ip=220.197.32.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rock-chips.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rock-chips.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=rock-chips.com header.i=@rock-chips.com header.b="cq1J3ON0" Received: from zyb-HP-ProDesk-680-G2-MT.. (unknown [61.154.14.86]) by smtp.qiye.163.com (Hmail) with ESMTP id 4f5398e98; Mon, 28 Sep 2026 16:15:12 +0800 (GMT+08:00) From: Damon Ding To: Andrzej Hajda , Neil Armstrong , Robert Foss , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jingoo Han , Inki Dae , Seung-Woo Kim , Kyungmin Park , Krzysztof Kozlowski , Peter Griffin , Alim Akhtar , Heiko Stuebner Cc: Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , Dmitry Baryshkov , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, Damon Ding Subject: [PATCH v3 09/14] drm/bridge: analogix_dp: Move IRQ enable/disable to bind/unbind Date: Mon, 28 Sep 2026 16:14:13 +0800 Message-Id: <20260928081418.3605775-10-damon.ding@rock-chips.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260928081418.3605775-1-damon.ding@rock-chips.com> References: <20260928081418.3605775-1-damon.ding@rock-chips.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Tid: 0aa0e71511ae03a8kunm323e2b5437cf5f X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVkZHk9JVklJT09KGR0YSx5DGVYVFA kWGhdVEwETFhoSFyQUDg9ZV1kYEgtZQVlNSlVKTk9VSk9VQ01ZV1kWGg8SFR0UWUFZT0tIVUpLSU 9PT0hVSktLVUpCS0tZBg++ DKIM-Signature: a=rsa-sha256; b=cq1J3ON0w2jXTb6eUGkXRxB5eKA2oZB6WI7TiCqF7FOgHPi354Va2LVOINBJW6NqZjw3DZ456uKwQhxCS0yFuN5xl/ZApPKGU9UXycRPETLXWrWpiLLAPKDct3kfifQdTKorK5B/TC0gfMOA8CSsEDOghhJSBnBs98VFGk8swxI=; s=default; c=relaxed/relaxed; d=rock-chips.com; v=1; bh=D/lHAE8K+D//L4haZOWeiYaNkQTqRHgCli2IR0i6wc4=; h=date:mime-version:subject:message-id:from; Move enable_irq()/disable_irq() from bridge enable/disable handlers into analogix_dp_bind()/analogix_dp_unbind(). This keeps the IRQ active throughout the device lifecycle rather than only during display activity, which is a prerequisite for supporting HPD detection while the display pipeline is inactive. This is safe because the HPD interrupt sources are now managed explicitly: - Native HPD interrupt generation depends on the controller's power domain and clock. When runtime PM has suspended the device, the controller cannot produce interrupts, so the hardirq is never entered on an unpowered device. - For GPIO HPD mode, the native HPD interrupts are muted in analogix_dp_config_interrupt(), and the hardirq reads only the GPIO line via gpiod_get_value(), which is safe while the controller is suspended. Signed-off-by: Damon Ding --- Changes in v3: - Move this patch after mute/unmute related modification and detail the commit msg. --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index b92d28546192..addd319719de 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1018,7 +1018,6 @@ static int analogix_dp_set_bridge(struct analogix_dp_device *dp) goto out_dp_init; } - enable_irq(dp->irq); return 0; out_dp_init: @@ -1160,8 +1159,6 @@ static void analogix_dp_bridge_disable(struct drm_bridge *bridge) if (dp->dpms_mode != DRM_MODE_DPMS_ON) return; - disable_irq(dp->irq); - analogix_dp_set_analog_power_down(dp, POWER_ALL, 1); pm_runtime_put_sync(dp->dev); @@ -1574,6 +1571,8 @@ int analogix_dp_bind(struct analogix_dp_device *dp, struct drm_device *drm_dev) goto err_unregister_aux; } + enable_irq(dp->irq); + return 0; err_unregister_aux: @@ -1585,6 +1584,7 @@ EXPORT_SYMBOL_GPL(analogix_dp_bind); void analogix_dp_unbind(struct analogix_dp_device *dp) { + disable_irq(dp->irq); drm_dp_aux_unregister(&dp->aux); } EXPORT_SYMBOL_GPL(analogix_dp_unbind); -- 2.34.1