From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH 06/11] drm/i915: Check the framebuffer offset Date: Thu, 1 Nov 2012 16:09:04 +0200 Message-ID: <20121101140904.GN3791@intel.com> References: <1351698624-26626-1-git-send-email-ville.syrjala@linux.intel.com> <1351698624-26626-7-git-send-email-ville.syrjala@linux.intel.com> <20121031132612.4d24e3bf@jbarnes-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id DB1B99E828 for ; Thu, 1 Nov 2012 07:09:07 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20121031132612.4d24e3bf@jbarnes-desktop> 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: Jesse Barnes Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, Oct 31, 2012 at 01:26:12PM -0700, Jesse Barnes wrote: > On Wed, 31 Oct 2012 17:50:19 +0200 > ville.syrjala@linux.intel.com wrote: > = > > From: Ville Syrj=E4l=E4 > > = > > The current code can't deal with framebuffers with an offset. Return an > > error when trying to create such a framebuffer until the rest of the > > code is fixed to handle them. > > = > > Signed-off-by: Ville Syrj=E4l=E4 > > --- > > = > > I had an earlier version that actually added the handling for the offse= ts, > > but as I still haven't managed to write test cases for that, I decided > > that just refusing any offset is a good enough solution for now. > > = > > drivers/gpu/drm/i915/intel_display.c | 4 ++++ > > 1 files changed, 4 insertions(+), 0 deletions(-) > > = > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i91= 5/intel_display.c > > index f431f2a..a3496f5 100644 > > --- a/drivers/gpu/drm/i915/intel_display.c > > +++ b/drivers/gpu/drm/i915/intel_display.c > > @@ -8276,6 +8276,10 @@ int intel_framebuffer_init(struct drm_device *de= v, > > return -EINVAL; > > } > > = > > + /* FIXME need to adjust LINOFF/TILEOFF accordingly. */ > > + if (mode_cmd->offsets[0] !=3D 0) > > + return -EINVAL; > > + > > ret =3D drm_framebuffer_init(dev, &intel_fb->base, &intel_fb_funcs); > > if (ret) { > > DRM_ERROR("framebuffer init failed %d\n", ret); > = > Userspace doesn't use this today at all even in the panning case? If it does, then the user is going to be upset when nothing happens. Only the x/y offsets are effective with the current code. > I > know it worked at one point at least, but that may have been back in > the UMS days... Before my time. -- = Ville Syrj=E4l=E4 Intel OTC