All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Intel-gfx@lists.freedesktop.org,
	Eero T Tamminen <eero.t.tamminen@intel.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/pmu: Do not report 100% RC6 if not supported
Date: Tue, 6 Apr 2021 14:19:56 +0300	[thread overview]
Message-ID: <YGxD3HZEZ1hoV7gj@intel.intel> (raw)
In-Reply-To: <20210330150637.2547762-1-tvrtko.ursulin@linux.intel.com>

Hi Tvrtko,

> We use GT parked status to estimate RC6 while not in use, however if RC6
> is not supported to start with that does not work very well and produces a
> false 100% RC6 readout.
> 
> Fix by not advancing the estimated RC6 counter when feature is not
> supported.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Fixes: 1fe699e30113 ("drm/i915/pmu: Fix sleep under atomic in RC6 readout")
> Reported-by: Eero T Tamminen <eero.t.tamminen@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_pmu.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
> index 41651ac255fa..02fe0d22c470 100644
> --- a/drivers/gpu/drm/i915/i915_pmu.c
> +++ b/drivers/gpu/drm/i915/i915_pmu.c
> @@ -191,7 +191,10 @@ static u64 get_rc6(struct intel_gt *gt)
>  		 * on top of the last known real value, as the approximated RC6
>  		 * counter value.
>  		 */
> -		val = ktime_since_raw(pmu->sleep_last);
> +		if (gt->rc6.supported)
> +			val = ktime_since_raw(pmu->sleep_last);
> +		else
> +			val = 0;

if rc6 is not supported, why are we here?

Did you mean rc6.enabled ?

Andi
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Andi Shyti <andi.shyti@intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Intel-gfx@lists.freedesktop.org,
	Eero T Tamminen <eero.t.tamminen@intel.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/pmu: Do not report 100% RC6 if not supported
Date: Tue, 6 Apr 2021 14:19:56 +0300	[thread overview]
Message-ID: <YGxD3HZEZ1hoV7gj@intel.intel> (raw)
In-Reply-To: <20210330150637.2547762-1-tvrtko.ursulin@linux.intel.com>

Hi Tvrtko,

> We use GT parked status to estimate RC6 while not in use, however if RC6
> is not supported to start with that does not work very well and produces a
> false 100% RC6 readout.
> 
> Fix by not advancing the estimated RC6 counter when feature is not
> supported.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Fixes: 1fe699e30113 ("drm/i915/pmu: Fix sleep under atomic in RC6 readout")
> Reported-by: Eero T Tamminen <eero.t.tamminen@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_pmu.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
> index 41651ac255fa..02fe0d22c470 100644
> --- a/drivers/gpu/drm/i915/i915_pmu.c
> +++ b/drivers/gpu/drm/i915/i915_pmu.c
> @@ -191,7 +191,10 @@ static u64 get_rc6(struct intel_gt *gt)
>  		 * on top of the last known real value, as the approximated RC6
>  		 * counter value.
>  		 */
> -		val = ktime_since_raw(pmu->sleep_last);
> +		if (gt->rc6.supported)
> +			val = ktime_since_raw(pmu->sleep_last);
> +		else
> +			val = 0;

if rc6 is not supported, why are we here?

Did you mean rc6.enabled ?

Andi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2021-04-06 11:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-30 15:06 [PATCH] drm/i915/pmu: Do not report 100% RC6 if not supported Tvrtko Ursulin
2021-03-30 15:06 ` [Intel-gfx] " Tvrtko Ursulin
2021-03-30 16:01 ` [Intel-gfx] ✗ Fi.CI.DOCS: warning for " Patchwork
2021-03-30 16:26 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-03-30 17:54 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-04-01  9:25 ` [Intel-gfx] [PATCH] " Rodrigo Vivi
2021-04-01  9:25   ` Rodrigo Vivi
2021-04-06 11:19 ` Andi Shyti [this message]
2021-04-06 11:19   ` Andi Shyti
2021-04-09 11:46   ` Tvrtko Ursulin
2021-04-09 11:46     ` Tvrtko Ursulin

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=YGxD3HZEZ1hoV7gj@intel.intel \
    --to=andi.shyti@intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eero.t.tamminen@intel.com \
    --cc=tvrtko.ursulin@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.