From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
Cc: igt-dev@lists.freedesktop.org, Intel-gfx@lists.freedesktop.org,
Petri Latvala <petri.latvala@intel.com>,
Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: Re: [igt-dev] [RFC 2/3] lsgpu: User friendly device listing
Date: Tue, 10 Nov 2020 11:20:46 +0000 [thread overview]
Message-ID: <85814a79-dbb8-fbde-e280-9c334655e6db@linux.intel.com> (raw)
In-Reply-To: <20201110110327.GC5736@zkempczy-mobl2>
On 10/11/2020 11:03, Zbigniew Kempczyński wrote:
> On Mon, Nov 09, 2020 at 10:48:10AM +0000, Tvrtko Ursulin wrote:
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> New default user frindly device listing mode which replaces:
>>
>> sys:/sys/devices/pci0000:00/0000:00:02.0/drm/card0
>> subsystem : drm
>> drm card : /dev/dri/card0
>> parent : sys:/sys/devices/pci0000:00/0000:00:02.0
>>
>> sys:/sys/devices/pci0000:00/0000:00:02.0/drm/renderD128
>> subsystem : drm
>> drm render : /dev/dri/renderD128
>> parent : sys:/sys/devices/pci0000:00/0000:00:02.0
>>
>> sys:/sys/devices/pci0000:00/0000:00:02.0
>> subsystem : pci
>> drm card : /dev/dri/card0
>> drm render : /dev/dri/renderD128
>> vendor : 8086
>> device : 193B
>>
>> With:
>>
>> card0 8086:193B drm:/dev/dri/card0
>> └─renderD128 drm:/dev/dri/renderD128
>>
>> Advantages are more compact, more readable, one entry per GPU.
>>
>> Legacy format can be chose using the -s / --print-simple command line
>> switches.
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Cc: Petri Latvala <petri.latvala@intel.com>
>> Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
>> ---
>> tools/lsgpu.c | 10 ++++++++--
>> 1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/tools/lsgpu.c b/tools/lsgpu.c
>> index 2541d1c24e66..3b234b73361a 100644
>> --- a/tools/lsgpu.c
>> +++ b/tools/lsgpu.c
>> @@ -70,6 +70,7 @@
>> */
>>
>> enum {
>> + OPT_PRINT_SIMPLE = 's',
>> OPT_PRINT_DETAIL = 'p',
>> OPT_LIST_VENDORS = 'v',
>> OPT_LIST_FILTERS = 'l',
>> @@ -85,6 +86,7 @@ static char *igt_device;
>> static const char *usage_str =
>> "usage: lsgpu [options]\n\n"
>> "Options:\n"
>> + " -s, --print-simple Print simple (legacy) device details\n"
>> " -p, --print-details Print devices with details\n"
>> " -v, --list-vendors List recognized vendors\n"
>> " -l, --list-filter-types List registered device filters types\n"
>> @@ -151,6 +153,7 @@ static char *get_device_from_rc(void)
>> int main(int argc, char *argv[])
>> {
>> static struct option long_options[] = {
>> + {"print-simple", no_argument, NULL, OPT_PRINT_SIMPLE},
>> {"print-detail", no_argument, NULL, OPT_PRINT_DETAIL},
>> {"list-vendors", no_argument, NULL, OPT_LIST_VENDORS},
>> {"list-filter-types", no_argument, NULL, OPT_LIST_FILTERS},
>> @@ -160,12 +163,15 @@ int main(int argc, char *argv[])
>> };
>> int c, index = 0;
>> char *env_device = NULL, *opt_device = NULL, *rc_device = NULL;
>> - enum igt_devices_print_type printtype = IGT_PRINT_SIMPLE;
>> + enum igt_devices_print_type printtype = IGT_PRINT_USER;
>>
>> - while ((c = getopt_long(argc, argv, "pvld:h",
>> + while ((c = getopt_long(argc, argv, "spvld:h",
>> long_options, &index)) != -1) {
>> switch(c) {
>>
>> + case OPT_PRINT_SIMPLE:
>> + printtype = IGT_PRINT_SIMPLE;
>> + break;
>> case OPT_PRINT_DETAIL:
>> printtype = IGT_PRINT_DETAIL;
>> break;
>> --
>> 2.25.1
>>
>
> Looks ok:
>
> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Thanks.
Any concerns about potential existence of tools which parse lsgpu output
and may depend on the default format?
Regards,
Tvrtko
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
WARNING: multiple messages have this Message-ID (diff)
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
Cc: igt-dev@lists.freedesktop.org, Intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [RFC 2/3] lsgpu: User friendly device listing
Date: Tue, 10 Nov 2020 11:20:46 +0000 [thread overview]
Message-ID: <85814a79-dbb8-fbde-e280-9c334655e6db@linux.intel.com> (raw)
In-Reply-To: <20201110110327.GC5736@zkempczy-mobl2>
On 10/11/2020 11:03, Zbigniew Kempczyński wrote:
> On Mon, Nov 09, 2020 at 10:48:10AM +0000, Tvrtko Ursulin wrote:
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> New default user frindly device listing mode which replaces:
>>
>> sys:/sys/devices/pci0000:00/0000:00:02.0/drm/card0
>> subsystem : drm
>> drm card : /dev/dri/card0
>> parent : sys:/sys/devices/pci0000:00/0000:00:02.0
>>
>> sys:/sys/devices/pci0000:00/0000:00:02.0/drm/renderD128
>> subsystem : drm
>> drm render : /dev/dri/renderD128
>> parent : sys:/sys/devices/pci0000:00/0000:00:02.0
>>
>> sys:/sys/devices/pci0000:00/0000:00:02.0
>> subsystem : pci
>> drm card : /dev/dri/card0
>> drm render : /dev/dri/renderD128
>> vendor : 8086
>> device : 193B
>>
>> With:
>>
>> card0 8086:193B drm:/dev/dri/card0
>> └─renderD128 drm:/dev/dri/renderD128
>>
>> Advantages are more compact, more readable, one entry per GPU.
>>
>> Legacy format can be chose using the -s / --print-simple command line
>> switches.
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Cc: Petri Latvala <petri.latvala@intel.com>
>> Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
>> ---
>> tools/lsgpu.c | 10 ++++++++--
>> 1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/tools/lsgpu.c b/tools/lsgpu.c
>> index 2541d1c24e66..3b234b73361a 100644
>> --- a/tools/lsgpu.c
>> +++ b/tools/lsgpu.c
>> @@ -70,6 +70,7 @@
>> */
>>
>> enum {
>> + OPT_PRINT_SIMPLE = 's',
>> OPT_PRINT_DETAIL = 'p',
>> OPT_LIST_VENDORS = 'v',
>> OPT_LIST_FILTERS = 'l',
>> @@ -85,6 +86,7 @@ static char *igt_device;
>> static const char *usage_str =
>> "usage: lsgpu [options]\n\n"
>> "Options:\n"
>> + " -s, --print-simple Print simple (legacy) device details\n"
>> " -p, --print-details Print devices with details\n"
>> " -v, --list-vendors List recognized vendors\n"
>> " -l, --list-filter-types List registered device filters types\n"
>> @@ -151,6 +153,7 @@ static char *get_device_from_rc(void)
>> int main(int argc, char *argv[])
>> {
>> static struct option long_options[] = {
>> + {"print-simple", no_argument, NULL, OPT_PRINT_SIMPLE},
>> {"print-detail", no_argument, NULL, OPT_PRINT_DETAIL},
>> {"list-vendors", no_argument, NULL, OPT_LIST_VENDORS},
>> {"list-filter-types", no_argument, NULL, OPT_LIST_FILTERS},
>> @@ -160,12 +163,15 @@ int main(int argc, char *argv[])
>> };
>> int c, index = 0;
>> char *env_device = NULL, *opt_device = NULL, *rc_device = NULL;
>> - enum igt_devices_print_type printtype = IGT_PRINT_SIMPLE;
>> + enum igt_devices_print_type printtype = IGT_PRINT_USER;
>>
>> - while ((c = getopt_long(argc, argv, "pvld:h",
>> + while ((c = getopt_long(argc, argv, "spvld:h",
>> long_options, &index)) != -1) {
>> switch(c) {
>>
>> + case OPT_PRINT_SIMPLE:
>> + printtype = IGT_PRINT_SIMPLE;
>> + break;
>> case OPT_PRINT_DETAIL:
>> printtype = IGT_PRINT_DETAIL;
>> break;
>> --
>> 2.25.1
>>
>
> Looks ok:
>
> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Thanks.
Any concerns about potential existence of tools which parse lsgpu output
and may depend on the default format?
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-11-10 11:20 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-09 10:48 [igt-dev] [RFC 0/3] User friendly lsgpu default output Tvrtko Ursulin
2020-11-09 10:48 ` [Intel-gfx] " Tvrtko Ursulin
2020-11-09 10:48 ` [igt-dev] [RFC 1/3] intel_gpu_top: User friendly device listing Tvrtko Ursulin
2020-11-09 10:48 ` [Intel-gfx] " Tvrtko Ursulin
2020-11-10 11:13 ` [igt-dev] " Zbigniew Kempczyński
2020-11-10 11:13 ` [Intel-gfx] " Zbigniew Kempczyński
2020-11-10 11:19 ` [igt-dev] " Tvrtko Ursulin
2020-11-10 11:19 ` [Intel-gfx] " Tvrtko Ursulin
2020-11-10 11:46 ` [igt-dev] " Zbigniew Kempczyński
2020-11-10 11:46 ` [Intel-gfx] " Zbigniew Kempczyński
2020-11-10 11:52 ` Tvrtko Ursulin
2020-11-10 12:27 ` [igt-dev] " Zbigniew Kempczyński
2020-11-10 12:27 ` [Intel-gfx] " Zbigniew Kempczyński
2020-11-09 10:48 ` [igt-dev] [RFC 2/3] lsgpu: " Tvrtko Ursulin
2020-11-09 10:48 ` [Intel-gfx] " Tvrtko Ursulin
2020-11-10 11:03 ` [igt-dev] " Zbigniew Kempczyński
2020-11-10 11:03 ` [Intel-gfx] " Zbigniew Kempczyński
2020-11-10 11:20 ` Tvrtko Ursulin [this message]
2020-11-10 11:20 ` Tvrtko Ursulin
2020-11-10 11:35 ` [igt-dev] " Zbigniew Kempczyński
2020-11-10 11:35 ` [Intel-gfx] " Zbigniew Kempczyński
2020-11-09 10:48 ` [igt-dev] [RFC 3/3] lsgpu: Add filter type print-out selection Tvrtko Ursulin
2020-11-09 10:48 ` [Intel-gfx] " Tvrtko Ursulin
2020-11-10 11:02 ` Zbigniew Kempczyński
2020-11-09 11:21 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for User friendly lsgpu default output Patchwork
2020-11-09 11:21 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2020-11-09 12:20 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=85814a79-dbb8-fbde-e280-9c334655e6db@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=igt-dev@lists.freedesktop.org \
--cc=petri.latvala@intel.com \
--cc=tvrtko.ursulin@intel.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.