diff options
Diffstat (limited to 'src/i830_driver.c')
-rw-r--r-- | src/i830_driver.c | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c index 7502d301..d7ee6154 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -823,22 +823,40 @@ i830_update_front_offset(ScrnInfoPtr pScrn) ScreenPtr pScreen = pScrn->pScreen; I830Ptr pI830 = I830PTR(pScrn); int pitch = pScrn->displayWidth * pI830->cpp; + pointer data = NULL; /* Update buffer locations, which may have changed as a result of * i830_bind_all_memory(). */ pScrn->fbOffset = pI830->front_buffer->offset; + if (pI830->starting || pI830->accel == ACCEL_UXA) + return; + /* If we are still in ScreenInit, there is no screen pixmap to be updated * yet. We'll fix it up at CreateScreenResources. */ - if (!pI830->starting && pI830->accel != ACCEL_UXA) { - if (!pScreen->ModifyPixmapHeader(pScreen->GetScreenPixmap(pScreen), + if (!pI830->memory_manager) { + data = pI830->FbBase + pScrn->fbOffset; /* default to legacy */ + } else { + dri_bo *bo = pI830->front_buffer->bo; + + if (bo) { + if (pI830->kernel_exec_fencing) { + if (drm_intel_gem_bo_map_gtt(bo)) + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "%s: bo map failed\n", + __FUNCTION__); + } else { + /* Will already be pinned by bind_all_memory in this case */ + drm_intel_gem_bo_start_gtt_access(bo, 1); + } + data = bo->virtual; + } + } + if (!pScreen->ModifyPixmapHeader(pScreen->GetScreenPixmap(pScreen), pScrn->virtualX, pScrn->virtualY, -1, -1, - pitch, (pointer)(pI830->FbBase + - pScrn->fbOffset))) + pitch, data)) FatalError("Couldn't adjust screen pixmap\n"); - } } /** |