From: "Kempczynski, Zbigniew" <zbigniew.kempczynski@intel.com>
To: "daniel@ffwll.ch" <daniel@ffwll.ch>
Cc: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
"Latvala, Petri" <petri.latvala@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t v1 1/1] Introduce new method of device selection
Date: Mon, 15 Jul 2019 06:25:04 +0000 [thread overview]
Message-ID: <665bbc3bca27c4524da0d23ab36b4e270a5cb511.camel@intel.com> (raw)
In-Reply-To: <20190711124341.GL15868@phenom.ffwll.local>
On Thu, 2019-07-11 at 14:43 +0200, Daniel Vetter wrote:
> Instead of text, can we somehow integrate into our gtkdoc stuff? I know
> gtkdoc isn't as flexible as the kernel by far, but random .txt files isn't
> better either ...
Agree. I'll rewrite this to gtkdoc.
>
> > lib/Makefile.sources | 2 +
> > lib/drmtest.c | 151 +++-
> > lib/drmtest.h | 9 +
> > lib/igt_core.c | 13 +
> > lib/igt_device_scan.c | 1425 +++++++++++++++++++++++++++++++
> > lib/igt_device_scan.h | 72 ++
> > lib/meson.build | 1 +
> > tools/Makefile.sources | 1 +
> > tools/lsgpu.c | 285 +++++++
> > tools/meson.build | 1 +
> > 11 files changed, 2073 insertions(+), 2 deletions(-)
> > create mode 100644 docs/multi-device-selection.txt
> > create mode 100644 lib/igt_device_scan.c
> > create mode 100644 lib/igt_device_scan.h
> > create mode 100644 tools/lsgpu.c
>
> Wrt the design itself: I thought the last discussion on this we agreed on
> basing this on udev filters. Not reinvinting an entire device
> parser/filter ourselves (which this does here), because that means more
> work on arm and anywhere else. Do we have a case of lost in communication
> between all the various mail threads going on here?
I've used udev filters for scanning separate bus and returning all devices
on it. I haven't use all of its filters when I realized that it doesn't allow
filtering properly on some sysattrs. It resolves symbolic links only
for limited set of attributes what is a real problem - you can't set
sysattr filter because value of such attribute is NULL.
Another thing is that udev provides properties / attributes as list instead
of key / value hash table. So if you use --device ... multiple times
you'll iterate over such lists multiple time to get appropriate 'key=value'
instead getting it directly from hashtable.
That's why I decided resolve each udev device to internal igt_device
once, allowing people who want to write filter just direct access to
properties / sysattrs. Missing symbolic links resolving is also done
in that step so filter author doesn't need to do this on his own
each time he would iterate over udev prop/sysattrs lists.
So regarding your sentence in lost communication - I didn't wanted to
bother anyone with problems described above. I'm not sure even if
I would send a patch to udev team regarding symbolic links they
would accept it (someone maybe relies on this behavior now, so it
could break compatibility). And we don't have single udev implementation
(eudev) too.
Zbigniew
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-07-15 6:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-11 10:30 [igt-dev] [PATCH i-g-t v1 0/1] Add device selection methods Zbigniew Kempczyński
2019-07-11 10:30 ` [igt-dev] [PATCH i-g-t v1 1/1] Introduce new method of device selection Zbigniew Kempczyński
2019-07-11 12:43 ` Daniel Vetter
2019-07-15 6:25 ` Kempczynski, Zbigniew [this message]
2019-07-15 9:31 ` Daniel Vetter
2019-07-15 11:22 ` Kempczynski, Zbigniew
2019-07-12 8:20 ` Vasilev, Oleg
2019-07-12 9:18 ` Zbigniew Kempczyński
2019-07-11 15:13 ` [igt-dev] ✓ Fi.CI.BAT: success for Add device selection methods Patchwork
2019-07-12 10:08 ` [igt-dev] ✓ Fi.CI.IGT: " 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=665bbc3bca27c4524da0d23ab36b4e270a5cb511.camel@intel.com \
--to=zbigniew.kempczynski@intel.com \
--cc=daniel@ffwll.ch \
--cc=igt-dev@lists.freedesktop.org \
--cc=petri.latvala@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