Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Hung <alex.hung@amd.com>
To: <igt-dev@lists.freedesktop.org>
Cc: <rodrigo.siqueira@amd.com>, <harry.wentland@amd.com>,
	<hersenxs.wu@amd.com>, Alex Hung <alex.hung@amd.com>
Subject: [PATCH 1/2] lib/amd: check output has hpd before trigger hotplug
Date: Wed, 20 Mar 2024 20:03:53 -0600	[thread overview]
Message-ID: <20240321020354.843729-1-alex.hung@amd.com> (raw)

With commit ff1d9a601 writeback connector will be enabled and it has no
hotplug capability. As a result, this function always fails for such
cases. This is fixed by checking HDP in advance.

Signed-off-by: Alex Hung <alex.hung@amd.com>
---
 lib/igt_amd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/igt_amd.c b/lib/igt_amd.c
index d0b53c08a..623883dbc 100644
--- a/lib/igt_amd.c
+++ b/lib/igt_amd.c
@@ -799,6 +799,9 @@ int igt_amd_trigger_hotplug(int drm_fd, char *connector_name)
         int wr_len;
         const char *enable_hpd = "1";
 
+	if (!igt_amd_output_has_hpd(drm_fd, connector_name))
+		return 0;
+
         fd = igt_debugfs_connector_dir(drm_fd, connector_name, O_RDONLY);
         igt_assert(fd >= 0);
         hpd_fd = openat(fd, DEBUGFS_HPD_TRIGGER, O_WRONLY);
-- 
2.34.1


             reply	other threads:[~2024-03-21  2:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-21  2:03 Alex Hung [this message]
2024-03-21  2:03 ` [PATCH 2/2] tests/amdgpu/amd_vrr_range: Skip on unsupported connector types Alex Hung
2024-03-21 13:59   ` Harry Wentland
2024-03-21  3:30 ` ✓ CI.xeBAT: success for series starting with [1/2] lib/amd: check output has hpd before trigger hotplug Patchwork
2024-03-21  3:42 ` ✓ Fi.CI.BAT: " Patchwork
2024-03-21 13:56 ` [PATCH 1/2] " Harry Wentland
2024-03-22  1:11 ` ✗ Fi.CI.IGT: failure for series starting with [1/2] " Patchwork
2024-03-22 11:10   ` Kamil Konieczny
2024-03-22  3:29 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] lib/amd: check output has hpd before trigger hotplug (rev2) Patchwork

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=20240321020354.843729-1-alex.hung@amd.com \
    --to=alex.hung@amd.com \
    --cc=harry.wentland@amd.com \
    --cc=hersenxs.wu@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=rodrigo.siqueira@amd.com \
    /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