From: Deepak S <deepak.s@intel.com>
To: ville.syrjala@linux.intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/4] drm/i915: Use IS_BROADWELL() instead of IS_GEN8() in forcewake code
Date: Thu, 04 Sep 2014 17:19:42 +0530 [thread overview]
Message-ID: <540851D6.4040307@intel.com> (raw)
In-Reply-To: <1409742593-26698-2-git-send-email-ville.syrjala@linux.intel.com>
On Wednesday 03 September 2014 04:39 PM, ville.syrjala@linux.intel.com
wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> IS_GEN8() is a bad check in the forcewake code due to bdw vs. chv
> differences. Use IS_BROADWELL() instead.
>
> The only actual bug here is that we currently call
> __gen7_gt_force_wake_mt_reset() on chv. On the other places we
> have checked for chv before using IS_GEN8(), but change them
> to use IS_BROADWELL() anyway to reduce the chance of accidents in the
> future.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_uncore.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index e81bc3b..918b761 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -101,7 +101,7 @@ static void __gen7_gt_force_wake_mt_get(struct drm_i915_private *dev_priv,
> {
> u32 forcewake_ack;
>
> - if (IS_HASWELL(dev_priv->dev) || IS_GEN8(dev_priv->dev))
> + if (IS_HASWELL(dev_priv->dev) || IS_BROADWELL(dev_priv->dev))
> forcewake_ack = FORCEWAKE_ACK_HSW;
> else
> forcewake_ack = FORCEWAKE_MT_ACK;
> @@ -334,7 +334,7 @@ void intel_uncore_forcewake_reset(struct drm_device *dev, bool restore)
> else if (IS_GEN6(dev) || IS_GEN7(dev))
> __gen6_gt_force_wake_reset(dev_priv);
>
> - if (IS_IVYBRIDGE(dev) || IS_HASWELL(dev) || IS_GEN8(dev))
> + if (IS_IVYBRIDGE(dev) || IS_HASWELL(dev) || IS_BROADWELL(dev))
> __gen7_gt_force_wake_mt_reset(dev_priv);
>
> if (restore) { /* If reset with a user forcewake, try to restore */
> @@ -838,7 +838,7 @@ void intel_uncore_init(struct drm_device *dev)
> if (IS_VALLEYVIEW(dev)) {
> dev_priv->uncore.funcs.force_wake_get = __vlv_force_wake_get;
> dev_priv->uncore.funcs.force_wake_put = __vlv_force_wake_put;
> - } else if (IS_HASWELL(dev) || IS_GEN8(dev)) {
> + } else if (IS_HASWELL(dev) || IS_BROADWELL(dev)) {
> dev_priv->uncore.funcs.force_wake_get = __gen7_gt_force_wake_mt_get;
> dev_priv->uncore.funcs.force_wake_put = __gen7_gt_force_wake_mt_put;
> } else if (IS_IVYBRIDGE(dev)) {
Yup I Agree :)
Reviewed-by: Deepak S <deepak.s@linux.intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2014-09-03 11:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-03 11:09 [PATCH 1/4] drm/i915: Don't call gen8_fbc_sw_flush() on chv ville.syrjala
2014-09-03 11:09 ` [PATCH 2/4] drm/i915: Use IS_BROADWELL() instead of IS_GEN8() in forcewake code ville.syrjala
2014-09-04 11:49 ` Deepak S [this message]
2014-09-03 11:09 ` [PATCH 3/4] drm/i915: Use HAS_GMCH_DISPLAY un underrun reporting code ville.syrjala
2014-09-03 11:09 ` [PATCH 4/4] drm/i915: Check of !HAS_PCH_SPLIT() in PCH transcoder funcs ville.syrjala
2014-09-03 13:15 ` Daniel Vetter
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=540851D6.4040307@intel.com \
--to=deepak.s@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox