From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id A9E7510E5A6 for ; Thu, 2 Mar 2023 23:20:06 +0000 (UTC) Date: Thu, 02 Mar 2023 15:09:48 -0800 Message-ID: <87edq6yclf.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Anshuman Gupta In-Reply-To: <20230301121207.169588-1-anshuman.gupta@intel.com> References: <20230301121207.169588-1-anshuman.gupta@intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [igt-dev] [PATCH i-g-t] perf_pmu: Dump i915_runtime_pm_status List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: On Wed, 01 Mar 2023 04:12:07 -0800, Anshuman Gupta wrote: > > Dump i915_pm_runtime_status in case of i915 device failed to runtime > suspend, it will dump the rpm wakeref tracking information which > will useful to debug the runtime pm issues. > > Signed-off-by: Anshuman Gupta > --- > tests/i915/perf_pmu.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/tests/i915/perf_pmu.c b/tests/i915/perf_pmu.c > index c1779fc9d0..567b2fa5cf 100644 > --- a/tests/i915/perf_pmu.c > +++ b/tests/i915/perf_pmu.c > @@ -1709,6 +1709,7 @@ test_rc6(int gem_fd, unsigned int flags) > int64_t duration_ns = 2e9; > uint64_t idle, busy, prev, ts[2]; > unsigned long slept; > + bool suspended; > int fd, fw; > > gem_quiescent_gpu(gem_fd); > @@ -1727,7 +1728,12 @@ test_rc6(int gem_fd, unsigned int flags) > drmModeFreeResources(res); > > igt_require(igt_setup_runtime_pm(gem_fd)); > - igt_require(igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED)); > + suspended = igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED); > + > + if (!suspended) > + __igt_debugfs_dump(gem_fd, "i915_runtime_pm_status", IGT_LOG_INFO); > + > + igt_require(suspended); Can we use wait_for_suspended() here instead? OK otherwise too: Reviewed-by: Ashutosh Dixit > > /* > * Sleep for a bit to see if once woken up estimated RC6 hasn't > -- > 2.25.1 >