Re: [PATCH xserver 3/3] present: Only requeue if target MSC is not reached after an unflip
On 28/03/16 05:24, Michel Dänzer wrote: On 01.03.2016 20:26, Martin Peres wrote: On 25/02/16 17:28, Adam Jackson wrote: On Thu, 2016-02-25 at 09:49 +, Chris Wilson wrote: On Wed, Feb 24, 2016 at 04:52:59PM +0900, Michel Dänzer wrote: From: Michel DänzerWhile present_pixmap decrements target_msc by 1 for present_queue_vblank, it leaves the original vblank->target_msc intact. So incrementing the latter for requeueing resulted in the requeued presentation being executed too late. My mistake. Yes, the local target_msc is decremented but after vblank->target_msc is assigned. Also, no need to requeue if the target MSC is already reached. This further reduces stutter when a popup menu appears on top of a flipping fullscreen window. Signed-off-by: Michel Dänzer Reviewed-by: Chris Wilson -Chris Series merged: remote: I: patch #74919 updated using rev 1a9f8c4623c4e6b6955cb6d5f44d29c244dfd32a. remote: I: patch #74915 updated using rev e7a35b9e16aa12970908f5d55371bb1b862f8f24. remote: I: patch #74910 updated using rev b4ac7b142fa3c536e9b283cfd34b94d82c03aac6. remote: I: 3 patch(es) updated to state Accepted. To ssh://git.freedesktop.org/git/xorg/xserver 0461bca..b4ac7b1 master -> master For some reason, this patch prevents kde from starting. Does this still happen with 3b385105 ("present: Only requeue for next MSC after flip failure")? Sorry again for the delay. I verified that this particular commits fixes it. Now I can run the the upstream HEAD on both modesetting and the intel ddx. Thanks! ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 3/3] present: Only requeue if target MSC is not reached after an unflip
On 01.03.2016 20:26, Martin Peres wrote: > On 25/02/16 17:28, Adam Jackson wrote: >> On Thu, 2016-02-25 at 09:49 +, Chris Wilson wrote: >>> On Wed, Feb 24, 2016 at 04:52:59PM +0900, Michel Dänzer wrote: From: Michel DänzerWhile present_pixmap decrements target_msc by 1 for present_queue_vblank, it leaves the original vblank->target_msc intact. So incrementing the latter for requeueing resulted in the requeued presentation being executed too late. >>> My mistake. Yes, the local target_msc is decremented but after >>> vblank->target_msc is assigned. >>> Also, no need to requeue if the target MSC is already reached. This further reduces stutter when a popup menu appears on top of a flipping fullscreen window. Signed-off-by: Michel Dänzer >>> Reviewed-by: Chris Wilson >>> -Chris >> Series merged: >> >> remote: I: patch #74919 updated using rev >> 1a9f8c4623c4e6b6955cb6d5f44d29c244dfd32a. >> remote: I: patch #74915 updated using rev >> e7a35b9e16aa12970908f5d55371bb1b862f8f24. >> remote: I: patch #74910 updated using rev >> b4ac7b142fa3c536e9b283cfd34b94d82c03aac6. >> remote: I: 3 patch(es) updated to state Accepted. >> To ssh://git.freedesktop.org/git/xorg/xserver >> 0461bca..b4ac7b1 master -> master >> > > For some reason, this patch prevents kde from starting. Does this still happen with 3b385105 ("present: Only requeue for next MSC after flip failure")? > I will provide an xtrace for this as soon as I can, but I wanted to > provide you with a heads'up! If it still happens with the above fix, the debugging patch I previously sent in this thread would be interesting. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 3/3] present: Only requeue if target MSC is not reached after an unflip
On 10.03.2016 18:21, Martin Peres wrote: > On 05/03/16 06:20, Michel Dänzer wrote: >> >>> I will provide an xtrace for this as soon as I can, but I wanted to >>> provide you with a heads'up! >> >> FWIW, it'll be interesting to see the values of vblank->target_msc, >> crtc_msc and ust in present_execute when it decides not to call >> present_queue_vblank although vblank->requeue was set. > > What would be the best way for me to trace that? Something like this: diff --git a/present/present.c b/present/present.c index 1ce16af..62827b9 100644 --- a/present/present.c +++ b/present/present.c @@ -635,6 +635,9 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) vblank->event_id, vblank->target_msc)) return; +else +ErrorF("Not requeueing: vblank->target_msc=%lu crtc_msc=%lu ust=%lu\n", + vblank->target_msc, crtc_msc, ust); } if (vblank->wait_fence) { -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 3/3] present: Only requeue if target MSC is not reached after an unflip
On 05/03/16 06:20, Michel Dänzer wrote: [ Sorry for the late followup; I was down with the flu ] On 01.03.2016 20:26, Martin Peres wrote: On 25/02/16 17:28, Adam Jackson wrote: On Thu, 2016-02-25 at 09:49 +, Chris Wilson wrote: On Wed, Feb 24, 2016 at 04:52:59PM +0900, Michel Dänzer wrote: From: Michel DänzerWhile present_pixmap decrements target_msc by 1 for present_queue_vblank, it leaves the original vblank->target_msc intact. So incrementing the latter for requeueing resulted in the requeued presentation being executed too late. My mistake. Yes, the local target_msc is decremented but after vblank->target_msc is assigned. Also, no need to requeue if the target MSC is already reached. This further reduces stutter when a popup menu appears on top of a flipping fullscreen window. Signed-off-by: Michel Dänzer Reviewed-by: Chris Wilson -Chris Series merged: remote: I: patch #74919 updated using rev 1a9f8c4623c4e6b6955cb6d5f44d29c244dfd32a. remote: I: patch #74915 updated using rev e7a35b9e16aa12970908f5d55371bb1b862f8f24. remote: I: patch #74910 updated using rev b4ac7b142fa3c536e9b283cfd34b94d82c03aac6. remote: I: 3 patch(es) updated to state Accepted. To ssh://git.freedesktop.org/git/xorg/xserver 0461bca..b4ac7b1 master -> master For some reason, this patch prevents kde from starting. I can't seem to reproduce that. Which option are you using for KWin's "Tearing prevention" setting? Hey, sorry for the delay. Unfortunately, I set it to automatic, I will check with different settings. I will provide an xtrace for this as soon as I can, but I wanted to provide you with a heads'up! FWIW, it'll be interesting to see the values of vblank->target_msc, crtc_msc and ust in present_execute when it decides not to call present_queue_vblank although vblank->requeue was set. What would be the best way for me to trace that? ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 3/3] present: Only requeue if target MSC is not reached after an unflip
[ Sorry for the late followup; I was down with the flu ] On 01.03.2016 20:26, Martin Peres wrote: > On 25/02/16 17:28, Adam Jackson wrote: >> On Thu, 2016-02-25 at 09:49 +, Chris Wilson wrote: >>> On Wed, Feb 24, 2016 at 04:52:59PM +0900, Michel Dänzer wrote: From: Michel DänzerWhile present_pixmap decrements target_msc by 1 for present_queue_vblank, it leaves the original vblank->target_msc intact. So incrementing the latter for requeueing resulted in the requeued presentation being executed too late. >>> My mistake. Yes, the local target_msc is decremented but after >>> vblank->target_msc is assigned. >>> Also, no need to requeue if the target MSC is already reached. This further reduces stutter when a popup menu appears on top of a flipping fullscreen window. Signed-off-by: Michel Dänzer >>> Reviewed-by: Chris Wilson >>> -Chris >> Series merged: >> >> remote: I: patch #74919 updated using rev >> 1a9f8c4623c4e6b6955cb6d5f44d29c244dfd32a. >> remote: I: patch #74915 updated using rev >> e7a35b9e16aa12970908f5d55371bb1b862f8f24. >> remote: I: patch #74910 updated using rev >> b4ac7b142fa3c536e9b283cfd34b94d82c03aac6. >> remote: I: 3 patch(es) updated to state Accepted. >> To ssh://git.freedesktop.org/git/xorg/xserver >> 0461bca..b4ac7b1 master -> master >> > > For some reason, this patch prevents kde from starting. I can't seem to reproduce that. Which option are you using for KWin's "Tearing prevention" setting? > I will provide an xtrace for this as soon as I can, but I wanted to > provide you with a heads'up! FWIW, it'll be interesting to see the values of vblank->target_msc, crtc_msc and ust in present_execute when it decides not to call present_queue_vblank although vblank->requeue was set. (This is assuming the problem is with the second hunk of the patch; the first hunk is obviously correct, and I can't imagine how it could cause the problem on its own) -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 3/3] present: Only requeue if target MSC is not reached after an unflip
On 25/02/16 17:28, Adam Jackson wrote: On Thu, 2016-02-25 at 09:49 +, Chris Wilson wrote: On Wed, Feb 24, 2016 at 04:52:59PM +0900, Michel Dänzer wrote: From: Michel DänzerWhile present_pixmap decrements target_msc by 1 for present_queue_vblank, it leaves the original vblank->target_msc intact. So incrementing the latter for requeueing resulted in the requeued presentation being executed too late. My mistake. Yes, the local target_msc is decremented but after vblank->target_msc is assigned. Also, no need to requeue if the target MSC is already reached. This further reduces stutter when a popup menu appears on top of a flipping fullscreen window. Signed-off-by: Michel Dänzer Reviewed-by: Chris Wilson -Chris Series merged: remote: I: patch #74919 updated using rev 1a9f8c4623c4e6b6955cb6d5f44d29c244dfd32a. remote: I: patch #74915 updated using rev e7a35b9e16aa12970908f5d55371bb1b862f8f24. remote: I: patch #74910 updated using rev b4ac7b142fa3c536e9b283cfd34b94d82c03aac6. remote: I: 3 patch(es) updated to state Accepted. To ssh://git.freedesktop.org/git/xorg/xserver 0461bca..b4ac7b1 master -> master For some reason, this patch prevents kde from starting. I will provide an xtrace for this as soon as I can, but I wanted to provide you with a heads'up! ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 3/3] present: Only requeue if target MSC is not reached after an unflip
On Thu, 2016-02-25 at 09:49 +, Chris Wilson wrote: > On Wed, Feb 24, 2016 at 04:52:59PM +0900, Michel Dänzer wrote: > > From: Michel Dänzer> > > > While present_pixmap decrements target_msc by 1 for present_queue_vblank, > > it leaves the original vblank->target_msc intact. So incrementing the > > latter for requeueing resulted in the requeued presentation being > > executed too late. > > My mistake. Yes, the local target_msc is decremented but after > vblank->target_msc is assigned. > > > Also, no need to requeue if the target MSC is already reached. > > > > This further reduces stutter when a popup menu appears on top of a > > flipping fullscreen window. > > > > Signed-off-by: Michel Dänzer > > Reviewed-by: Chris Wilson > -Chris Series merged: remote: I: patch #74919 updated using rev 1a9f8c4623c4e6b6955cb6d5f44d29c244dfd32a. remote: I: patch #74915 updated using rev e7a35b9e16aa12970908f5d55371bb1b862f8f24. remote: I: patch #74910 updated using rev b4ac7b142fa3c536e9b283cfd34b94d82c03aac6. remote: I: 3 patch(es) updated to state Accepted. To ssh://git.freedesktop.org/git/xorg/xserver 0461bca..b4ac7b1 master -> master - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 3/3] present: Only requeue if target MSC is not reached after an unflip
On Wed, Feb 24, 2016 at 04:52:59PM +0900, Michel Dänzer wrote: > From: Michel Dänzer> > While present_pixmap decrements target_msc by 1 for present_queue_vblank, > it leaves the original vblank->target_msc intact. So incrementing the > latter for requeueing resulted in the requeued presentation being > executed too late. My mistake. Yes, the local target_msc is decremented but after vblank->target_msc is assigned. > Also, no need to requeue if the target MSC is already reached. > > This further reduces stutter when a popup menu appears on top of a > flipping fullscreen window. > > Signed-off-by: Michel Dänzer Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 3/3] present: Only requeue if target MSC is not reached after an unflip
From: Michel DänzerWhile present_pixmap decrements target_msc by 1 for present_queue_vblank, it leaves the original vblank->target_msc intact. So incrementing the latter for requeueing resulted in the requeued presentation being executed too late. Also, no need to requeue if the target MSC is already reached. This further reduces stutter when a popup menu appears on top of a flipping fullscreen window. Signed-off-by: Michel Dänzer --- present/present.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/present/present.c b/present/present.c index 824ca56..1ce16af 100644 --- a/present/present.c +++ b/present/present.c @@ -591,10 +591,8 @@ present_check_flip_window (WindowPtr window) xorg_list_for_each_entry(vblank, _priv->vblank, window_list) { if (vblank->queued && vblank->flip && !present_check_flip(vblank->crtc, window, vblank->pixmap, vblank->sync_flip, NULL, 0, 0)) { vblank->flip = FALSE; -if (vblank->sync_flip) { +if (vblank->sync_flip) vblank->requeue = TRUE; -vblank->target_msc++; -} } } } @@ -631,7 +629,8 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) if (vblank->requeue) { vblank->requeue = FALSE; -if (Success == present_queue_vblank(screen, +if (msc_is_after(vblank->target_msc, crtc_msc) && +Success == present_queue_vblank(screen, vblank->crtc, vblank->event_id, vblank->target_msc)) -- 2.7.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel