From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: James Ausmus <james.ausmus@intel.com>
Cc: "Ville Syrjälä" <ville.syrjala@intel.com>,
intel-gfx@lists.freedesktop.org,
"Lucas De Marchi" <lucas.demarchi@intel.com>
Subject: Re: [PATCH 1/3] drm/i915: Extract SAGV block time function
Date: Fri, 27 Sep 2019 20:51:53 +0300 [thread overview]
Message-ID: <20190927175153.GW1208@intel.com> (raw)
In-Reply-To: <20190925203352.9827-2-james.ausmus@intel.com>
On Wed, Sep 25, 2019 at 01:33:50PM -0700, James Ausmus wrote:
> In prep for newer platforms having more complicated ways to determine
> the SAGV block time, extract the setting to a separate function. While
> we're at it, update the if ladder to follow the new gen -> old gen order
> preference, and warn on any non-specified gen.
>
> Cc: Ville Syrjälä <ville.syrjala@intel.com>
> Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> Signed-off-by: James Ausmus <james.ausmus@intel.com>
> ---
> drivers/gpu/drm/i915/intel_pm.c | 24 ++++++++++++++++++------
> 1 file changed, 18 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 6bed2ed14574..5ad72dcb0faa 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -3662,6 +3662,23 @@ intel_has_sagv(struct drm_i915_private *dev_priv)
> dev_priv->sagv_status != I915_SAGV_NOT_CONTROLLED;
> }
>
> +static int
> +intel_get_sagv_block_time_us(struct drm_i915_private *dev_priv)
The "_get_" in the name seems a bit superfluous.
> +{
> + int sagv_block_time_us = 1000; /* Default to unusable block time */
> +
> + if (IS_GEN(dev_priv, 11))
> + sagv_block_time_us = 10;
> + else if (IS_GEN(dev_priv, 10))
> + sagv_block_time_us = 20;
> + else if (IS_GEN(dev_priv, 9))
> + sagv_block_time_us = 30;
> + else
> + MISSING_CASE(INTEL_GEN(dev_priv));
> +
> + return sagv_block_time_us;
Could just return directly w/o the temp variable.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> +}
> +
> /*
> * SAGV dynamically adjusts the system agent voltage and clock frequencies
> * depending on power and performance requirements. The display engine access
> @@ -3755,12 +3772,7 @@ bool intel_can_enable_sagv(struct intel_atomic_state *state)
> if (!intel_has_sagv(dev_priv))
> return false;
>
> - if (IS_GEN(dev_priv, 9))
> - sagv_block_time_us = 30;
> - else if (IS_GEN(dev_priv, 10))
> - sagv_block_time_us = 20;
> - else
> - sagv_block_time_us = 10;
> + sagv_block_time_us = intel_get_sagv_block_time_us(dev_priv);
>
> /*
> * If there are no active CRTCs, no additional checks need be performed
> --
> 2.22.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-09-27 17:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-25 20:33 Add support for TGL in SAGV code paths James Ausmus
2019-09-25 20:33 ` [PATCH 1/3] drm/i915: Extract SAGV block time function James Ausmus
2019-09-27 17:51 ` Ville Syrjälä [this message]
2019-09-25 20:33 ` [PATCH 2/3] drm/i915/tgl: Read SAGV block time from PCODE James Ausmus
2019-09-27 18:01 ` Ville Syrjälä
2019-09-27 18:18 ` Ville Syrjälä
2019-09-25 20:33 ` [PATCH 3/3] drm/i915/tgl: Remove single pipe restriction from SAGV James Ausmus
2019-09-26 12:34 ` Ville Syrjälä
2019-09-27 17:16 ` James Ausmus
2019-09-25 21:02 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915: Extract SAGV block time function Patchwork
2019-09-25 21:25 ` ✓ Fi.CI.BAT: success " Patchwork
2019-09-26 16:23 ` ✓ 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=20190927175153.GW1208@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=james.ausmus@intel.com \
--cc=lucas.demarchi@intel.com \
--cc=ville.syrjala@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.