[PATCH] tests/device_reset: Require a PCI device
Kamil Konieczny
kamil.konieczny at linux.intel.com
Tue Aug 20 16:07:55 UTC 2024
Hi Rob,
On 2024-08-20 at 07:43:02 -0700, Rob Clark wrote:
> From: Rob Clark <robdclark at chromium.org>
>
> Too much baked in assumptions that the drm device is a PCI device.
>
> Signed-off-by: Rob Clark <robdclark at chromium.org>
Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> ---
> tests/device_reset.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/tests/device_reset.c b/tests/device_reset.c
> index 8ed3ef5220fc..40681931c251 100644
> --- a/tests/device_reset.c
> +++ b/tests/device_reset.c
> @@ -200,6 +200,17 @@ 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));
> +
> + /*
> + * Platform devices do not support reset at the bus level, as
> + * there is no actual bus.
> + *
> + * For other bus types, other than PCI, whether and how bus
> + * level reset is supported is left as an exercise for the
> + * reader.
> + */
> + 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