[igt-dev] [PATCH i-g-t 1/2] lib/igt_device_scan: Fix device selection filter
Petri Latvala
petri.latvala at intel.com
Fri Sep 11 05:49:38 UTC 2020
On Fri, Sep 04, 2020 at 07:31:46AM +0000, Siddiqui, Ayaz A wrote:
>
>
> > -----Original Message-----
> > From: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> > Sent: Thursday, September 3, 2020 5:24 PM
> > To: Siddiqui, Ayaz A <ayaz.siddiqui at intel.com>
> > Cc: igt-dev at lists.freedesktop.org
> > Subject: Re: [igt-dev] [PATCH i-g-t 1/2] lib/igt_device_scan: Fix device
> > selection filter
> >
> > On Thu, Sep 03, 2020 at 04:31:09PM +0530, Ayaz A Siddiqui wrote:
> > > DRM subsystem filter in intel_gpu_top was not working due to missing
> > > PCI_SLOT_NAME property. Using the parent device in case of drm
> > > subsystem leads to fix this issue.
> > >
> > > Signed-off-by: Ayaz A Siddiqui <ayaz.siddiqui at intel.com>
> > > ---
> > > lib/igt_device_scan.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/lib/igt_device_scan.c b/lib/igt_device_scan.c index
> > > 345bae76d..3583c69c7 100644
> > > --- a/lib/igt_device_scan.c
> > > +++ b/lib/igt_device_scan.c
> > > @@ -1263,7 +1263,7 @@ bool igt_device_card_match(const char *filter,
> > struct igt_device_card *card)
> > > /* We take first one if more than one card matches filter */
> > > dev = igt_list_first_entry(&igt_devs.filtered, dev, link);
> > >
> > > - __copy_dev_to_card(dev, card);
> > > + __copy_dev_to_card(is_pci_subsystem(dev) ? dev : dev->parent,
> > card);
> > >
> > > return true;
> > > }
> >
> > The only doubt I got: - is that i915 driver behavior or all drm cards do the
> > same?
> I haven't check and In case of other drm card we may not have pmu also.
For intel_gpu_top we naturally don't worry about other devices but
this change affects everyone. Please check and verify this.
--
Petri Latvala
More information about the igt-dev
mailing list