From: "José Expósito" <jose.exposito89@gmail.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org, louis.chauvet@bootlin.com,
"Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
Subject: Re: [PATCH i-g-t v2 23/43] lib/igt_device_scan: Allow to find device by sysname
Date: Tue, 15 Jul 2025 12:27:16 +0200 [thread overview]
Message-ID: <aHYtBE7aURplD4gV@fedora> (raw)
In-Reply-To: <20250611110916.ixunwvqyyxl6zp2m@kamilkon-DESK.igk.intel.com>
Hi Kamil,
On Wed, Jun 11, 2025 at 01:09:16PM +0200, Kamil Konieczny wrote:
> Hi José,
> On 2025-03-13 at 18:32:58 +0100, José Expósito wrote:
> > The VKMS driver allows to create multiple devices handled by the same
> > driver but with a different sysname.
> >
> > In order to differentiate between them, allow to find devices by
> > sysname.
> >
> > Signed-off-by: José Expósito <jose.exposito89@gmail.com>
>
> Please rebase your series as few of configfs changes got merged.
>
> Also for this change +cc Zbigniew
> Cc: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
Thanks a lot for your interest on this series.
I rebased on top of the latest master code and sent v3 here:
https://lore.kernel.org/igt-dev/20250715102513.5636-1-jose.exposito89@gmail.com/T/
Best wishes,
José Expósito
> Regards,
> Kamil
>
> > ---
> > lib/igt_device_scan.c | 22 ++++++++++++++++++++++
> > lib/igt_device_scan.h | 2 ++
> > 2 files changed, 24 insertions(+)
> >
> > diff --git a/lib/igt_device_scan.c b/lib/igt_device_scan.c
> > index 711bedc5c..5cbd347a3 100644
> > --- a/lib/igt_device_scan.c
> > +++ b/lib/igt_device_scan.c
> > @@ -231,6 +231,7 @@ struct igt_device {
> > char *subsystem;
> > char *syspath;
> > char *devnode;
> > + char *sysname;
> >
> > /* /dev/dri/... paths */
> > char *drm_card;
> > @@ -664,6 +665,7 @@ static struct igt_device *igt_device_new_from_udev(struct udev_device *dev,
> > idev->syspath = strdup_nullsafe(udev_device_get_syspath(dev));
> > idev->subsystem = strdup_nullsafe(udev_device_get_subsystem(dev));
> > idev->devnode = strdup_nullsafe(udev_device_get_devnode(dev));
> > + idev->sysname = strdup_nullsafe(udev_device_get_sysname(dev));
> >
> > if (idev->devnode && strstr(idev->devnode, "/dev/dri/card"))
> > idev->drm_card = strdup(idev->devnode);
> > @@ -2059,6 +2061,26 @@ bool igt_device_card_match_pci(const char *filter,
> > return __igt_device_card_match(filter, card, true);
> > }
> >
> > +bool igt_device_find_card_by_sysname(const char *sysname,
> > + struct igt_device_card *card)
> > +{
> > + struct igt_device *dev;
> > +
> > + igt_assert(card);
> > + igt_assert(sysname);
> > +
> > + memset(card, 0, sizeof(*card));
> > +
> > + igt_list_for_each_entry(dev, &igt_devs.all, link) {
> > + if (strcmp(dev->sysname, sysname) == 0) {
> > + __copy_dev_to_card(dev, card);
> > + return true;
> > + }
> > + }
> > +
> > + return false;
> > +}
> > +
> > /**
> > * igt_device_get_pretty_name
> > * @card: pointer to igt_device_card struct
> > diff --git a/lib/igt_device_scan.h b/lib/igt_device_scan.h
> > index 92741fe3c..2a61777b0 100644
> > --- a/lib/igt_device_scan.h
> > +++ b/lib/igt_device_scan.h
> > @@ -92,6 +92,8 @@ bool igt_device_find_first_i915_discrete_card(struct igt_device_card *card);
> > bool igt_device_find_integrated_card(struct igt_device_card *card);
> > bool igt_device_find_first_xe_discrete_card(struct igt_device_card *card);
> > bool igt_device_find_xe_integrated_card(struct igt_device_card *card);
> > +bool igt_device_find_card_by_sysname(const char *sysname,
> > + struct igt_device_card *card);
> > char *igt_device_get_pretty_name(struct igt_device_card *card, bool numeric);
> > int igt_open_card(struct igt_device_card *card);
> > int igt_open_render(struct igt_device_card *card);
> > --
> > 2.48.1
> >
next prev parent reply other threads:[~2025-07-15 10:27 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-13 17:32 [PATCH i-g-t v2 00/43] VKMS configfs tests José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 01/43] lib/drmtest: Add VKMS as a known driver type José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 02/43] lib/igt_debugfs: Move is_mountpoint() to igt_aux José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 03/43] lib/igt_configfs: Add helper to mount configfs José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 04/43] lib/vkms: Add minimal VKMS library and test device default files José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 05/43] lib/vkms: Allow to enable/disable VKMS devices José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 06/43] tests/vkms_configfs: Test device invalid values José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 07/43] lib/vkms: Test plane default files José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 08/43] lib/vkms: Test plane default values José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 09/43] lib/vkms: Test plane invalid values José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 10/43] tests/vkms_configfs: Test plane valid values José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 11/43] lib/vkms: Test CRTC default files José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 12/43] lib/vkms: Test CRTC default values José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 13/43] lib/vkms: Test CRTC invalid values José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 14/43] tests/vkms_configfs: Test CRTC valid values José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 15/43] lib/vkms: Test encoder default files José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 16/43] lib/vkms: Test connector " José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 17/43] lib/vkms: Test connector default values José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 18/43] lib/vkms: Test connector invalid values José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 19/43] tests/vkms_configfs: Test connector valid values José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 20/43] lib/vkms: Test attaching planes to CRTCs José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 21/43] lib/vkms: Test attaching encoders " José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 22/43] lib/vkms: Test attaching connectors to encoders José Expósito
2025-03-13 17:32 ` [PATCH i-g-t v2 23/43] lib/igt_device_scan: Allow to find device by sysname José Expósito
2025-06-11 11:09 ` Kamil Konieczny
2025-07-15 10:27 ` José Expósito [this message]
2025-03-13 17:32 ` [PATCH i-g-t v2 24/43] tests/vkms_configfs: Test enablement without pipeline items José Expósito
2025-03-13 17:33 ` [PATCH i-g-t v2 25/43] lib/vkms: Create VKMS device from static config José Expósito
2025-03-13 17:33 ` [PATCH i-g-t v2 26/43] tests/vkms_configfs: Test adding too many planes José Expósito
2025-03-13 17:33 ` [PATCH i-g-t v2 27/43] tests/vkms_configfs: Test not adding a primary plane José Expósito
2025-03-13 17:33 ` [PATCH i-g-t v2 28/43] tests/vkms_configfs: Test adding multiple primary planes José Expósito
2025-03-13 17:33 ` [PATCH i-g-t v2 29/43] tests/vkms_configfs: Test adding multiple cursor planes José Expósito
2025-03-13 17:33 ` [PATCH i-g-t v2 30/43] tests/vkms_configfs: Test adding a plane without possible CRTCs José Expósito
2025-03-13 17:33 ` [PATCH i-g-t v2 31/43] tests/vkms_configfs: Test enabling a device without CRTCs José Expósito
2025-03-13 17:33 ` [PATCH i-g-t v2 32/43] tests/vkms_configfs: Test enabling a device with too many CRTCs José Expósito
2025-03-13 17:33 ` [PATCH i-g-t v2 33/43] tests/vkms_configfs: Test enabling a device without encoders José Expósito
2025-03-13 17:33 ` [PATCH i-g-t v2 34/43] tests/vkms_configfs: Test enabling a device with too many encoders José Expósito
2025-03-13 17:33 ` [PATCH i-g-t v2 35/43] tests/vkms_configfs: Test adding an encoder without possible CRTCs José Expósito
2025-03-13 17:33 ` [PATCH i-g-t v2 36/43] tests/vkms_configfs: Test adding a CRTC without encoders José Expósito
2025-03-13 17:33 ` [PATCH i-g-t v2 37/43] tests/vkms_configfs: Test enabling a device without connectors José Expósito
2025-03-13 17:33 ` [PATCH i-g-t v2 38/43] tests/vkms_configfs: Test enabling a device with too many connectors José Expósito
2025-03-13 17:33 ` [PATCH i-g-t v2 39/43] lib/vkms: Test changing enabled device planes José Expósito
2025-03-13 17:33 ` [PATCH i-g-t v2 40/43] lib/vkms: Test changing enabled device CRTCs José Expósito
2025-03-13 17:33 ` [PATCH i-g-t v2 41/43] lib/vkms: Test changing enabled device encoders José Expósito
2025-03-13 17:33 ` [PATCH i-g-t v2 42/43] lib/vkms: Test changing enabled device connectors José Expósito
2025-03-13 17:33 ` [PATCH i-g-t v2 43/43] tests/vkms_configfs: Test connector hot-plug José Expósito
2025-03-14 16:54 ` ✗ Xe.CI.Full: failure for VKMS configfs tests (rev4) Patchwork
2025-03-15 0:05 ` ✓ Xe.CI.BAT: success for VKMS configfs tests (rev5) Patchwork
2025-03-15 0:30 ` ✓ i915.CI.BAT: " Patchwork
2025-03-15 9:06 ` ✗ Xe.CI.Full: failure " Patchwork
2025-03-15 11:32 ` ✗ i915.CI.Full: " 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=aHYtBE7aURplD4gV@fedora \
--to=jose.exposito89@gmail.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=louis.chauvet@bootlin.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.