Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kahola <mika.kahola@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 03/11] drm/i915: HDMI pixel clock check
Date: Thu, 30 Jul 2015 13:28:29 +0300	[thread overview]
Message-ID: <1438252109.23191.11.camel@sorvi> (raw)
In-Reply-To: <20150730065422.GE6035@nuc-i3427.alporthouse.com>

On Thu, 2015-07-30 at 07:54 +0100, Chris Wilson wrote:
> On Thu, Jul 30, 2015 at 09:49:30AM +0300, Mika Kahola wrote:
> > It is possible the we request to have a mode that has
> > higher pixel clock than our HW can support. This patch
> > checks if requested pixel clock is lower than the one
> > supported by the HW. The requested mode is discarded
> > if we cannot support the requested pixel clock.
> > 
> > This patch applies to HDMI.
> > 
> > V2:
> > - removed computation for max dot clock
> > 
> > Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++-
> >  1 file changed, 8 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> > index 70bad5b..b85efaa 100644
> > --- a/drivers/gpu/drm/i915/intel_hdmi.c
> > +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> > @@ -1191,15 +1191,22 @@ intel_hdmi_mode_valid(struct drm_connector *connector,
> >  {
> >  	struct intel_hdmi *hdmi = intel_attached_hdmi(connector);
> >  	struct drm_device *dev = intel_hdmi_to_dev(hdmi);
> > +	struct drm_i915_private *dev_priv = to_i915(dev);
> >  	enum drm_mode_status status;
> >  	int clock;
> > +	int max_pixclk = dev_priv->max_dotclk;
> >  
> >  	if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
> >  		return MODE_NO_DBLESCAN;
> >  
> >  	clock = mode->clock;
> > -	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
> > +	if (mode->flags & DRM_MODE_FLAG_DBLCLK) {
> >  		clock *= 2;
> > +		max_pixclk *= 2;
> > +	}
> > +
> > +	if (clock > max_pixclk)
> > +		return MODE_CLOCK_HIGH;
> 
> Or do the test before the DBLCLK?
Yes, I could move the test before DBLCLK.

-Mika-

> -Chris
> 


_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-07-30 10:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30  6:49 [PATCH v2 00/11] Check pixel clock when setting mode Mika Kahola
2015-07-30  6:49 ` [PATCH v2 01/11] drm/i915: Store max dotclock Mika Kahola
2015-07-30  7:00   ` Chris Wilson
2015-07-30 10:27     ` Mika Kahola
2015-07-30  6:49 ` [PATCH v2 02/11] drm/i915: DisplayPort pixel clock check Mika Kahola
2015-07-30  6:49 ` [PATCH v2 03/11] drm/i915: HDMI " Mika Kahola
2015-07-30  6:54   ` Chris Wilson
2015-07-30 10:28     ` Mika Kahola [this message]
2015-07-30  6:49 ` [PATCH v2 04/11] drm/i915: LVDS " Mika Kahola
2015-07-30  6:49 ` [PATCH v2 05/11] drm/i915: SDVO " Mika Kahola
2015-07-30  6:49 ` [PATCH v2 06/11] drm/i915: DSI " Mika Kahola
2015-07-30  6:52   ` Chris Wilson
2015-07-30 10:39     ` Mika Kahola
2015-07-30  6:49 ` [PATCH v2 07/11] drm/i915: CRT " Mika Kahola
2015-07-30  6:49 ` [PATCH v2 08/11] drm/i915: TV " Mika Kahola
2015-07-30  6:49 ` [PATCH v2 09/11] drm/i915: DisplayPort-MST " Mika Kahola
2015-07-30  6:49 ` [PATCH v2 10/11] drm/i915: DVO " Mika Kahola
2015-07-30  6:49 ` [PATCH v2 11/11] drm/i915: Max DOT clock frequency to debugfs Mika Kahola

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=1438252109.23191.11.camel@sorvi \
    --to=mika.kahola@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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