Skip to content

Commit

Permalink
drm/i915: Fix the offset issue for the stolen GEM objects
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Akash Goel authored and Daniel Vetter committed Jan 28, 2014
1 parent 372fbb8 commit ec14ba4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/i915_gem_stolen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ec14ba4

Please sign in to comment.