From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org, swati2.sharma@intel.com
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Subject: [i-g-t V3 4/4] lib/igt_kms: Reset spurious hpd to default on exit
Date: Mon, 18 Nov 2024 15:29:48 +0530 [thread overview]
Message-ID: <20241118095948.2017893-5-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20241118095948.2017893-1-bhanuprakash.modem@intel.com>
Add support to force the spurious hpd to default on exit.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
lib/igt_kms.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index f88c7d6c0..275589f70 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2922,6 +2922,19 @@ static void igt_handle_spurious_hpd(igt_display_t *display)
dump_connector_attrs();
}
+static void igt_reset_spurious_hpd(int drm_fd)
+{
+ /* Proceed with spurious HPD handling only if the env var is set */
+ if (!getenv("IGT_KMS_IGNORE_HPD"))
+ return;
+
+ /* Set the ignore HPD for the driver */
+ if (!igt_ignore_long_hpd(drm_fd, false)) {
+ igt_info("Unable set the ignore HPD debugfs entry \n");
+ return;
+ }
+}
+
/**
* igt_display_reset_outputs:
* @display: a pointer to an initialized #igt_display_t structure
@@ -3438,6 +3451,10 @@ void igt_display_fini(igt_display_t *display)
for (i = 0; i < display->n_outputs; i++)
igt_output_fini(&display->outputs[i]);
+
+ if (display->n_pipes && display->n_outputs)
+ igt_reset_spurious_hpd(display->drm_fd);
+
free(display->outputs);
display->outputs = NULL;
free(display->pipes);
--
2.43.0
next prev parent reply other threads:[~2024-11-18 10:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 9:59 [i-g-t V3 0/4] Force connector/crtc attrs to default Bhanuprakash Modem
2024-11-18 9:59 ` [i-g-t V3 1/4] lib/igt_kms: Add infra to handle crtc arbitrary attributes Bhanuprakash Modem
2024-11-18 9:59 ` [i-g-t V3 2/4] lib/drrs: Add support to force drrs to default on exit Bhanuprakash Modem
2024-11-18 9:59 ` [i-g-t V3 3/4] lib/dsc: Reset DSC bpc " Bhanuprakash Modem
2024-11-18 9:59 ` Bhanuprakash Modem [this message]
2024-11-18 23:15 ` ✗ Fi.CI.BAT: failure for Force connector/crtc attrs to default (rev4) Patchwork
2024-11-18 23:15 ` ✓ CI.xeBAT: success " Patchwork
2024-11-19 9:42 ` ✗ CI.xeFULL: failure " Patchwork
2024-11-19 21:07 ` ✓ CI.xeBAT: success for Force connector/crtc attrs to default (rev5) Patchwork
2024-11-19 21:26 ` ✗ GitLab.Pipeline: warning " Patchwork
2024-11-19 21:39 ` ✓ Fi.CI.BAT: success " Patchwork
2024-11-20 9:04 ` ✗ CI.xeFULL: failure " Patchwork
2024-11-21 18:57 ` ✗ i915.CI.Full: " 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=20241118095948.2017893-5-bhanuprakash.modem@intel.com \
--to=bhanuprakash.modem@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=swati2.sharma@intel.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