From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH] drm/i915: Detect invalid scanout pitches Date: Thu, 20 Jun 2013 13:27:14 +0100 Message-ID: <20130620122714.GA8936@cantiga.alporthouse.com> References: <1371655244-8368-1-git-send-email-chris@chris-wilson.co.uk> <1371657034-9189-1-git-send-email-chris@chris-wilson.co.uk> <20130620081716.GH5004@intel.com> <20130620091436.GC18932@cantiga.alporthouse.com> <20130620102909.GI5004@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from fireflyinternet.com (s16502780.onlinehome-server.info [87.106.93.118]) by gabe.freedesktop.org (Postfix) with ESMTP id 844DCE5BF3 for ; Thu, 20 Jun 2013 05:27:18 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130620102909.GI5004@intel.com> 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: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Jun 20, 2013 at 01:29:10PM +0300, Ville Syrj=E4l=E4 wrote: > On Thu, Jun 20, 2013 at 10:14:36AM +0100, Chris Wilson wrote: > > On Thu, Jun 20, 2013 at 11:17:16AM +0300, Ville Syrj=E4l=E4 wrote: > > > We already have a bit of pitch checking in intel_framebuffer_init(). > > > In fact there's a FIXME about pre-ilk limits there. > > = > > It looks tidier to fix that check. We still need to double check the > > values though as the tiling mode is independent of the fb config and may > > be changed by the user. > = > True, some checking needs to be done after pinning. > = > I guess we could have one function that has the checks, and just call it > from both places. I'm thinking we note the tiling (and anything else of significance) during framebuffer_init() and reject the set-base if the object changes. I don't think any userspace depends upon being able to change the object after AddFB, and I don't think we want to allow the fb/obj to so easily become inconsistent. -Chris -- = Chris Wilson, Intel Open Source Technology Centre