[Nouveau] [PATCH] nouveau/dri2: don't try to page flip pixmaps
Francisco Jerez
currojerez at riseup.net
Thu May 3 06:15:51 PDT 2012
Marcin Slusarz <marcin.slusarz at gmail.com> writes:
> Port of commit ae45d7e6d8e6844cd4586c9ee97c21b257fa788f in xf86-video-ati.
>
> Fixes https://bugs.freedesktop.org/show_bug.cgi?id=49351
>
> (Additionally, don't try to pageflip if user disabled it in xorg.conf.
> Currently this change is a no-op, because can_exchange returns true only when
> page flipping is enabled, but commit 169512fbe91f0671a90dfee5e280357f0a4ef701 -
> which changed can_exchange behavior - is due to be reverted)
> ---
> src/nouveau_dri2.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
> index 588735f..3d8d22f 100644
> --- a/src/nouveau_dri2.c
> +++ b/src/nouveau_dri2.c
> @@ -328,7 +328,8 @@ nouveau_dri2_finish_swap(DrawablePtr draw, unsigned int frame,
> type = DRI2_EXCHANGE_COMPLETE;
> DamageRegionAppend(draw, ®);
>
> - if (DRI2CanFlip(draw)) {
> + if (DRI2CanFlip(draw) && pNv->has_pageflip &&
> + draw->type == DRAWABLE_WINDOW) {
Hey,
How about 'if (nouveau_exa_pixmap_is_onscreen(dst_pix)) {...'? We
should really never get to that point unless we know for sure that we
can either flip or exchange, so the 'has_pageflip' check is redundant.
> type = DRI2_FLIP_COMPLETE;
> ret = drmmode_page_flip(draw, src_pix,
> violate_oml(draw) ? NULL : s,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 229 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20120503/7960c06c/attachment.pgp>
More information about the Nouveau
mailing list