From: Jonas Karlman <jonas@kwiboo.se>
To: Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Heiko Stuebner <heiko@sntech.de>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Robert Foss <rfoss@kernel.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Luca Ceresoli <luca.ceresoli@bootlin.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
dri-devel@lists.freedesktop.org,
linux-amlogic@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org
Subject: [PATCH 11/13] drm/bridge: dw-hdmi: Export dw_hdmi_schedule_hpd_work() helper
Date: Mon, 18 May 2026 19:47:39 +0000 [thread overview]
Message-ID: <20260518194744.2483580-12-jonas@kwiboo.se> (raw)
In-Reply-To: <20260518194744.2483580-1-jonas@kwiboo.se>
Export a dw_hdmi_schedule_hpd_work() helper that schedule the HPD
delayed work. Primarily to be used by the meson dw-hdmi driver.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 11 +++++++++--
include/drm/bridge/dw_hdmi.h | 2 ++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index 99dd62b6becf..54d75317ce9c 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -3014,8 +3014,7 @@ static irqreturn_t dw_hdmi_hardirq(int irq, void *dev_id)
status == connector_status_connected ?
"plugin" : "plugout");
- mod_delayed_work(system_percpu_wq, &hdmi->hpd_work,
- msecs_to_jiffies(HOTPLUG_DEBOUNCE_MS));
+ dw_hdmi_schedule_hpd_work(hdmi);
hdmi_writeb(hdmi, intr_stat, HDMI_IH_PHY_STAT0);
hdmi_writeb(hdmi, ~HDMI_IH_PHY_STAT0_HPD, HDMI_IH_MUTE_PHY_STAT0);
@@ -3025,6 +3024,14 @@ static irqreturn_t dw_hdmi_hardirq(int irq, void *dev_id)
return ret;
}
+void dw_hdmi_schedule_hpd_work(struct dw_hdmi *hdmi)
+{
+ if (!IS_ERR_OR_NULL(hdmi))
+ mod_delayed_work(system_percpu_wq, &hdmi->hpd_work,
+ msecs_to_jiffies(HOTPLUG_DEBOUNCE_MS));
+}
+EXPORT_SYMBOL_GPL(dw_hdmi_schedule_hpd_work);
+
static void dw_hdmi_hpd_work(struct work_struct *work)
{
struct dw_hdmi *hdmi = container_of(work, struct dw_hdmi, hpd_work.work);
diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h
index 10013b8d3adb..c56d1775f04a 100644
--- a/include/drm/bridge/dw_hdmi.h
+++ b/include/drm/bridge/dw_hdmi.h
@@ -184,6 +184,8 @@ struct dw_hdmi *dw_hdmi_bind(struct platform_device *pdev,
void dw_hdmi_resume(struct dw_hdmi *hdmi);
+void dw_hdmi_schedule_hpd_work(struct dw_hdmi *hdmi);
+
int dw_hdmi_set_plugged_cb(struct dw_hdmi *hdmi, hdmi_codec_plugged_cb fn,
struct device *codec_dev);
void dw_hdmi_set_sample_non_pcm(struct dw_hdmi *hdmi, unsigned int non_pcm);
--
2.54.0
next prev parent reply other threads:[~2026-05-18 19:49 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 19:47 [PATCH 00/13] drm/meson: dw-hdmi: Misc cleanup and use CEC notifier helpers Jonas Karlman
2026-05-18 19:47 ` [PATCH 01/13] drm/meson: dw-hdmi: Report connector status based on HPD bit Jonas Karlman
2026-05-19 7:23 ` Neil Armstrong
2026-05-18 19:47 ` [PATCH 02/13] drm/meson: dw-hdmi: Protect from possible NULL pointer dereference Jonas Karlman
2026-05-19 7:23 ` Neil Armstrong
2026-05-18 19:47 ` [PATCH 03/13] drm/meson: dw-hdmi: Call dw_hdmi_remove() consistently Jonas Karlman
2026-05-19 7:24 ` Neil Armstrong
2026-05-18 19:47 ` [PATCH 04/13] drm/meson: dw-hdmi: Drop call to drm_bridge_hpd_notify() Jonas Karlman
2026-05-19 7:25 ` Neil Armstrong
2026-05-18 19:47 ` [PATCH 05/13] drm/meson: encoder_hdmi: Use CEC phys addr from display_info Jonas Karlman
2026-05-19 6:36 ` Hans Verkuil
2026-05-19 7:27 ` Neil Armstrong
2026-05-18 19:47 ` [PATCH 06/13] drm/meson: encoder_hdmi: Use bridge connector CEC notifier Jonas Karlman
2026-05-19 6:38 ` Hans Verkuil
2026-05-19 7:30 ` Neil Armstrong
2026-05-18 19:47 ` [PATCH 07/13] drm/meson: encoder_hdmi: Report ycbcr_420_allowed from encoder Jonas Karlman
2026-05-19 7:31 ` Neil Armstrong
2026-05-18 19:47 ` [PATCH 08/13] drm/meson: dw-hdmi: Use local dev variable consistently in bind() Jonas Karlman
2026-05-19 7:33 ` Neil Armstrong
2026-05-18 19:47 ` [PATCH 09/13] drm/meson: dw-hdmi: Use devm_clk_get_enabled() helper Jonas Karlman
2026-05-19 7:33 ` Neil Armstrong
2026-05-18 19:47 ` [PATCH 10/13] drm/meson: dw-hdmi: Use dev_err_probe() to report errors Jonas Karlman
2026-05-19 7:34 ` Neil Armstrong
2026-05-18 19:47 ` Jonas Karlman [this message]
2026-05-18 19:47 ` [PATCH 12/13] drm/meson: dw-hdmi: Use dw_hdmi_schedule_hpd_work() helper Jonas Karlman
2026-05-18 19:47 ` [PATCH 13/13] drm/meson: dw-hdmi: Use suspend_late/resume_early/resume_noirq pm ops Jonas Karlman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260518194744.2483580-12-jonas@kwiboo.se \
--to=jonas@kwiboo.se \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=jbrunet@baylibre.com \
--cc=jernej.skrabec@gmail.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=luca.ceresoli@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=martin.blumenstingl@googlemail.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox