From: Jeevan B <jeevan.b@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: bhanuprakash.modem@intel.com, kunal1.joshi@intel.com,
animesh.manna@intel.com,
Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>,
Lucas De Marchi <lucas.demarchi@intel.com>
Subject: [PATCH i-g-t 1/3] tests/intel/xe_drm_fdinfo: Add basic-engine-utilization test
Date: Wed, 31 Jul 2024 20:32:50 +0530 [thread overview]
Message-ID: <20240731150252.2951870-2-jeevan.b@intel.com> (raw)
In-Reply-To: <20240731150252.2951870-1-jeevan.b@intel.com>
From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Add the basic test for engine utilization.
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20240703002532.3156277-3-umesh.nerlige.ramappa@intel.com
---
tests/intel/xe_drm_fdinfo.c | 33 ++++++++++++++++++++++++++++++---
1 file changed, 30 insertions(+), 3 deletions(-)
diff --git a/tests/intel/xe_drm_fdinfo.c b/tests/intel/xe_drm_fdinfo.c
index f0aa23e2f..2f9661a0b 100644
--- a/tests/intel/xe_drm_fdinfo.c
+++ b/tests/intel/xe_drm_fdinfo.c
@@ -14,17 +14,20 @@
#include "xe/xe_spin.h"
/**
* TEST: xe drm fdinfo
- * Description: Read and verify drm client memory consumption using fdinfo
+ * Description: Read and verify drm client memory consumption and engine utilization using fdinfo
* Category: Core
* Mega feature: General Core features
* Sub-category: driver
- * Functionality: Per client memory statistics
+ * Functionality: Per client memory and engine utilization statistics
* Feature: SMI, core
* Test category: SysMan
*
* SUBTEST: basic-memory
* Description: Check if basic fdinfo content is present for memory
*
+ * SUBTEST: basic-engine-utilization
+ * Description: Check if basic fdinfo content is present for engine utilization
+ *
* SUBTEST: drm-total-resident
* Description: Create and compare total and resident memory consumption by client
*
@@ -35,10 +38,18 @@
* Description: Create and compare active memory consumption by client
*/
-IGT_TEST_DESCRIPTION("Read and verify drm client memory consumption using fdinfo");
+IGT_TEST_DESCRIPTION("Read and verify drm client memory consumption and engine utilization using fdinfo");
#define BO_SIZE (65536)
+static const char *engine_map[] = {
+ "rcs",
+ "bcs",
+ "vcs",
+ "vecs",
+ "ccs",
+};
+
/* Subtests */
static void test_active(int fd, struct drm_xe_engine *engine)
{
@@ -287,6 +298,18 @@ static void basic_memory(int xe)
}
}
+static void basic_engine_utilization(int xe)
+{
+ struct drm_client_fdinfo info = { };
+ unsigned int ret;
+
+ ret = igt_parse_drm_fdinfo(xe, &info, engine_map,
+ ARRAY_SIZE(engine_map), NULL, 0);
+ igt_assert_f(ret != 0, "failed with err:%d\n", errno);
+ igt_assert(!strcmp(info.driver, "xe"));
+ igt_require(info.num_engines);
+}
+
igt_main
{
int xe;
@@ -303,6 +326,10 @@ igt_main
igt_subtest("basic-memory")
basic_memory(xe);
+ igt_describe("Check if basic fdinfo content is present for engine utilization");
+ igt_subtest("basic-engine-utilization")
+ basic_engine_utilization(xe);
+
igt_describe("Create and compare total and resident memory consumption by client");
igt_subtest("drm-total-resident")
test_total_resident(xe);
--
2.25.1
next prev parent reply other threads:[~2024-07-31 14:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-31 15:02 [PATCH i-g-t 0/3] New test to validate link-off between active regions (LOBF) Jeevan B
2024-07-31 15:02 ` Jeevan B [this message]
2024-07-31 14:59 ` [PATCH i-g-t 1/3] tests/intel/xe_drm_fdinfo: Add basic-engine-utilization test B, Jeevan
2024-07-31 15:02 ` [PATCH i-g-t 2/3] lib/igt_kms: Added library functions for LOBF status Jeevan B
2024-07-31 15:02 ` [PATCH i-g-t 3/3] tests/kms_vrr: Add new test to validate LOBF Jeevan B
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=20240731150252.2951870-2-jeevan.b@intel.com \
--to=jeevan.b@intel.com \
--cc=animesh.manna@intel.com \
--cc=bhanuprakash.modem@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kunal1.joshi@intel.com \
--cc=lucas.demarchi@intel.com \
--cc=umesh.nerlige.ramappa@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