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>
This commit is contained in:
parent
fad714c400
commit
6cd914ef31
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue