[igt-dev] [PATCH i-g-t 4/6] lib/igt_sysfs: Remove idx from sysfs_open
Chris Wilson
chris at chris-wilson.co.uk
Wed Mar 13 13:08:23 UTC 2019
Quoting Michał Winiarski (2019-03-13 12:53:30)
> Similar to sysfs_path - more explicit more better.
>
> Signed-off-by: Michał Winiarski <michal.winiarski at intel.com>
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
> diff --git a/tests/perf.c b/tests/perf.c
> index ac979a65..84555462 100644
> --- a/tests/perf.c
> +++ b/tests/perf.c
> @@ -4112,7 +4112,8 @@ igt_main
> igt_require_gem(drm_fd);
>
> devid = intel_get_drm_devid(drm_fd);
> - sysfs = igt_sysfs_open(drm_fd, &card);
> + card = igt_device_get_card_index(drm_fd);
As demonstrated here, anybody using card is doing it wrong.
Care to kill this off with an
openat(sysfs, "metrics/%s/id") ?
-Chris
More information about the igt-dev
mailing list