summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2009-04-03 11:15:18 -0700
committerCarl Worth <cworth@cworth.org>2009-04-06 11:38:11 -0700
commit5944f5e32511984b11decc0df6074600e1989934 (patch)
tree1dadf032e6f9081f3ca111685c1e99e3d27d573d /src
parent633c24bc20ed96b1f9ef954bfd722e3ab504ea93 (diff)
Fix offset in begin_gtt_access case
Don't use bo->virtual in the begin_gtt_access case, use the framebuffer mapping and bo offset instead. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> (cherry picked from commit 6cd914ef315036ce8e91c7b6492994353e8ed2d8)
Diffstat (limited to 'src')
-rw-r--r--src/i830_driver.c3
-rw-r--r--src/i830_exa.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c
index d7ee6154..32ca6c9a 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -846,11 +846,12 @@ i830_update_front_offset(ScrnInfoPtr pScrn)
if (drm_intel_gem_bo_map_gtt(bo))
xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "%s: bo map failed\n",
__FUNCTION__);
+ data = bo->virtual;
} else {
/* Will already be pinned by bind_all_memory in this case */
drm_intel_gem_bo_start_gtt_access(bo, 1);
+ data = pI830->FbBase + bo->offset;
}
- data = bo->virtual;
}
}
if (!pScreen->ModifyPixmapHeader(pScreen->GetScreenPixmap(pScreen),
diff --git a/src/i830_exa.c b/src/i830_exa.c
index fc4e66ce..39011bc6 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -867,12 +867,13 @@ i830_uxa_prepare_access (PixmapPtr pixmap, uxa_access_t access)
__FUNCTION__);
return FALSE;
}
+ pixmap->devPrivate.ptr = bo->virtual;
} else { /* or not... */
if (drm_intel_bo_pin(bo, 4096) != 0)
return FALSE;
drm_intel_gem_bo_start_gtt_access(bo, access == UXA_ACCESS_RW);
+ pixmap->devPrivate.ptr = i830->FbBase + bo->offset;
}
- pixmap->devPrivate.ptr = bo->virtual;
}
return TRUE;
}