All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: lucas.demarchi@intel.com, Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [RFC 8/8] drm/i915: Simplify intel_has_sagv function.
Date: Fri, 19 Oct 2018 11:15:15 +0300	[thread overview]
Message-ID: <87in1ygxnw.fsf@intel.com> (raw)
In-Reply-To: <20181018233447.5187-9-rodrigo.vivi@intel.com>

On Thu, 18 Oct 2018, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> Let's just handle SKL as special case instead of listing
> platform by platform.
>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 5663b7059467..97f191b081e0 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -3612,15 +3612,11 @@ static bool skl_needs_memory_bw_wa(struct intel_atomic_state *state)
>  static bool
>  intel_has_sagv(struct drm_i915_private *dev_priv)
>  {
> -	if (INTEL_GEN(dev_priv) >= 10 ||
> -	    IS_KABYLAKE(dev_priv) || IS_COFFEELAKE(dev_priv))
> -		return true;
> -
>  	if (IS_SKYLAKE(dev_priv) &&
>  	    dev_priv->sagv_status != I915_SAGV_NOT_CONTROLLED)
>  		return true;
>  
> -	return false;
> +	return IS_GEN9_BC(dev_priv) || INTEL_GEN(dev_priv) >= 10;
>  }

You can go one step further and remove the Skylake special case even for
I915_SAGV_NOT_CONTROLLED:

	return (IS_GEN9_BC(dev_priv) || INTEL_GEN(dev_priv) >= 10) && 
		dev_priv->sagv_status != I915_SAGV_NOT_CONTROLLED;

dev_priv->sagv_status == I915_SAGV_NOT_CONTROLLED only on SKL, but this
function doesn't have to know that.

BR,
Jani.

>  
>  /*

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-10-19  8:15 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18 23:34 [RFC 0/8] re-organize a bit gen10 and gen11 Rodrigo Vivi
2018-10-18 23:34 ` [RFC 1/8] drm/i915: Make number of ddi ports explicit Rodrigo Vivi
2018-10-18 23:34 ` [RFC 2/8] drm/i915: Use the ddi_ports info to kill ugly CNL_WITH_PORT_F Rodrigo Vivi
2018-10-19  7:39   ` Jani Nikula
2018-10-19  8:27     ` Daniel Vetter
2018-10-19 16:46     ` Lucas De Marchi
2018-10-19 17:40       ` Rodrigo Vivi
2018-10-18 23:34 ` [RFC 3/8] drm/i915/gen10: Prefer gen number than platform codename Rodrigo Vivi
2018-10-19  7:48   ` Jani Nikula
2018-10-19 10:37   ` Ville Syrjälä
2018-10-18 23:34 ` [RFC 4/8] drm/i915: Group gen 10 display Rodrigo Vivi
2018-10-19  8:03   ` Jani Nikula
2018-10-19  8:30     ` Daniel Vetter
2018-10-19  9:32       ` Joonas Lahtinen
2018-10-19 10:33       ` Ville Syrjälä
2018-10-19 16:41         ` Rodrigo Vivi
2018-10-19 17:45           ` Ville Syrjälä
2018-10-19 16:59         ` Lucas De Marchi
2018-10-19 16:52     ` Lucas De Marchi
2018-10-18 23:34 ` [RFC 5/8] drm/i915/gen11+: Prefer gen over platform codename Rodrigo Vivi
2018-10-19  8:05   ` Jani Nikula
2018-10-18 23:34 ` [RFC 6/8] drm/i915: Consolidate cdclk hooks Rodrigo Vivi
2018-10-18 23:34 ` [RFC 7/8] drm/i915: Sort platform if cases from newer-to-older Rodrigo Vivi
2018-10-19  8:07   ` Jani Nikula
2018-10-18 23:34 ` [RFC 8/8] drm/i915: Simplify intel_has_sagv function Rodrigo Vivi
2018-10-19  8:15   ` Jani Nikula [this message]
2018-10-18 23:47 ` ✗ Fi.CI.CHECKPATCH: warning for re-organize a bit gen10 and gen11 Patchwork
2018-10-18 23:50 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-10-19  0:04 ` ✗ Fi.CI.BAT: failure " 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=87in1ygxnw.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=rodrigo.vivi@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.