From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 1/7] drm/i915: Fix the offset issue for the stolen GEM objects Date: Tue, 28 Jan 2014 09:04:01 +0100 Message-ID: <20140128080401.GL9772@phenom.ffwll.local> References: <1389610485-12084-1-git-send-email-akash.goel@intel.com> <20140127163041.18c71a4d@jbarnes-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f49.google.com (mail-ee0-f49.google.com [74.125.83.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 5474F1063D8 for ; Tue, 28 Jan 2014 00:04:08 -0800 (PST) Received: by mail-ee0-f49.google.com with SMTP id d17so28560eek.22 for ; Tue, 28 Jan 2014 00:04:07 -0800 (PST) Content-Disposition: inline In-Reply-To: <20140127163041.18c71a4d@jbarnes-desktop> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Jesse Barnes Cc: akash.goel@intel.com, intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Mon, Jan 27, 2014 at 04:30:41PM -0800, Jesse Barnes wrote: > On Mon, 13 Jan 2014 16:24:45 +0530 > akash.goel@intel.com wrote: > > > From: Akash Goel > > > > The 'offset' field of the 'scatterlist' structure was wrongly > > programmed with the offset value from the base of stolen area, > > whereas this field indicates the offset from where the interested > > data starts within the first PAGE pointed to by 'scattterlist' > > structure. As a result when a new GEM object allocated from stolen > > area is mapped to GTT, it could lead to an overwrite of GTT entries > > as the page count calculation will go wrong, refer the function > > 'sg_page_count'. > > > > v2: Modified the commit message. (Chris) > > > > Signed-off-by: Akash Goel > > --- > > drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c > > index fed87ec..1a24e84 100644 > > --- a/drivers/gpu/drm/i915/i915_gem_stolen.c > > +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c > > @@ -250,7 +250,7 @@ i915_pages_create_for_stolen(struct drm_device *dev, > > } > > > > sg = st->sgl; > > - sg->offset = offset; > > + sg->offset = 0; > > sg->length = size; > > > > sg_dma_address(sg) = (dma_addr_t)dev_priv->mm.stolen_base + offset; > > Let's get this upstream and cc stable. > > Reviewed-by: Jesse Barnes Indeed this slipped through the cracks. Patch authors: Please poke me per mail (cc mailing lists still) or on irc if a patch seems to linger for 1-2 weeks. Merged to -fixes, thanks. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch