[Intel-gfx] [PATCH] don't use the pin ioctl in KMS mode
Jesse Barnes
jbarnes at virtuousgeek.org
Tue Jun 30 01:29:16 CEST 2009
The only things we try to pin in KMS mode are the cursor objects and
front buffer, and those are taken care of by the kernel anyway, so we
shouldn't even bother trying to pin them (well, not entirely true,
XvMC tries to pin as well, but it needs work w/KMS anyway). Any
objections?
Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 5e07213..387e52b 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -202,7 +202,7 @@ i830_bind_memory(ScrnInfoPtr pScrn, i830_memory *mem)
if (mem == NULL || mem->bound)
return TRUE;
- if (mem->bo != NULL) {
+ if (mem->bo != NULL && !pI830->use_drm_mode) {
if (dri_bo_pin(mem->bo, mem->alignment) != 0) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Failed to pin %s: %s\n",
@@ -249,7 +249,7 @@ i830_unbind_memory(ScrnInfoPtr pScrn, i830_memory *mem)
!pI830->kernel_exec_fencing)
i830_clear_tiling(pScrn, mem->fence_nr);
- if (mem->bo != NULL) {
+ if (mem->bo != NULL && !pI830->use_drm_mode) {
if (dri_bo_unpin(mem->bo) == 0) {
mem->bound = FALSE;
/* Give buffer obviously wrong offset/end until it's re-pinned. */
More information about the Intel-gfx
mailing list