From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org, zbigniew.kempczynski@intel.com
Subject: [igt-dev] [i-g-t V2 5/5] lib/igt_kms: Cache xe_device info for kms tests
Date: Tue, 14 Mar 2023 21:35:03 +0530 [thread overview]
Message-ID: <20230314160503.2237121-6-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20230314160503.2237121-1-bhanuprakash.modem@intel.com>
Create or get xe_device data from Cache, so that all KMS tests
will utilize.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Acked-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
lib/igt_kms.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 84091d5ce..d88863a90 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -59,6 +59,7 @@
#include "igt_device.h"
#include "igt_sysfs.h"
#include "sw_sync.h"
+#include "xe/xe_query.h"
#ifdef HAVE_CHAMELIUM
#include "igt_chamelium.h"
#endif
@@ -2541,6 +2542,9 @@ void igt_display_require(igt_display_t *display, int drm_fd)
}
#endif
+ if (is_xe_device(drm_fd))
+ xe_device_get(drm_fd);
+
/*
* With non-contiguous pipes display, crtc mapping is not always same
* as pipe mapping, In i915 pipe is enum id of i915's crtc object.
@@ -2889,6 +2893,10 @@ static void igt_output_fini(igt_output_t *output)
void igt_display_fini(igt_display_t *display)
{
int i;
+ int drm_fd = display->drm_fd;
+
+ if (is_xe_device(drm_fd))
+ xe_device_put(drm_fd);
for (i = 0; i < display->n_planes; ++i) {
igt_plane_t *plane = &display->planes[i];
--
2.39.1
next prev parent reply other threads:[~2023-03-14 16:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-14 16:04 [igt-dev] [i-g-t V2 0/5] Add basic helpers to support display in XE Bhanuprakash Modem
2023-03-14 16:04 ` [igt-dev] [i-g-t V2 1/5] lib/drmtest: Add helpers to check and require the XE driver Bhanuprakash Modem
2023-03-14 16:05 ` [igt-dev] [i-g-t V2 2/5] i915: s/igt_require_intel/igt_require_i915 Bhanuprakash Modem
2023-03-14 16:05 ` [igt-dev] [i-g-t V2 3/5] lib/xe/xe_query: Add dev_id() interface Bhanuprakash Modem
2023-03-14 16:05 ` [igt-dev] [i-g-t V2 4/5] lib/intel_chipset: Add support to XE driver to get devid Bhanuprakash Modem
2023-03-14 16:05 ` Bhanuprakash Modem [this message]
2023-03-14 17:00 ` [igt-dev] ✓ Fi.CI.BAT: success for Add basic helpers to support display in XE (rev2) Patchwork
2023-03-15 20:30 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20230314160503.2237121-6-bhanuprakash.modem@intel.com \
--to=bhanuprakash.modem@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=zbigniew.kempczynski@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