dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 0/3] drm: Basic mode sanity checks
Date: Wed, 17 Dec 2014 18:30:12 +0100	[thread overview]
Message-ID: <20141217173012.GY2711@phenom.ffwll.local> (raw)
In-Reply-To: <CADnq5_NxzryO34GFgXYnkAtMFLDr49E+Ve5BLdY3MMi2p_2Knw@mail.gmail.com>

On Wed, Dec 17, 2014 at 12:09:47PM -0500, Alex Deucher wrote:
> On Wed, Dec 17, 2014 at 6:56 AM,  <ville.syrjala@linux.intel.com> wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > We had a bug in i915 land recently where X passed in a zeroed mode with
> > mode_valid=1 to setcrtc. That didn't go down so well and caused a
> > div-by-zero in i915.
> >
> > For a long time I've been thinking that we need some real checks to
> > validate the modes we feed into the hardware. I started to sketch out
> > something for that but it quickly turned into a bit of a nightmare
> > with the whole panel fitter, stereo 3D, SDVO etc. special cases we
> > have in i915.
> >
> > So I gave up on that for now, and instead cooked up this small series
> > to add some basic sanity checks to the mode validation, and also apply
> > the same sanity checks to user provided modes. This is enough to
> > prevent the div-by-zero in i915 with buggy X.
> >
> > The risk is that we start to reject some modes that more or less worked
> > by accident before. Given how lax we've been in handling the panel fitter
> > on i915 for instance, this could be a real problem if people have been
> > useing custom modes that have been filled out only partially. But I'm
> > hoping the number of users doing that is so small that we can risk it.
> >
> > The other concern is drivers which might also provide funky modes from
> > their .get_modes(). I tried to look at all the drivers a bit, and most
> > produce modes via EDID, CVT, DMT, or drm_display_mode_from_videomode().
> > All of those look safe, except mode->clock might be an issue with
> > drm_display_mode_from_videomode(), but hopefully there's some kind of
> > clock provided in most cases. I didn't dig through all the nooks and
> > crannies in all drivers though, so may have missed something.
> 
> For the series:
> 
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

All pulled into my drm misc branch.

Thanks, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2014-12-17 17:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-17 11:56 [PATCH 0/3] drm: Basic mode sanity checks ville.syrjala
2014-12-17 11:56 ` [PATCH 1/3] drm: Reorganize probed mode validation ville.syrjala
2014-12-17 11:56 ` [PATCH 2/3] drm: Perform basic sanity checks on probed modes ville.syrjala
2014-12-17 11:56 ` [PATCH 3/3] drm: Do basic sanity checks for user modes ville.syrjala
2014-12-17 17:09 ` [PATCH 0/3] drm: Basic mode sanity checks Alex Deucher
2014-12-17 17:30   ` Daniel Vetter [this message]
2014-12-19 15:46     ` Adam Jackson
2014-12-19 16:54       ` Ville Syrjälä

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=20141217173012.GY2711@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=alexdeucher@gmail.com \
    --cc=dri-devel@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