Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Damien Lespiau <damien.lespiau@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/6] drm/i915: Introduce HAS_FPGA_DBG_UNCLAIMED()
Date: Tue, 23 Apr 2013 10:28:38 +0300	[thread overview]
Message-ID: <87ehe1zowp.fsf@intel.com> (raw)
In-Reply-To: <1366652441-2511-6-git-send-email-damien.lespiau@intel.com>

On Mon, 22 Apr 2013, Damien Lespiau <damien.lespiau@intel.com> wrote:
> Let's introduce one more of those orthogonal feature macros. This should
> hopefully make the code more readable and make things easier for new platform
> enabling.
>
> This time, HAS_FPGA_DBG_UNCLAIMED() is true for platforms that have bit
> 31 of FPGA_DBG able to signal unclaimed writes.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_dma.c | 2 +-
>  drivers/gpu/drm/i915/i915_drv.c | 4 ++--
>  drivers/gpu/drm/i915/i915_drv.h | 1 +
>  3 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index 24b9e8b..74f2247 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -1468,7 +1468,7 @@ static void intel_early_sanitize_regs(struct drm_device *dev)
>  {
>  	struct drm_i915_private *dev_priv = dev->dev_private;
>  
> -	if (IS_HASWELL(dev))
> +	if (HAS_FPGA_DBG_UNCLAIMED(dev))
>  		I915_WRITE_NOTRACE(FPGA_DBG, FPGA_DBG_RM_NOCLAIM);
>  }
>  
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 564d4c6..896b904 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1205,7 +1205,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 (IS_HASWELL(dev_priv->dev) &&
> +	if (HAS_FPGA_DBG_UNCLAIMED(dev_priv->dev) &&
>  	    (I915_READ_NOTRACE(FPGA_DBG) & FPGA_DBG_RM_NOCLAIM)) {
>  		DRM_ERROR("Unknown unclaimed register before writing to %x\n",
>  			  reg);
> @@ -1216,7 +1216,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 (IS_HASWELL(dev_priv->dev) &&
> +	if (HAS_FPGA_DBG_UNCLAIMED(dev_priv->dev) &&
>  	    (I915_READ_NOTRACE(FPGA_DBG) & FPGA_DBG_RM_NOCLAIM)) {
>  		DRM_ERROR("Unclaimed write to %x\n", reg);
>  		I915_WRITE_NOTRACE(FPGA_DBG, FPGA_DBG_RM_NOCLAIM);
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 652b168..c5f0778 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1369,6 +1369,7 @@ struct drm_i915_file_private {
>  
>  #define HAS_DDI(dev)		(INTEL_INFO(dev)->has_ddi)
>  #define HAS_POWER_WELL(dev)	(IS_HASWELL(dev))
> +#define HAS_FPGA_DBG_UNCLAIMED(dev)	(IS_HASWELL(dev))
>  
>  #define INTEL_PCH_DEVICE_ID_MASK		0xff00
>  #define INTEL_PCH_IBX_DEVICE_ID_TYPE		0x3b00
> -- 
> 1.8.1.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2013-04-23  7:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-22 17:40 Try to make the device info flags a bit more maintainable Damien Lespiau
2013-04-22 17:40 ` [PATCH 1/6] drm/i915: Turn DEV_INFO_FLAGS into for foreach style macro Damien Lespiau
2013-04-23  7:20   ` Jani Nikula
2013-04-23  7:31     ` Jani Nikula
2013-04-23 11:13       ` [PATCH v2] drm/i915: Turn DEV_INFO_FLAGS into " Damien Lespiau
2013-04-23 15:37         ` [PATCH 1/6 v3] drm/i915: Turn DEV_INFO_FLAGS into a " Damien Lespiau
2013-04-23 11:08     ` [PATCH 1/6] drm/i915: Turn DEV_INFO_FLAGS into for " Damien Lespiau
2013-04-22 17:40 ` [PATCH 2/6] drm/i915: Replace the line of %s by a DEV_INFO_FOR_EACH_FLAG() invocation Damien Lespiau
2013-04-23  7:22   ` Jani Nikula
2013-04-23 15:38   ` [PATCH 2/6 v2] " Damien Lespiau
2013-04-22 17:40 ` [PATCH 3/6] drm/i915: Use DEV_INFO_FOR_EACH_FLAG() to declare flags as well Damien Lespiau
2013-04-23  7:25   ` Jani Nikula
2013-04-22 17:40 ` [PATCH 4/6] drm/i915: Turn HAS_DDI() into a device_info flag Damien Lespiau
2013-04-23  7:27   ` Jani Nikula
2013-04-22 17:40 ` [PATCH 5/6] drm/i915: Introduce HAS_FPGA_DBG_UNCLAIMED() Damien Lespiau
2013-04-23  7:28   ` Jani Nikula [this message]
2013-04-22 17:40 ` [PATCH 6/6] drm/i915: Turn HAS_FPGA_DBG_UNCLAIMED into a device_info flag Damien Lespiau
2013-04-23  7:29   ` Jani Nikula
2013-04-23 16:30     ` 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=87ehe1zowp.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=damien.lespiau@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