All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>,
	Paulo Zanoni <paulo.r.zanoni@intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 2/3] drm/i915: Track minimum acceptable cdclk instead of "minimum dotclock"
Date: Fri, 7 Jul 2017 21:28:44 +0300	[thread overview]
Message-ID: <20170707182844.GH12629@intel.com> (raw)
In-Reply-To: <20170707102450.3152-2-ville.syrjala@linux.intel.com>

On Fri, Jul 07, 2017 at 01:24:49PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Make the min_pixclk thing less confusing by changing it to track
> the minimum acceptable cdclk frequency instead. This means moving
> the application of the guardbands to a slightly higher level from
> the low level platform specific calc_cdclk() functions.
> 
> The immediate benefit is elimination of the confusing 2x factors
> on GLK/CNL+ in the audio workarounds (which stems from the fact
> that the pipes produce two pixels per clock).
> 
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.h      |  12 ++-
>  drivers/gpu/drm/i915/intel_cdclk.c   | 179 +++++++++++++++++------------------
>  drivers/gpu/drm/i915/intel_display.c |  21 ++--
>  drivers/gpu/drm/i915/intel_drv.h     |   4 +-
>  4 files changed, 107 insertions(+), 109 deletions(-)
>
<snip>
> diff --git a/drivers/gpu/drm/i915/intel_cdclk.c b/drivers/gpu/drm/i915/intel_cdclk.c
> index 9e0deebae279..82e5bc967cca 100644
> --- a/drivers/gpu/drm/i915/intel_cdclk.c
> +++ b/drivers/gpu/drm/i915/intel_cdclk.c
> @@ -1732,21 +1723,47 @@ void intel_set_cdclk(struct drm_i915_private *dev_priv,
>  	dev_priv->display.set_cdclk(dev_priv, cdclk_state);
>  }
>  
> -static int bdw_adjust_min_pipe_pixel_rate(struct intel_crtc_state *crtc_state,
> -					  int pixel_rate)
> +static int intel_min_cdclk(struct drm_i915_private *dev_priv,
> +			   int pixel_rate)
> +{
> +	if (INTEL_GEN(dev_priv) >= 10)
> +		return DIV_ROUND_UP(pixel_rate, 2);

Rodrigo, so this part here could be why your CNL no longer works.

If you have time to try it, then I think changing this to just
'return pixel_rate;' should get us back to the old behaviour.

> +	else if (IS_GEMINILAKE(dev_priv))
> +		/*
> +		 * FIXME: Avoid using a pixel clock that is more than 99% of the cdclk
> +		 * as a temporary workaround. Use a higher cdclk instead. (Note that
> +		 * intel_compute_max_dotclk() limits the max pixel clock to 99% of max
> +		 * cdclk.)
> +		 */
> +		return DIV_ROUND_UP(pixel_rate * 100, 2 * 99);
> +	else if (IS_GEN9(dev_priv) ||
> +		 IS_BROADWELL(dev_priv) || IS_HASWELL(dev_priv))
> +		return pixel_rate;
> +	else if (IS_CHERRYVIEW(dev_priv))
> +		return DIV_ROUND_UP(pixel_rate * 100, 95);
> +	else
> +		return DIV_ROUND_UP(pixel_rate * 100, 90);
> +}
> +

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

  reply	other threads:[~2017-07-07 18:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-07 10:24 [PATCH 1/3] drm/i915: Fix up CNL cdclk related limits ville.syrjala
2017-07-07 10:24 ` [PATCH 2/3] drm/i915: Track minimum acceptable cdclk instead of "minimum dotclock" ville.syrjala
2017-07-07 18:28   ` Ville Syrjälä [this message]
2017-07-10 13:02   ` [PATCH v2 " ville.syrjala
2017-07-07 10:24 ` [PATCH 3/3] drm/i915: Consolidate max_cdclk_freq check in intel_crtc_compute_min_cdclk() ville.syrjala
2017-07-07 11:13 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Fix up CNL cdclk related limits Patchwork
2017-07-07 17:54 ` [PATCH 1/3] " Rodrigo Vivi
2017-07-07 18:24   ` Ville Syrjälä
2017-07-07 18:33     ` Pandiyan, Dhinakaran
2017-07-10 13:02 ` [PATCH v2 " ville.syrjala
2017-07-10 17:34   ` Pandiyan, Dhinakaran
2017-07-10 18:11     ` Ville Syrjälä
2017-07-10 18:36       ` Pandiyan, Dhinakaran
2017-07-10 17:34   ` Rodrigo Vivi
2017-07-10 17:55     ` Ville Syrjälä
2017-07-10 13:21 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/3] drm/i915: Fix up CNL cdclk related limits (rev3) Patchwork

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=20170707182844.GH12629@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dhinakaran.pandiyan@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.com \
    --cc=rodrigo.vivi@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 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.