All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
To: Mario Kleiner <mario.kleiner-TdbV1Z3I5XE0NhjG498hmQ@public.gmane.org>
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: mesa vdpau regression with "dri2: Fix potential race and crash for swap at next vblank."
Date: Thu, 28 Mar 2013 15:26:02 +0100	[thread overview]
Message-ID: <515452FA.4070002@canonical.com> (raw)
In-Reply-To: <515422BA.6080702-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>

Op 28-03-13 12:00, Maarten Lankhorst schreef:

> Hey Mario,
>
> It seems that your ddx commit b4231dd715a8 is causing a regression when I use mplayer -vo vdpau rendering with mesa 9.1.
> It fails to start drawing here, leaving the mplayer screen black, I can make it recover usually by seeking or moving another
> window in front. When I revert the commit it behaves normally. Changing can_sync_to_vblank(draw) to 0 in
> nouveau_dri2_schedule_swap also fixes it.
>
> The nouveau kernel driver currently doesn't fill in a frame number, so MSC will always be zero for now,
> and this makes mplayer choose target_msc = 0 as 'swap at next interval', which appears to be broken by the commit.
>
> The following patch fixes frame numbers in the nouveau kernel module, but it only decreases the likelyhood of
> occuring, it still happens when seeking, for example.
>
> ~Maarten
>
Ohey found a flip bug too, that was weird, I'll send a patch for both. This is just silly...

--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -593,7 +597,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
 
 	/* Emit a page flip */
 	if (nv_device(drm->device)->card_type >= NV_50) {
-		ret = nv50_display_flip_next(crtc, fb, chan, 0);
+		ret = nv50_display_flip_next(crtc, fb, chan, /*swap_interval=*/ 1);
 		if (ret) {
 			mutex_unlock(&chan->cli->mutex);
 			goto fail_unreserve;

      parent reply	other threads:[~2013-03-28 14:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-28 11:00 mesa vdpau regression with "dri2: Fix potential race and crash for swap at next vblank." Maarten Lankhorst
     [not found] ` <515422BA.6080702-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2013-03-28 14:26   ` Maarten Lankhorst [this message]

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=515452FA.4070002@canonical.com \
    --to=maarten.lankhorst-z7wlfzj8ewms+fvcfc7uqw@public.gmane.org \
    --cc=mario.kleiner-TdbV1Z3I5XE0NhjG498hmQ@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.