From: Kamil Konieczny <kamil.konieczny@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: "Kamil Konieczny" <kamil.konieczny@linux.intel.com>,
"Mark Yacoub" <markyacoub@chromium.org>,
"Lyude Paul" <lyude@redhat.com>,
"Jani Nikula" <jani.nikula@intel.com>,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Subject: [PATCH i-g-t 3/3] lib/igt_kms: Fix cleanup in igt_display_reset_outputs()
Date: Fri, 24 Apr 2026 17:13:55 +0200 [thread overview]
Message-ID: <20260424151355.129423-4-kamil.konieczny@linux.intel.com> (raw)
In-Reply-To: <20260424151355.129423-1-kamil.konieczny@linux.intel.com>
After free of outputs, set their number to zero so in case of
unlikly event when drm resources become unavailable, returned
structure will retain correct info.
Cc: Mark Yacoub <markyacoub@chromium.org>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
---
lib/igt_kms.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 33092fc85..51c3392fc 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2913,6 +2913,7 @@ void igt_display_reset_outputs(igt_display_t *display)
free(config->connector_path);
}
free(display->outputs);
+ display->n_outputs = 0;
}
resources = drmModeGetResources(display->drm_fd);
--
2.54.0
next prev parent reply other threads:[~2026-04-24 15:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 15:13 [PATCH i-g-t 0/3] Few fixes for igt_display_reset_outputs() in lib/igt_kms Kamil Konieczny
2026-04-24 15:13 ` [PATCH i-g-t 1/3] Revert "tests/kms: correct index validation logic" Kamil Konieczny
2026-04-24 15:13 ` [PATCH i-g-t 2/3] lib/igt_kms: Fix assert in igt_display_reset_outputs() Kamil Konieczny
2026-04-27 15:30 ` Kamil Konieczny
2026-04-24 15:13 ` Kamil Konieczny [this message]
2026-04-24 16:13 ` ✓ Xe.CI.BAT: success for Few fixes for igt_display_reset_outputs() in lib/igt_kms Patchwork
2026-04-24 16:30 ` ✓ i915.CI.BAT: " Patchwork
2026-04-24 17:57 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-04-27 14:44 ` Kamil Konieczny
2026-04-24 21:58 ` ✗ i915.CI.Full: " Patchwork
2026-04-27 14:45 ` Kamil Konieczny
2026-04-27 12:24 ` [PATCH i-g-t 0/3] " Ville Syrjälä
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=20260424151355.129423-4-kamil.konieczny@linux.intel.com \
--to=kamil.konieczny@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=lyude@redhat.com \
--cc=markyacoub@chromium.org \
--cc=ville.syrjala@linux.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