public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>,
	intel-gfx@lists.freedesktop.org, stable@vger.kernel.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Allow user modes to exceed DVI 165MHz limit
Date: Thu, 27 Mar 2014 14:57:46 +0100	[thread overview]
Message-ID: <20140327135746.GC26878@phenom.ffwll.local> (raw)
In-Reply-To: <20140327110331.GQ21652@intel.com>

On Thu, Mar 27, 2014 at 01:03:31PM +0200, Ville Syrjälä wrote:
> On Thu, Mar 27, 2014 at 09:37:36AM +0000, Chris Wilson wrote:
> > On Thu, Mar 27, 2014 at 11:08:45AM +0200, ville.syrjala@linux.intel.com wrote:
> > > So relax the checks a bit, and apply the single-link DVI dotclock limit
> > > only when filtering the mode list, and ignore the limit when setting
> > > a user specified mode.
> > 
> > Mind enlightening me as to how this actually works? I thought all
> > display modes were validated before we used them, so how come this
> > sneaks through?
> > 
> > So it goes like this:
> > 
> > userspace calls GETCONNECTOR
> > kernel: fill_modes -> drm_helper_probe_single_connector_modes -> mode_valid?
> > 
> > but
> > 
> > userspace calls SETCRTC with a random mode
> > kernel: applies random mode without validation
> > 
> > Seriously we don't do any checking that the mode given to SETCRTC is
> > applicable and not in any way harmful before setting registers?
> 
> Pretty much. Calling our user mode validation even "minimal" is a bit
> of a stretch. And the checks we have in the .mode_valid() hooks are
> lacking as well.

I've had patches floating around which implemented mode_valid in terms of
compute_config (or well, mode_adjust as it was called back then). But
there are slight differences in semantics so that didn't pan out too well.

But yeah, encoders need to share the back-end mode checking functions
between mode_valid and compute_config otherwise we'll just let random gunk
get through.

Checking at the crtc level is better since modes without a valid pll
config won't get through. Well, if we'd compute the pll settings a bit
earlier ...
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2014-03-27 13:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-27  9:08 [PATCH] drm/i915: Allow user modes to exceed DVI 165MHz limit ville.syrjala
2014-03-27  9:37 ` [Intel-gfx] " Chris Wilson
2014-03-27 11:03   ` Ville Syrjälä
2014-03-27 13:57     ` Daniel Vetter [this message]
2014-04-11 14:28 ` [Intel-gfx] " Jani Nikula

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=20140327135746.GC26878@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stable@vger.kernel.org \
    --cc=ville.syrjala@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox