On Thu, 2009-02-26 at 13:36 -0800, Jesse Barnes wrote:
> Support the new swapbuffers request using the new page flipping ioctl
> if possible.
> 
> This patch still needs some work; there's a bug in the no-flip case that
> causes us to lose track of pixmaps, and the pipe is still hardcoded to 1,
> but that should be easy to fix.
> 
> The code is pretty ugly too; it seems like getbuffers and swapbuffers could
> probably share more code, but we need to copy all the buffers in swapbuffers
> to return them...

I haven't reviewed the thing, but a comment from other discussion:

...

> +    /* If we're in charge of the front buffer, we can flip */
> +    if (!pI830->shadow_present) {
> +     flip.handle = back_bo->handle;
> +     flip.pipe = 1;
> +     flip.x = pScrn->virtualX;
> +     flip.y = pScrn->virtualY;
> +     flip.flags = 0; flip.offset = 0;
> +
> +     ret = drmCommandWrite(pI830->drmSubFD, DRM_I915_GEM_PAGE_FLIP, &flip,
> +                           sizeof(flip));
> +     if (ret) {
> +         xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Page flip failed: %s\n",
> +                    strerror(errno));
> +         return FALSE;
> +     }

I think this should be in libdrm, so that the bufmgr can know that the
BO is getting a outside-of-this-client reference to it and avoid putting
it in the BO cache if it gets unreferenced while still being scanned
out.

-- 
Eric Anholt
e...@anholt.net                         eric.anh...@intel.com


Attachment: signature.asc
Description: This is a digitally signed message part

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to