Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Swati Sharma <swati2.sharma@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Chris Wilson <chris.p.wilson@intel.com>
Subject: [igt-dev] [PATCH i-g-t 3/4] lib: Clear displays on finish before process exit
Date: Fri,  9 Jun 2023 18:50:18 +0530	[thread overview]
Message-ID: <20230609132019.508947-4-swati2.sharma@intel.com> (raw)
In-Reply-To: <20230609132019.508947-1-swati2.sharma@intel.com>

From: Chris Wilson <chris.p.wilson@intel.com>

As we want to check for resource leaks at process exit, we want to
release all resources allocated during the test. This includes the
kernel objects being used for scanout by igt_display, so reset the
display on exit.

Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
---
 lib/igt_kms.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 5341c637..089a4f0b 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -3001,6 +3001,9 @@ void igt_display_fini(igt_display_t *display)
 	if (is_xe_device(drm_fd))
 		xe_device_put(drm_fd);
 
+	igt_display_reset(display);
+	igt_display_commit(display);
+
 	for (i = 0; i < display->n_planes; ++i) {
 		igt_plane_t *plane = &display->planes[i];
 
-- 
2.25.1

  parent reply	other threads:[~2023-06-09 13:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 13:20 [igt-dev] [PATCH i-g-t 0/4] Misc. fixes Swati Sharma
2023-06-09 13:20 ` [igt-dev] [PATCH i-g-t 1/4] i915/kms_busy: Free spinners after use Swati Sharma
2023-06-09 13:20 ` [igt-dev] [PATCH i-g-t 2/4] i915/kms_mmap_write_crc: Free the mmap and dma-buf fd Swati Sharma
2023-06-09 13:20 ` Swati Sharma [this message]
2023-06-09 13:20 ` [igt-dev] [PATCH i-g-t 4/4] lib/i915: Add intel_display_ver() and use it in display tests/libs Swati Sharma
2023-06-14 18:01   ` Kamil Konieczny
2023-06-09 18:11 ` [igt-dev] ✗ Fi.CI.BAT: failure for Misc. fixes Patchwork
2023-06-14 20:39 ` [igt-dev] ✗ Fi.CI.BAT: failure for Misc. fixes (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=20230609132019.508947-4-swati2.sharma@intel.com \
    --to=swati2.sharma@intel.com \
    --cc=chris.p.wilson@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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