Re: [PATCH xf86-video-ati] Bail early from drm_wait_pending_flip if there's no pending flip

2018-09-11 Thread Alex Deucher
On Fri, Sep 7, 2018 at 12:25 PM Michel Dänzer  wrote:
>
> From: Michel Dänzer 
>
> No need to process any events in that case.
>
> (Ported from amdgpu commit ca5eb9894fff153c0a1df7bdc4a4745713309e27)
>
> Signed-off-by: Michel Dänzer 

Acked-by: Alex Deucher 

> ---
>  src/radeon_drm_queue.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/radeon_drm_queue.c b/src/radeon_drm_queue.c
> index bf1650ea9..ea78e8e2b 100644
> --- a/src/radeon_drm_queue.c
> +++ b/src/radeon_drm_queue.c
> @@ -284,7 +284,8 @@ void radeon_drm_wait_pending_flip(xf86CrtcPtr crtc)
>
>  drmmode_crtc->wait_flip_nesting_level++;
>
> -while (!xorg_list_is_empty(_drm_flip_signalled)) {
> +while (drmmode_crtc->flip_pending &&
> +  !xorg_list_is_empty(_drm_flip_signalled)) {
> e = xorg_list_first_entry(_drm_flip_signalled,
>   struct radeon_drm_queue_entry, list);
> radeon_drm_queue_handle_one(e);
> --
> 2.19.0.rc1
>
> ___
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH xf86-video-ati] Bail early from drm_wait_pending_flip if there's no pending flip

2018-09-07 Thread Michel Dänzer
From: Michel Dänzer 

No need to process any events in that case.

(Ported from amdgpu commit ca5eb9894fff153c0a1df7bdc4a4745713309e27)

Signed-off-by: Michel Dänzer 
---
 src/radeon_drm_queue.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/radeon_drm_queue.c b/src/radeon_drm_queue.c
index bf1650ea9..ea78e8e2b 100644
--- a/src/radeon_drm_queue.c
+++ b/src/radeon_drm_queue.c
@@ -284,7 +284,8 @@ void radeon_drm_wait_pending_flip(xf86CrtcPtr crtc)
 
 drmmode_crtc->wait_flip_nesting_level++;
 
-while (!xorg_list_is_empty(_drm_flip_signalled)) {
+while (drmmode_crtc->flip_pending &&
+  !xorg_list_is_empty(_drm_flip_signalled)) {
e = xorg_list_first_entry(_drm_flip_signalled,
  struct radeon_drm_queue_entry, list);
radeon_drm_queue_handle_one(e);
-- 
2.19.0.rc1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx