[PATCH 2/2] device_reset: Require a PCI device
Kamil Konieczny
kamil.konieczny at linux.intel.com
Mon Aug 19 17:36:52 UTC 2024
Hi Rob,
On 2024-08-14 at 11:54:26 -0700, Rob Clark wrote:
> From: Rob Clark <robdclark at chromium.org>
One nit about subject, please use 'tests/' prefix:
[PATCH 2/2] device_reset: Require a PCI device
should be:
[PATCH 2/2] tests/device_reset: Require a PCI device
>
> Too much baked in assumptions that the drm device is a PCI device.
Do you have examples where it is not true (e.g. not a PCI device)
and reset is possible? Just curious.
Regards,
Kamil
>
> Signed-off-by: Rob Clark <robdclark at chromium.org>
> ---
> tests/device_reset.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tests/device_reset.c b/tests/device_reset.c
> index 8ed3ef5220fc..c49f94e2faed 100644
> --- a/tests/device_reset.c
> +++ b/tests/device_reset.c
> @@ -200,6 +200,7 @@ static void init_device_fds(struct device_fds *dev)
> igt_require_gem(dev->fds.dev);
>
> igt_assert(device_sysfs_path(dev->fds.dev, dev_path));
> + igt_require(strstr(dev_path, "/sys/devices/pci") == dev_path);
> addr_pos = strrchr(dev_path, '/');
> igt_assert(addr_pos);
> igt_assert_eq(sizeof(dev->dev_bus_addr) - 1,
> --
> 2.46.0
>
More information about the igt-dev
mailing list