diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-12-13 09:35:36 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-01-08 19:21:31 +0000 |
commit | 50e07da8094c8c8c593b6eb8c41fc42444851d04 (patch) | |
tree | bf0d22c5a77ca8ba4de1ac455abd31018a1555d6 | |
parent | 7a2b7cfab5cdef277f0feb838683422d9fcb0db3 (diff) | |
download | xf86-video-intel-50e07da8094c8c8c593b6eb8c41fc42444851d04.tar.gz xf86-video-intel-50e07da8094c8c8c593b6eb8c41fc42444851d04.tar.bz2 xf86-video-intel-50e07da8094c8c8c593b6eb8c41fc42444851d04.zip |
i830: Do not use vtSema when chosing mapping type.
The mapping type to use is determined by the tiling of the underlying
object, not by whether or not not we control the vt. This was a
left-over wart that was intended to mean that we had GEM and so could
use GTT mappings.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/i830_uxa.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/i830_uxa.c b/src/i830_uxa.c index 9c381f323..4a892b5ae 100644 --- a/src/i830_uxa.c +++ b/src/i830_uxa.c @@ -575,8 +575,7 @@ static Bool i830_uxa_prepare_access(PixmapPtr pixmap, uxa_access_t access) (access == UXA_ACCESS_RW || priv->batch_write_domain)) intel_batch_submit(scrn); - /* No VT sema or GEM? No GTT mapping. */ - if (!scrn->vtSema || bo->size > intel->max_gtt_map_size) { + if (bo->size > intel->max_gtt_map_size) { ret = dri_bo_map(bo, access == UXA_ACCESS_RW); if (ret != 0) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, @@ -604,22 +603,19 @@ static Bool i830_uxa_prepare_access(PixmapPtr pixmap, uxa_access_t access) static void i830_uxa_finish_access(PixmapPtr pixmap) { dri_bo *bo = i830_get_pixmap_bo(pixmap); + ScreenPtr screen = pixmap->drawable.pScreen; + ScrnInfoPtr scrn = xf86Screens[screen->myNum]; + intel_screen_private *intel = intel_get_screen_private(scrn); - if (bo) { - ScreenPtr screen = pixmap->drawable.pScreen; - ScrnInfoPtr scrn = xf86Screens[screen->myNum]; - intel_screen_private *intel = intel_get_screen_private(scrn); - - if (bo == intel->front_buffer->bo) - intel->need_flush = TRUE; + if (bo == intel->front_buffer->bo) + intel->need_flush = TRUE; - if (!scrn->vtSema || bo->size > intel->max_gtt_map_size) - dri_bo_unmap(bo); - else - drm_intel_gem_bo_unmap_gtt(bo); + if (bo->size > intel->max_gtt_map_size) + dri_bo_unmap(bo); + else + drm_intel_gem_bo_unmap_gtt(bo); - pixmap->devPrivate.ptr = NULL; - } + pixmap->devPrivate.ptr = NULL; } static Bool |