From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 2/2] lib/igt_drm_fdinfo: Mandatory drm-fields first
Date: Wed, 7 Feb 2024 10:38:02 +0000 [thread overview]
Message-ID: <1817b4df-3ac9-44ab-a9b4-a5a728c1a600@linux.intel.com> (raw)
In-Reply-To: <20240201004744.352041-3-lucas.demarchi@intel.com>
On 01/02/2024 00:46, Lucas De Marchi wrote:
> 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.
This change is a bit meh since I could argue the order went from more
global to less global e.g. driver->device->client->keys which is now not
for IMO no strong reason.
And if you add the "/* optional */" comment then why would only one of
the optional keys "deserve" it.
I see you stormed it in already but as it doesn't harm much meh.
Regards,
Tvrtko
>
> 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-"),
next prev parent reply other threads:[~2024-02-07 10:38 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 ` [PATCH i-g-t 2/2] lib/igt_drm_fdinfo: Mandatory drm-fields first Lucas De Marchi
2024-02-01 12:45 ` Kamil Konieczny
2024-02-07 10:38 ` Tvrtko Ursulin [this message]
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=1817b4df-3ac9-44ab-a9b4-a5a728c1a600@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=lucas.demarchi@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