From: Petri Latvala <petri.latvala@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [igt-dev] [Intel-gfx] [PATCH i-g-t] perf: Avoid the regular drm_open_driver exithandler
Date: Tue, 25 Feb 2020 13:51:25 +0200 [thread overview]
Message-ID: <20200225115125.GG3839@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20200225114454.337180-1-chris@chris-wilson.co.uk>
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@chris-wilson.co.uk>
Reviewed-by: Petri Latvala <petri.latvala@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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-02-25 11:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-25 11:44 [igt-dev] [PATCH i-g-t] perf: Avoid the regular drm_open_driver exithandler Chris Wilson
2020-02-25 11:51 ` Petri Latvala [this message]
2020-02-25 13:39 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200225115125.GG3839@platvala-desk.ger.corp.intel.com \
--to=petri.latvala@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox