From: Imre Deak <imre.deak@intel.com>
To: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/5] drm/i915: use the SW-based pw->hw_enabled check instead of reading registers
Date: Thu, 23 Aug 2018 16:48:47 +0300 [thread overview]
Message-ID: <20180823134847.GD1800@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <20180820233139.11936-5-paulo.r.zanoni@intel.com>
On Mon, Aug 20, 2018 at 04:31:39PM -0700, Paulo Zanoni wrote:
> I can't find a reason why we would want to call is_enabled(), which
> does a register read, instead of just relying on our tracking with
> hw_enabled. Let's try to trust our hardware sync.
The software state is indirect, so not sure why we should check that
instead. The register read doesn't have considerable overhead and it's
not on a speed critical path anyway.
>
> Cc: Imre Deak <imre.deak@intel.com>
> Requested-by: José Roberto de Souza <jose.souza@intel.com>
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> ---
> drivers/gpu/drm/i915/intel_runtime_pm.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
> index f38a049861e6..76bb2e06fef1 100644
> --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
> +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
> @@ -670,9 +670,8 @@ static void assert_can_enable_dc5(struct drm_i915_private *dev_priv)
> {
> struct i915_power_well *pg2 = lookup_power_well(dev_priv,
> SKL_DISP_PW_2);
> - bool pg2_enabled = pg2->desc->ops->is_enabled(dev_priv, pg2);
>
> - WARN_ONCE(pg2_enabled, "PG2 not disabled to enable DC5.\n");
> + WARN_ONCE(pg2->hw_enabled, "PG2 not disabled to enable DC5.\n");
>
> WARN_ONCE((I915_READ(DC_STATE_EN) & DC_STATE_EN_UPTO_DC5),
> "DC5 already programmed to be enabled.\n");
> --
> 2.14.4
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-08-23 13:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-20 23:31 [PATCH 1/5] drm/i915: kill intel_display_power_well_is_enabled() Paulo Zanoni
2018-08-20 23:31 ` [PATCH 2/5] drm/i915: WARN() if we can't lookup_power_well() Paulo Zanoni
2018-08-23 13:41 ` Imre Deak
2018-08-20 23:31 ` [PATCH 3/5] drm/i915: use for_each_power_well in lookup_power_well() Paulo Zanoni
2018-08-20 23:31 ` [PATCH 4/5] drm/i915: move lookup_power_well() up Paulo Zanoni
2018-08-23 13:44 ` Imre Deak
2018-08-20 23:31 ` [PATCH 5/5] drm/i915: use the SW-based pw->hw_enabled check instead of reading registers Paulo Zanoni
2018-08-23 13:48 ` Imre Deak [this message]
2018-08-20 23:37 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915: kill intel_display_power_well_is_enabled() Patchwork
2018-08-20 23:55 ` ✓ Fi.CI.BAT: success " Patchwork
2018-08-21 0:45 ` ✓ Fi.CI.IGT: " 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=20180823134847.GD1800@ideak-desk.fi.intel.com \
--to=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=paulo.r.zanoni@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).