All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple@vodafone.de>
To: "Michel Dänzer" <michel@daenzer.net>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/2] Revert "drm/radeon: remove drm_vblank_get|put from pflip handling"
Date: Mon, 23 Jun 2014 14:45:12 +0200	[thread overview]
Message-ID: <53A82158.6090109@vodafone.de> (raw)
In-Reply-To: <53A7F4BC.9070306@daenzer.net>

Am 23.06.2014 11:34, schrieb Michel Dänzer:
> On 18.06.2014 18:14, Christian König wrote:
>> Am 18.06.2014 07:53, schrieb Michel Dänzer:
>>> Looking into these issues has got me thinking about the use of the page
>>> flip interrupt: If the page flip interrupt arrives before the
>>> corresponding
>>> vertical blank interrupt, the DRM vblank counter will be lower than
>>> expected by 1 in drm_send_vblank_event(). I suspect this is the cause of
>>>
>>>    (WW) RADEON(0): radeon_dri2_flip_event_handler: Pageflip completion
>>> event has impossible msc [x-1] < target_msc [x]
>>>
>>> messages in the X log file which have been popping up in bug reports
>>> lately.
>>> This also results in 0s being returned to the client for the MSC and
>>> timestamp of the swap completion, which could cause all kinds of bad
>>> behaviour.
>> First of all thanks for looking into it. Are you getting this on 3.16 or
>> 3.15?
> I haven't actually run into this myself yet. I thought I'd seen it in
> several bug reports, but right now I can only find
> https://bugs.freedesktop.org/show_bug.cgi?id=80029#c17 , which seems to
> include the page flipping changes from 3.16.
>
>
>> I don't think that the pflip irq is thrown earlier than the vblank, but
>> on 3.16 it might actually be that we program the flip so fast into the
>> hardware that we do it one frame earlier than planned.
> So userspace is notified of the previous vertical blank period and calls
> the page flip ioctl in response, which then manages to program the
> scanout address update into the hardware before the scanout address
> update is latched during the previous vertical blank period?

Yes correct. That at least sounds like the most likely explanation to me.

> To avoid that scenario, one possibility might be to check if we're in
> vertical blank before calling radeon_page_flip(), and if so sleep for
> 1ms or so before trying again? That might unnecessarily delay flips on
> other CRTCs though...

It won't delay the other CRTCs because each CRTC has it's own kernel 
thread, but it won't be optimal either.

Going to try to reproduce the bug with 3.16,
Christian.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2014-06-23 12:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17 10:12 [PATCH 1/2] Revert "drm/radeon: remove drm_vblank_get|put from pflip handling" Michel Dänzer
2014-06-17 10:12 ` [PATCH 2/2] drm/radeon: Fix radeon_irq_kms_pflip_irq_get/put() imbalance Michel Dänzer
2014-06-17 11:41 ` [PATCH 1/2] Revert "drm/radeon: remove drm_vblank_get|put from pflip handling" Christian König
2014-06-17 13:45   ` Alex Deucher
2014-06-18  5:53   ` Michel Dänzer
2014-06-18  9:14     ` Christian König
2014-06-23  9:34       ` Michel Dänzer
2014-06-23 12:45         ` Christian König [this message]
2014-06-23 19:46         ` Dieter Nützel
2014-06-23 20:32           ` Dieter Nützel
2014-06-24 10:05             ` Michel Dänzer
2014-06-24 19:58               ` Dieter Nützel
2014-06-24 21:52               ` Dieter Nützel
     [not found]               ` <1d171bd5e2e5a09d6016b07936e5293c@mail.ud03.udmedia.de>
2014-06-25  7:57                 ` Michel Dänzer
2014-06-25 23:34                   ` Dieter Nützel
2014-06-26  9:34                     ` Michel Dänzer

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=53A82158.6090109@vodafone.de \
    --to=deathsimple@vodafone.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=michel@daenzer.net \
    /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.