[3.11.y.z extended stable] Patch "drm/i915: Fix the offset issue for the stolen GEM objects" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Wed Feb 5 13:15:30 UTC 2014


This is a note to let you know that I have just added a patch titled

    drm/i915: Fix the offset issue for the stolen GEM objects

to the linux-3.11.y-queue branch of the 3.11.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.11.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.11.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From f016bb23389791ad6dcb9f0d0f28b11a8c852215 Mon Sep 17 00:00:00 2001
From: Akash Goel <akash.goel at intel.com>
Date: Mon, 13 Jan 2014 16:24:45 +0530
Subject: drm/i915: Fix the offset issue for the stolen GEM objects

commit ec14ba47791965d2c08e0a681ff44eacbf3c4553 upstream.

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 at intel.com>
Reviewed-by: Jesse Barnes <jbarnes at virtuousgeek.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 at ffwll.ch>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 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 982d473..4047e3b 100644
--- a/drivers/gpu/drm/i915/i915_gem_stolen.c
+++ b/drivers/gpu/drm/i915/i915_gem_stolen.c
@@ -234,7 +234,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;
--
1.8.3.2





More information about the kernel-team mailing list