[igt-dev] [Intel-gfx] [PATCH i-g-t] perf: Avoid the regular drm_open_driver exithandler
Petri Latvala
petri.latvala at intel.com
Tue Feb 25 11:51:25 UTC 2020
On Tue, Feb 25, 2020 at 11:44:54AM +0000, Chris Wilson wrote:
> Due to the way i915_perf_open() works, it installs a wakeref on the fd.
> This wakeref prevents the normal drm_open_driver() exithandler from
> returning (as that waits for all wakerefs to ensure the GPU is idle). We
> need to manually control the nesting of cleanup, and so need to use
> __drm_open_driver() to avoid the default exithandler.
>
> References: https://gitlab.freedesktop.org/drm/intel/issues/1085#note_419148
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Reviewed-by: Petri Latvala <petri.latvala at intel.com>
> ---
> tests/perf.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tests/perf.c b/tests/perf.c
> index 7b11f668c..869e5f1e9 100644
> --- a/tests/perf.c
> +++ b/tests/perf.c
> @@ -4489,7 +4489,8 @@ igt_main
> */
> igt_assert_eq(drm_fd, -1);
>
> - drm_fd = drm_open_driver(DRIVER_INTEL);
> + /* Avoid the normal exithandler, our perf-fd interferes */
> + drm_fd = __drm_open_driver(DRIVER_INTEL);
> igt_require_gem(drm_fd);
>
> devid = intel_get_drm_devid(drm_fd);
> --
> 2.25.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the igt-dev
mailing list