From: Daniel Vetter <daniel@ffwll.ch>
To: Ben Widawsky <benjamin.widawsky@intel.com>
Cc: Intel GFX <intel-gfx@lists.freedesktop.org>,
Ben Widawsky <ben@bwidawsk.net>
Subject: Re: [PATCH 7/7] drm/i915: Mark gen specific conditions 'likely'
Date: Sat, 5 Oct 2013 14:37:27 +0200 [thread overview]
Message-ID: <20131005123727.GV31334@phenom.ffwll.local> (raw)
In-Reply-To: <1380946975-14431-7-git-send-email-benjamin.widawsky@intel.com>
On Fri, Oct 04, 2013 at 09:22:55PM -0700, Ben Widawsky wrote:
> Now that MMIO has been split up into gen specific functions it is
> obvious when HAS_FPGA_DBG_UNCLAIMED, HAS_FORCE_WAKE are needed.
>
> I'm a bit on the fence whether or not to even have the checks at all.
> For now I am leaving them there because I think they are valuable for
> debug, and early silicon bringup. In these cases, one could hardcode the
> appropriate values, and not have forcewake, and fpga_dbg.
>
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Can't we just completely fold away the gen/platform checks now?
-Daniel
> ---
> 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 cd56212..30fbee0 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -307,7 +307,7 @@ void gen6_gt_force_wake_put(struct drm_i915_private *dev_priv)
>
> /* We give fast paths for the really cool registers */
> #define NEEDS_FORCE_WAKE(dev_priv, reg) \
> - ((HAS_FORCE_WAKE((dev_priv)->dev)) && \
> + ((likely(HAS_FORCE_WAKE((dev_priv)->dev))) && \
> ((reg) < 0x40000) && \
> ((reg) != FORCEWAKE))
>
> @@ -323,7 +323,7 @@ ilk_dummy_write(struct drm_i915_private *dev_priv)
> static void
> hsw_unclaimed_reg_clear(struct drm_i915_private *dev_priv, u32 reg)
> {
> - if (HAS_FPGA_DBG_UNCLAIMED(dev_priv->dev) &&
> + if (likely(HAS_FPGA_DBG_UNCLAIMED(dev_priv->dev)) &&
> (__raw_i915_read32(dev_priv, FPGA_DBG) & FPGA_DBG_RM_NOCLAIM)) {
> DRM_ERROR("Unknown unclaimed register before writing to %x\n",
> reg);
> @@ -334,7 +334,7 @@ hsw_unclaimed_reg_clear(struct drm_i915_private *dev_priv, u32 reg)
> static void
> hsw_unclaimed_reg_check(struct drm_i915_private *dev_priv, u32 reg)
> {
> - if (HAS_FPGA_DBG_UNCLAIMED(dev_priv->dev) &&
> + if (likely(HAS_FPGA_DBG_UNCLAIMED(dev_priv->dev)) &&
> (__raw_i915_read32(dev_priv, FPGA_DBG) & FPGA_DBG_RM_NOCLAIM)) {
> DRM_ERROR("Unclaimed write to %x\n", reg);
> __raw_i915_write32(dev_priv, FPGA_DBG, FPGA_DBG_RM_NOCLAIM);
> --
> 1.8.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2013-10-05 12:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-05 4:22 [PATCH 1/7] drm/i915: Prevent using uninitialized MMIO funcs Ben Widawsky
2013-10-05 4:22 ` [PATCH 2/7] drm/i915: Move edram detection early_sanitize Ben Widawsky
2013-10-05 4:22 ` [PATCH 3/7] drm/i915: Create MMIO virtual functions Ben Widawsky
2013-10-05 4:22 ` [PATCH 4/7] drm/i915: Extra common MMIO lines Ben Widawsky
2013-10-05 4:24 ` [PATCH 4/7] [v2] drm/i915: Extract " Ben Widawsky
2013-10-05 4:22 ` [PATCH 5/7] drm/i915: Create GEN specific read MMIO Ben Widawsky
2013-10-05 4:22 ` [PATCH 6/7] drm/i915: Create GEN specific write MMIO Ben Widawsky
2013-10-05 4:22 ` [PATCH 7/7] drm/i915: Mark gen specific conditions 'likely' Ben Widawsky
2013-10-05 12:37 ` Daniel Vetter [this message]
2013-10-06 0:57 ` [PATCH 7/7] drm/i915: Remove gen specific checks in MMIO Ben Widawsky
2013-10-08 13:38 ` [PATCH 1/7] drm/i915: Prevent using uninitialized MMIO funcs Damien Lespiau
2013-10-08 15:23 ` 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=20131005123727.GV31334@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=ben@bwidawsk.net \
--cc=benjamin.widawsky@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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