From: Lucas De Marchi <lucas.demarchi@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Subject: [PATCH i-g-t 2/2] lib/igt_drm_fdinfo: Mandatory drm-fields first
Date: Wed, 31 Jan 2024 16:46:25 -0800 [thread overview]
Message-ID: <20240201004744.352041-3-lucas.demarchi@intel.com> (raw)
In-Reply-To: <20240201004744.352041-1-lucas.demarchi@intel.com>
drm-driver and drm-client-id are 2 keys that should be on any driver's
implementation of fdinfo. Move them earlier so it's clear what the
"good" tracking is doing.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
lib/igt_drm_fdinfo.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/igt_drm_fdinfo.c b/lib/igt_drm_fdinfo.c
index 5c0ccf624..17cac4009 100644
--- a/lib/igt_drm_fdinfo.c
+++ b/lib/igt_drm_fdinfo.c
@@ -233,12 +233,13 @@ __igt_parse_drm_fdinfo(int dir, const char *fd, struct drm_client_fdinfo *info,
if ((v = find_kv(l, "drm-driver", strlen("drm-driver")))) {
strncpy(info->driver, v, sizeof(info->driver) - 1);
good++;
- } else if ((v = find_kv(l, "drm-pdev", strlen("drm-pdev")))) {
- strncpy(info->pdev, v, sizeof(info->pdev) - 1);
} else if ((v = find_kv(l, "drm-client-id",
strlen("drm-client-id")))) {
info->id = atol(v);
good++;
+ } else if ((v = find_kv(l, "drm-pdev", strlen("drm-pdev")))) {
+ /* optional */
+ strncpy(info->pdev, v, sizeof(info->pdev) - 1);
} else if (!strncmp(l, "drm-engine-capacity-", 20)) {
idx = parse_engine(l, info,
strlen("drm-engine-capacity-"),
--
2.43.0
next prev parent reply other threads:[~2024-02-01 0:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 0:46 [PATCH i-g-t 0/2] fdinfo: drive-by changes Lucas De Marchi
2024-02-01 0:46 ` [PATCH i-g-t 1/2] lib/igt_drm_fdinfo: Use longest match first Lucas De Marchi
2024-02-01 12:43 ` Kamil Konieczny
2024-02-01 14:09 ` Lucas De Marchi
2024-02-07 10:32 ` Tvrtko Ursulin
2024-02-07 17:50 ` Lucas De Marchi
2024-02-07 18:57 ` Tvrtko Ursulin
2024-02-01 0:46 ` Lucas De Marchi [this message]
2024-02-01 12:45 ` [PATCH i-g-t 2/2] lib/igt_drm_fdinfo: Mandatory drm-fields first Kamil Konieczny
2024-02-07 10:38 ` Tvrtko Ursulin
2024-02-01 2:22 ` ✓ Fi.CI.BAT: success for fdinfo: drive-by changes Patchwork
2024-02-01 2:44 ` ✓ CI.xeBAT: " Patchwork
2024-02-01 3:48 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-02-01 20:35 ` Lucas De Marchi
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=20240201004744.352041-3-lucas.demarchi@intel.com \
--to=lucas.demarchi@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