[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_NfkTC0tST=VorQLM0RysNuaW9Hyb8EQS7gYUUecYXvVw@mail.gmail.com>
Date: Thu, 4 Dec 2025 08:49:36 -0500
From: Alex Deucher <alexdeucher@...il.com>
To: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Dave Airlie <airlied@...hat.com>, Alex Deucher <alexander.deucher@....com>,
Ivan Lipski <ivan.lipski@....com>, DRI <dri-devel@...ts.freedesktop.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: linux-next: build failure after merge of the drm tree
On Wed, Dec 3, 2025 at 11:24 PM Stephen Rothwell <sfr@...b.auug.org.au> wrote:
>
> Hi all,
>
> After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
>
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4026:13: error: redefinition of 'are_sinks_equal'
> 4026 | static bool are_sinks_equal(const struct dc_sink *sink1, const struct dc_sink *sink2)
> | ^~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3935:13: note: previous definition of 'are_sinks_equal' with type 'bool(const struct dc_sink *, const struct dc_sink *)' {aka '_Bool(const struct dc_sink *, const struct dc_sink *)'}
> 3935 | static bool are_sinks_equal(const struct dc_sink *sink1, const struct dc_sink *sink2)
> | ^~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4058:13: error: redefinition of 'hdmi_hpd_debounce_work'
> 4058 | static void hdmi_hpd_debounce_work(struct work_struct *work)
> | ^~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3967:13: note: previous definition of 'hdmi_hpd_debounce_work' with type 'void(struct work_struct *)'
> 3967 | static void hdmi_hpd_debounce_work(struct work_struct *work)
> | ^~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3967:13: error: 'hdmi_hpd_debounce_work' defined but not used [-Werror=unused-function]
> cc1: all warnings being treated as errors
>
> Caused by commit
>
> c918e75e1ed9 ("drm/amd/display: Add an HPD filter for HDMI")
>
> merging badly with commit
>
> c97da4785b3b ("drm/amd/display: Add an HPD filter for HDMI")
>
> from Linus' tree :-(
>
> I have applied the following merge fix patch for tosay.
The resolution is correct.
Thanks,
Alex
>
> From 1be223e7e9978a416cbdb835ea283da95abf7b58 Mon Sep 17 00:00:00 2001
> From: Stephen Rothwell <sfr@...b.auug.org.au>
> Date: Thu, 4 Dec 2025 14:43:35 +1100
> Subject: [PATCH] fix up for duplicate commit "drm/amd/display: Add an HPD
> filter for HDMI"
>
> merging badly
>
> Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
> ---
> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 91 -------------------
> 1 file changed, 91 deletions(-)
>
> 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 8b43d49dffcd..740711ac1037 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -3949,97 +3949,6 @@ static bool are_sinks_equal(const struct dc_sink *sink1, const struct dc_sink *s
> }
>
>
> -/**
> - * DOC: hdmi_hpd_debounce_work
> - *
> - * HDMI HPD debounce delay in milliseconds. When an HDMI display toggles HPD
> - * (such as during power save transitions), this delay determines how long to
> - * wait before processing the HPD event. This allows distinguishing between a
> - * physical unplug (>hdmi_hpd_debounce_delay)
> - * and a spontaneous RX HPD toggle (<hdmi_hpd_debounce_delay).
> - *
> - * If the toggle is less than this delay, the driver compares sink capabilities
> - * and permits a hotplug event if they changed.
> - *
> - * The default value of 1500ms was chosen based on experimental testing with
> - * various monitors that exhibit spontaneous HPD toggling behavior.
> - */
> -static void hdmi_hpd_debounce_work(struct work_struct *work)
> -{
> - struct amdgpu_dm_connector *aconnector =
> - container_of(to_delayed_work(work), struct amdgpu_dm_connector,
> - hdmi_hpd_debounce_work);
> - struct drm_connector *connector = &aconnector->base;
> - struct drm_device *dev = connector->dev;
> - struct amdgpu_device *adev = drm_to_adev(dev);
> - struct dc *dc = aconnector->dc_link->ctx->dc;
> - bool fake_reconnect = false;
> - bool reallow_idle = false;
> - bool ret = false;
> - guard(mutex)(&aconnector->hpd_lock);
> -
> - /* Re-detect the display */
> - scoped_guard(mutex, &adev->dm.dc_lock) {
> - if (dc->caps.ips_support && dc->ctx->dmub_srv->idle_allowed) {
> - dc_allow_idle_optimizations(dc, false);
> - reallow_idle = true;
> - }
> - ret = dc_link_detect(aconnector->dc_link, DETECT_REASON_HPD);
> - }
> -
> - if (ret) {
> - /* Apply workaround delay for certain panels */
> - apply_delay_after_dpcd_poweroff(adev, aconnector->dc_sink);
> - /* Compare sinks to determine if this was a spontaneous HPD toggle */
> - if (are_sinks_equal(aconnector->dc_link->local_sink, aconnector->hdmi_prev_sink)) {
> - /*
> - * Sinks match - this was a spontaneous HDMI HPD toggle.
> - */
> - drm_dbg_kms(dev, "HDMI HPD: Sink unchanged after debounce, internal re-enable\n");
> - fake_reconnect = true;
> - }
> -
> - /* Update connector state */
> - amdgpu_dm_update_connector_after_detect(aconnector);
> -
> - drm_modeset_lock_all(dev);
> - dm_restore_drm_connector_state(dev, connector);
> - drm_modeset_unlock_all(dev);
> -
> - /* Only notify OS if sink actually changed */
> - if (!fake_reconnect && aconnector->base.force == DRM_FORCE_UNSPECIFIED)
> - drm_kms_helper_hotplug_event(dev);
> - }
> -
> - /* Release the cached sink reference */
> - if (aconnector->hdmi_prev_sink) {
> - dc_sink_release(aconnector->hdmi_prev_sink);
> - aconnector->hdmi_prev_sink = NULL;
> - }
> -
> - scoped_guard(mutex, &adev->dm.dc_lock) {
> - if (reallow_idle && dc->caps.ips_support)
> - dc_allow_idle_optimizations(dc, true);
> - }
> -}
> -
> -static bool are_sinks_equal(const struct dc_sink *sink1, const struct dc_sink *sink2)
> -{
> - if (!sink1 || !sink2)
> - return false;
> - if (sink1->sink_signal != sink2->sink_signal)
> - return false;
> -
> - if (sink1->dc_edid.length != sink2->dc_edid.length)
> - return false;
> -
> - if (memcmp(sink1->dc_edid.raw_edid, sink2->dc_edid.raw_edid,
> - sink1->dc_edid.length) != 0)
> - return false;
> - return true;
> -}
> -
> -
> /**
> * DOC: hdmi_hpd_debounce_work
> *
> --
> 2.52.0
>
> --
> Cheers,
> Stephen Rothwell
Powered by blists - more mailing lists