From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jani Nikula Subject: Re: [PATCH 1/2] drm/i915: add sanity checks for hsync and htotal Date: Thu, 21 Jun 2012 10:33:12 +0300 Message-ID: <87zk7xw24n.fsf@intel.com> References: <68e45eed497d3fef1ee9756f4648eb97b7fdd4aa.1340222977.git.jani.nikula@intel.com> <1340228186.14667.7.camel@atropine> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 245F3A0ABD for ; Thu, 21 Jun 2012 00:30:42 -0700 (PDT) In-Reply-To: <1340228186.14667.7.camel@atropine> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Adam Jackson Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, 21 Jun 2012, Adam Jackson wrote: > On Wed, 2012-06-20 at 23:15 +0300, Jani Nikula wrote: >> Restrict hsync start, end, hdisplay and htotal to be according to hw >> spec. Through drm_mode_set_crtcinfo(), these will also limit hblank start, >> end. > > I'm pretty sure any physical hardware would balk at modes like this. > Virtual framebuffers probably wouldn't care, I guess. Still, seems > wrong to have this in i915 when it should be common. > > Is this a problem we've seen in the wild, or is this just paranoia? Looking at patch 2/2 I thought this would be a sensible thing to do. That patch adds a check for a condition people might expect to work, but doesn't, on Cantiga and later. It seemed a bit odd to merely add a check for hsync_start == hdisplay while hsync_start < hdisplay (and the other related conditions) would fail too. BR, Jani.