All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Lespiau <damien.lespiau@intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: fix hdmi portclock limits
Date: Mon, 22 Jul 2013 12:17:12 +0100	[thread overview]
Message-ID: <20130722111712.GC8706@strange.amr.corp.intel.com> (raw)
In-Reply-To: <1374473110-21638-1-git-send-email-daniel.vetter@ffwll.ch>

On Mon, Jul 22, 2013 at 08:05:10AM +0200, Daniel Vetter wrote:
> +static int hdmi_portclock_limit(struct intel_hdmi *hdmi)
> +{
> +	struct drm_device *dev = intel_hdmi_to_dev(hdmi);
> +
> +	if (IS_G4X(dev))
> +		return 165000;
> +	else if (IS_HASWELL(dev))
> +		return 340000;

I read 300MHz in the BSpec?

> +	else
> +		return 225000;
> +}
> +
>  static int intel_hdmi_mode_valid(struct drm_connector *connector,
>  				 struct drm_display_mode *mode)
>  {
> -	if (mode->clock > 165000)
> +	if (mode->clock > hdmi_portclock_limit(intel_attached_hdmi(connector)))
>  		return MODE_CLOCK_HIGH;
>  	if (mode->clock < 20000)
>  		return MODE_CLOCK_LOW;
> @@ -806,6 +818,7 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
>  	struct drm_device *dev = encoder->base.dev;
>  	struct drm_display_mode *adjusted_mode = &pipe_config->adjusted_mode;
>  	int clock_12bpc = pipe_config->requested_mode.clock * 3 / 2;
> +	int portclock_limit = hdmi_portclock_limit(intel_hdmi);
>  	int desired_bpp;
>  
>  	if (intel_hdmi->color_range_auto) {
> @@ -829,7 +842,7 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
>  	 * outputs. We also need to check that the higher clock still fits
>  	 * within limits.
>  	 */
> -	if (pipe_config->pipe_bpp > 8*3 && clock_12bpc <= 225000
> +	if (pipe_config->pipe_bpp > 8*3 && clock_12bpc <= portclock_limit
>  	    && HAS_PCH_SPLIT(dev)) {
>  		DRM_DEBUG_KMS("picking bpc to 12 for HDMI output\n");
>  		desired_bpp = 12*3;
> @@ -846,7 +859,7 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
>  		pipe_config->pipe_bpp = desired_bpp;
>  	}
>  
> -	if (adjusted_mode->clock > 225000) {
> +	if (adjusted_mode->clock > portclock_limit) {
>  		DRM_DEBUG_KMS("too high HDMI clock, rejecting mode\n");
>  		return false;
>  	}
> -- 
> 1.8.3.2
> 

-- 
Damien

  parent reply	other threads:[~2013-07-22 11:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-21 14:14 [PATCH] drm/i915: fix hdmi portclock limits on Haswell Daniel Vetter
2013-07-22  6:05 ` [PATCH] drm/i915: fix hdmi portclock limits Daniel Vetter
2013-07-22 11:11   ` Daniel Vetter
2013-07-22 11:17   ` Damien Lespiau [this message]
2013-07-22 14:36     ` Damien Lespiau
2013-07-22 16:02       ` Daniel Vetter
2013-07-22 16:24         ` Damien Lespiau
2013-07-22 16:35           ` 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=20130722111712.GC8706@strange.amr.corp.intel.com \
    --to=damien.lespiau@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --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.