aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAkash Goel <akash.goel@intel.com>2014-01-13 05:54:45 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-01-28 03:04:42 -0500
commitec14ba47791965d2c08e0a681ff44eacbf3c4553 (patch)
tree96dc3e564fb4547c04d8457312c313860121d4de /drivers/gpu
parent372fbb8e3927fc76b0f842d8eb8a798a71d8960f (diff)
drm/i915: Fix the offset issue for the stolen GEM objects
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 <akash.goel@intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: stable@vger.kernel.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71908 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69104 Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_stolen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c
index fed87ec17211..1a24e84f2315 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,
250 } 250 }
251 251
252 sg = st->sgl; 252 sg = st->sgl;
253 sg->offset = offset; 253 sg->offset = 0;
254 sg->length = size; 254 sg->length = size;
255 255
256 sg_dma_address(sg) = (dma_addr_t)dev_priv->mm.stolen_base + offset; 256 sg_dma_address(sg) = (dma_addr_t)dev_priv->mm.stolen_base + offset;