All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francisco Jerez <currojerez-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
To: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	"Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>
Subject: Re: [PATCH] nouveau/dri2: don't try to page flip pixmaps
Date: Thu, 03 May 2012 15:15:51 +0200	[thread overview]
Message-ID: <87397hv20o.fsf@riseup.net> (raw)
In-Reply-To: <20120503125016.GA8466-OI9uyE9O0yo@public.gmane.org> (Marcin Slusarz's message of "Thu, 3 May 2012 14:50:16 +0200")


[-- Attachment #1.1.1: Type: text/plain, Size: 1404 bytes --]

Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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, &reg);
>  
> -		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,

[-- Attachment #1.2: Type: application/pgp-signature, Size: 229 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

  parent reply	other threads:[~2012-05-03 13:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-03 12:50 [PATCH] nouveau/dri2: don't try to page flip pixmaps Marcin Slusarz
     [not found] ` <20120503125016.GA8466-OI9uyE9O0yo@public.gmane.org>
2012-05-03 13:15   ` Francisco Jerez [this message]
     [not found]     ` <87397hv20o.fsf-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
2012-05-03 16:46       ` Marcin Slusarz
     [not found]         ` <20120503164648.GA1761-OI9uyE9O0yo@public.gmane.org>
2012-05-03 22:31           ` Francisco Jerez
     [not found]             ` <87wr4sucbb.fsf-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
2012-05-06 19:04               ` Marcin Slusarz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87397hv20o.fsf@riseup.net \
    --to=currojerez-sgozh3hwpm2stnjn9+bgxg@public.gmane.org \
    --cc=marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=michel-otUistvHUpPR7s880joybQ@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.