From: "Timur Kristóf" <timur.kristof@gmail.com>
To: amd-gfx@lists.freedesktop.org,
Alex Deucher <alexander.deucher@amd.com>,
Tvrtko Ursulin <tursulin@ursulin.net>,
Natalie Vock <natalie.vock@gmx.de>, Melissa Wen <mwen@igalia.com>,
mario.limonciello@amd.com, alex.hung@amd.com,
harry.wentland@amd.com
Cc: "Timur Kristóf" <timur.kristof@gmail.com>
Subject: [PATCH 2/2] drm/amd/display: Check HDMI FRL support before creating polling workqueue
Date: Sat, 11 Jul 2026 13:30:09 +0200 [thread overview]
Message-ID: <20260711113009.26512-2-timur.kristof@gmail.com> (raw)
In-Reply-To: <20260711113009.26512-1-timur.kristof@gmail.com>
The workqueue is not necessary when FRL is not supported or
when it's disabled. Add a helper to tell when the current
board has any HDMI FRL capable connectors and call that
before creating the workqueue.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
---
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
drivers/gpu/drm/amd/display/dc/core/dc.c | 26 +++++++++++++++++++
drivers/gpu/drm/amd/display/dc/dc.h | 2 ++
3 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 6299f0e384f1..87d7b60ceb3f 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -827,7 +827,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
dc_init_callbacks(adev->dm.dc, &init_params);
}
- if (adev->dm.dc->caps.max_links > 0) {
+ if (dc_is_hdmi_frl_supported(adev->dm.dc)) {
adev->dm.hdmi_frl_status_polling_wq =
create_singlethread_workqueue("hdmi_frl_status_polling_wq");
if (!adev->dm.hdmi_frl_status_polling_wq)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 1b6627a92d24..1a7073abb8ba 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -6592,6 +6592,32 @@ void dc_mclk_switch_using_fw_based_vblank_stretch_shut_down(struct dc *dc)
dc->current_state->bw_ctx.bw.dcn.clk.fw_based_mclk_switching_shut_down = true;
}
+/**
+ * dc_is_hdmi_frl_supported() - Check HDMI FRL support
+ *
+ * @dc: [in] dc structure
+ *
+ * Return:
+ * True if the current board has any HDMI FRL capable connectors,
+ * False otherwise.
+ */
+bool dc_is_hdmi_frl_supported(struct dc *dc)
+{
+ int i;
+
+ if (!dc->config.enable_frl)
+ return false;
+
+ for (i = 0; i < dc->link_count; ++i) {
+ if (dc->links[i] &&
+ dc->links[i]->link_enc &&
+ dc->links[i]->link_enc->features.flags.bits.IS_HDMI_FRL_CAPABLE)
+ return true;
+ }
+
+ return false;
+}
+
/**
* dc_is_dmub_outbox_supported - Check if DMUB firmware support outbox notification
*
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
index 13c1f7cd9d7d..d27c7437ee7a 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -3056,6 +3056,8 @@ bool dc_set_ips_disable(struct dc *dc, unsigned int disable_ips);
void dc_z10_restore(const struct dc *dc);
void dc_z10_save_init(struct dc *dc);
+bool dc_is_hdmi_frl_supported(struct dc *dc);
+
bool dc_is_dmub_outbox_supported(struct dc *dc);
bool dc_enable_dmub_notifications(struct dc *dc);
--
2.55.0
next prev parent reply other threads:[~2026-07-11 11:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-11 11:30 [PATCH 1/2] drm/amd/display: Shorten name of FRL polling workqueue Timur Kristóf
2026-07-11 11:30 ` Timur Kristóf [this message]
2026-07-13 10:15 ` Tvrtko Ursulin
2026-07-13 13:33 ` Mario Limonciello
2026-07-14 8:51 ` Timur Kristóf
2026-07-14 9:56 ` Tvrtko Ursulin
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=20260711113009.26512-2-timur.kristof@gmail.com \
--to=timur.kristof@gmail.com \
--cc=alex.hung@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=mario.limonciello@amd.com \
--cc=mwen@igalia.com \
--cc=natalie.vock@gmx.de \
--cc=tursulin@ursulin.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.