All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Imre Deak <imre.deak@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915: vlv: fix cdclk setting during modeset while suspended
Date: Thu, 20 Nov 2014 16:49:20 +0200	[thread overview]
Message-ID: <20141120144920.GY10649@intel.com> (raw)
In-Reply-To: <1416407138-3262-2-git-send-email-imre.deak@intel.com>

On Wed, Nov 19, 2014 at 04:25:37PM +0200, Imre Deak wrote:
> Currently after doing DPMS-OFF on all outputs CDCLK won't be set to its
> minimum value as it should. A subsequent modeset to turn off all outputs
> will thus run with all power domains disabled, and notice that it needs
> to change CDCLK to its minimum value. Since the power domains are
> disabled this will emit a register-access-while-suspended WARN and fail
> to set the minimum freq.
> 
> The proper solution for this is to set the minimum frequency during
> DPMS-OFF. That needs a bigger rework that would take into account the
> user DPMS setting too during the calculation of the new modesetting
> configuration. Until that's done this stop-gap solution gets the PIPE-A
> power domain during setting the CDCLK; this domain covers the HW blocks
> needed for this.
> 
> Idea to use PIPE-A domain from Ville.
> 
> Testcase: igt/pm_rpm
> Reference: https://bugs.freedesktop.org/show_bug.cgi?id=82939
> Signed-off-by: Imre Deak <imre.deak@intel.com>

Yeah, not exactly pretty but rearranging the DPMS code seems like a
fairly sizeable task, so I think adding a kludge in the meantime is
acceptable.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/intel_display.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 9de2f69..6f29a72 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -4939,10 +4939,23 @@ static void valleyview_modeset_global_resources(struct drm_device *dev)
>  	int req_cdclk = valleyview_calc_cdclk(dev_priv, max_pixclk);
>  
>  	if (req_cdclk != dev_priv->vlv_cdclk_freq) {
> +		/*
> +		 * FIXME: We can end up here with all power domains off, yet
> +		 * with a CDCLK frequency other than the minimum. To account
> +		 * for this take the PIPE-A power domain, which covers the HW
> +		 * blocks needed for the following programming. This can be
> +		 * removed once it's guaranteed that we get here either with
> +		 * the minimum CDCLK set, or the required power domains
> +		 * enabled.
> +		 */
> +		intel_display_power_get(dev_priv, POWER_DOMAIN_PIPE_A);
> +
>  		if (IS_CHERRYVIEW(dev))
>  			cherryview_set_cdclk(dev, req_cdclk);
>  		else
>  			valleyview_set_cdclk(dev, req_cdclk);
> +
> +		intel_display_power_put(dev_priv, POWER_DOMAIN_PIPE_A);
>  	}
>  }
>  
> -- 
> 1.8.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2014-11-20 14:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 14:25 [PATCH 0/2] vlv: fix some runtime PM errors Imre Deak
2014-11-19 14:25 ` [PATCH 1/2] drm/i915: vlv: fix cdclk setting during modeset while suspended Imre Deak
2014-11-20 14:49   ` Ville Syrjälä [this message]
2014-11-19 14:25 ` [PATCH 2/2] drm/i915: vlv: increase timeout when setting idle GPU freq Imre Deak
2014-11-20 14:12   ` Daniel Vetter
2014-11-20 14:52   ` Ville Syrjälä
2014-11-21  1:15   ` [PATCH 2/2] drm/i915: vlv: increase timeout when shuang.he

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=20141120144920.GY10649@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=imre.deak@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 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.