public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH 8/9] drm/i915: Do not enable package C8 on unsupported hardware
Date: Tue, 19 Nov 2013 13:02:15 +0100	[thread overview]
Message-ID: <20131119120215.GB5794@phenom.ffwll.local> (raw)
In-Reply-To: <1384828358-31563-9-git-send-email-rodrigo.vivi@gmail.com>

On Mon, Nov 18, 2013 at 06:32:37PM -0800, Rodrigo Vivi wrote:
> From: Chris Wilson <chris@chris-wilson.co.uk>
> 
> If the hardware does not support package C8, then do not even schedule
> work to enable it. Thereby we can eliminate a bunch of dangerous work.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>

Ok, I've merged this and the previous patch. Paulo, care to follow up with
an is_ult or something like that in the intel_info struct? We don't really
care about is_mobile on recent platforms any more, but having an is_ult
sounds useful ...
-Daniel

> ---
>  drivers/gpu/drm/i915/i915_drv.h      |  1 +
>  drivers/gpu/drm/i915/intel_display.c | 15 +++++++++++++++
>  2 files changed, 16 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index b12d942..bb6a302 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1791,6 +1791,7 @@ struct drm_i915_file_private {
>  #define HAS_POWER_WELL(dev)	(IS_HASWELL(dev))
>  #define HAS_FPGA_DBG_UNCLAIMED(dev)	(INTEL_INFO(dev)->has_fpga_dbg)
>  #define HAS_PSR(dev)		(IS_HASWELL(dev))
> +#define HAS_PC8(dev)		(IS_HASWELL(dev)) /* XXX HSW:ULX */
>  
>  #define INTEL_PCH_DEVICE_ID_MASK		0xff00
>  #define INTEL_PCH_IBX_DEVICE_ID_TYPE		0x3b00
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index cfcad82..b39d0df 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -6473,6 +6473,9 @@ static void __hsw_disable_package_c8(struct drm_i915_private *dev_priv)
>  
>  void hsw_enable_package_c8(struct drm_i915_private *dev_priv)
>  {
> +	if (!HAS_PC8(dev_priv->dev))
> +		return;
> +
>  	mutex_lock(&dev_priv->pc8.lock);
>  	__hsw_enable_package_c8(dev_priv);
>  	mutex_unlock(&dev_priv->pc8.lock);
> @@ -6480,6 +6483,9 @@ void hsw_enable_package_c8(struct drm_i915_private *dev_priv)
>  
>  void hsw_disable_package_c8(struct drm_i915_private *dev_priv)
>  {
> +	if (!HAS_PC8(dev_priv->dev))
> +		return;
> +
>  	mutex_lock(&dev_priv->pc8.lock);
>  	__hsw_disable_package_c8(dev_priv);
>  	mutex_unlock(&dev_priv->pc8.lock);
> @@ -6517,6 +6523,9 @@ static void hsw_update_package_c8(struct drm_device *dev)
>  	struct drm_i915_private *dev_priv = dev->dev_private;
>  	bool allow;
>  
> +	if (!HAS_PC8(dev_priv->dev))
> +		return;
> +
>  	if (!i915_enable_pc8)
>  		return;
>  
> @@ -6540,6 +6549,9 @@ done:
>  
>  static void hsw_package_c8_gpu_idle(struct drm_i915_private *dev_priv)
>  {
> +	if (!HAS_PC8(dev_priv->dev))
> +		return;
> +
>  	mutex_lock(&dev_priv->pc8.lock);
>  	if (!dev_priv->pc8.gpu_idle) {
>  		dev_priv->pc8.gpu_idle = true;
> @@ -6550,6 +6562,9 @@ static void hsw_package_c8_gpu_idle(struct drm_i915_private *dev_priv)
>  
>  static void hsw_package_c8_gpu_busy(struct drm_i915_private *dev_priv)
>  {
> +	if (!HAS_PC8(dev_priv->dev))
> +		return;
> +
>  	mutex_lock(&dev_priv->pc8.lock);
>  	if (dev_priv->pc8.gpu_idle) {
>  		dev_priv->pc8.gpu_idle = false;
> -- 
> 1.8.3.1
> 
> _______________________________________________
> 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

  reply	other threads:[~2013-11-19 12:01 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-19  2:32 [PATCH 0/9] drm-intel-collector - update Rodrigo Vivi
2013-11-19  2:32 ` [PATCH 1/9] drm/i915: Asynchronously perform the set-base for a simple modeset Rodrigo Vivi
2013-11-19  2:32 ` [PATCH 2/9] drm/i915: Fix gen3/4 vblank counter wraparound Rodrigo Vivi
2013-11-19 13:51   ` Chris Wilson
2013-11-19  2:32 ` [PATCH 3/9] drm/i915: Use frame counter for intel_wait_for_vblank() on CTG Rodrigo Vivi
2013-11-19 13:46   ` Chris Wilson
2013-11-19 16:38     ` Daniel Vetter
2013-11-19 17:26       ` Rodrigo Vivi
2013-11-19  2:32 ` [PATCH 4/9] drm/i915: Do hw quiescing first during unload Rodrigo Vivi
2013-11-19 17:43   ` Rodrigo Vivi
2013-11-19  2:32 ` [PATCH 5/9] drm/i915: print object bindings in debugfs Rodrigo Vivi
2013-11-19 13:52   ` Chris Wilson
2013-11-19 17:37     ` Rodrigo Vivi
2013-11-20 11:03       ` Chris Wilson
2013-11-20 16:52         ` Rodrigo Vivi
2013-11-19  2:32 ` [PATCH 6/9] drm/i915/vlv: enable HDMI audio for Valleyview2 Rodrigo Vivi
2013-11-19  2:32 ` [PATCH 7/9] drm/i915: Hold pc8 lock around toggling pc8.gpu_idle Rodrigo Vivi
2013-11-19  2:32 ` [PATCH 8/9] drm/i915: Do not enable package C8 on unsupported hardware Rodrigo Vivi
2013-11-19 12:02   ` Daniel Vetter [this message]
2013-11-19  2:32 ` [PATCH 9/9] drm/i915: Enable pipe gamma for sprites Rodrigo Vivi
2013-11-19 17:42   ` Rodrigo Vivi
2013-11-21  8:10     ` Daniel Vetter
2013-11-19  2:35 ` [PATCH 0/9] drm-intel-collector - update Rodrigo Vivi
2013-11-19  3:28 ` Ausmus, James
2013-11-19 17:25   ` Rodrigo Vivi
2013-11-19 17:44     ` Rodrigo Vivi

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=20131119120215.GB5794@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.com \
    --cc=rodrigo.vivi@gmail.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