From: Kamil Konieczny <kamil.konieczny@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Subject: [PATCH i-g-t v1 4/7] lib/drmtest: Allow to get drm device name
Date: Fri, 7 Jun 2024 17:36:16 +0200 [thread overview]
Message-ID: <20240607153629.52596-5-kamil.konieczny@linux.intel.com> (raw)
In-Reply-To: <20240607153629.52596-1-kamil.konieczny@linux.intel.com>
Make this a public function so in tests developers could use it
instead of hard-coding driver names (such as "i915" or "xe").
Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
---
lib/drmtest.c | 14 +++++++++++++-
lib/drmtest.h | 2 ++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/lib/drmtest.c b/lib/drmtest.c
index 8ea96ba76..2dd4540b8 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -81,7 +81,19 @@
* and [batchbuffer](igt-gpu-tools-intel-batchbuffer.html) libraries as dependencies.
*/
-static int __get_drm_device_name(int fd, char *name, int name_size)
+/**
+ * __get_drm_device_name:
+ * @fd: a drm file descriptor
+ * @name: pointer to memory
+ * @name_size: size of @name
+ *
+ * A wrapper for DRM_IOCTL_VERSION which will write drm device name in @name.
+ *
+ * Returns:
+ * 0 if name of DRM driver was filled in @name
+ * -1 on ioctl fail
+ */
+int __get_drm_device_name(int fd, char *name, int name_size)
{
drm_version_t version;
diff --git a/lib/drmtest.h b/lib/drmtest.h
index 4d9b60882..27e5a18e2 100644
--- a/lib/drmtest.h
+++ b/lib/drmtest.h
@@ -38,6 +38,8 @@
#include "igt_core.h"
+int __get_drm_device_name(int fd, char *name, int name_size);
+
/*
* NOTE: Theser are _only_ for testcases exercising driver specific rendering
* ioctls and uapi (and a bunch of historical reasons). And KMS testcase should
--
2.43.0
next prev parent reply other threads:[~2024-06-07 15:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 15:36 [PATCH i-g-t v1 0/7] tests/core_hotunplug: Make it fail in subtests Kamil Konieczny
2024-06-07 15:36 ` [PATCH i-g-t v1 1/7] lib/drmtest: add function for retriving chipset Kamil Konieczny
2024-06-12 7:02 ` Andrzej Hajda
2024-06-07 15:36 ` [PATCH i-g-t v1 2/7] tests/core_hotunplug: set known chipset before tests Kamil Konieczny
2024-06-12 7:03 ` Andrzej Hajda
2024-06-07 15:36 ` [PATCH i-g-t v1 3/7] tests/core_hotplug: Add checks to subtests Kamil Konieczny
2024-06-12 7:02 ` Andrzej Hajda
2024-06-07 15:36 ` Kamil Konieczny [this message]
2024-06-12 7:06 ` [PATCH i-g-t v1 4/7] lib/drmtest: Allow to get drm device name Andrzej Hajda
2024-06-07 15:36 ` [PATCH i-g-t v1 5/7] tests/core_hotunplug: Open the same driver Kamil Konieczny
2024-06-12 7:07 ` Andrzej Hajda
2024-06-07 15:36 ` [PATCH i-g-t v1 6/7] tests/core_hotunplug: Fix device close Kamil Konieczny
2024-06-12 7:17 ` Andrzej Hajda
2024-06-07 15:36 ` [PATCH i-g-t v1 7/7] tests/core_hotunplug: Skip if no render available Kamil Konieczny
2024-06-12 7:18 ` Andrzej Hajda
2024-06-07 22:43 ` ✓ Fi.CI.BAT: success for tests/core_hotunplug: Make it fail in subtests Patchwork
2024-06-07 23:13 ` ✓ CI.xeBAT: " Patchwork
2024-06-08 14:02 ` ✗ CI.xeFULL: failure " Patchwork
2024-06-11 15:32 ` Kamil Konieczny
2024-06-08 14:06 ` ✗ Fi.CI.IGT: " Patchwork
2024-06-11 15:35 ` Kamil Konieczny
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=20240607153629.52596-5-kamil.konieczny@linux.intel.com \
--to=kamil.konieczny@linux.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