diff options
author | Miguel A. Vico | 2017-08-09 17:02:07 -0700 |
---|---|---|
committer | Miguel A. Vico | 2017-08-09 17:02:07 -0700 |
commit | 96452a48b8d31a9f48c7ece5d8d5a7935b2fa8b3 (patch) | |
tree | 5033b97899584014c8917eb2288fde0b044ecc47 /0004-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch | |
parent | 87ffac5fff77badfc6c0ecaa022ef7ca96278cd2 (diff) | |
download | aur-96452a48b8d31a9f48c7ece5d8d5a7935b2fa8b3.tar.gz |
Update to weston 3.0.0
Diffstat (limited to '0004-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch')
-rw-r--r-- | 0004-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/0004-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch b/0004-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch deleted file mode 100644 index fcbf8fe04c54..000000000000 --- a/0004-compositor-drm-Gracefully-handle-vblank-and-flip-inv.patch +++ /dev/null @@ -1,86 +0,0 @@ -From d89c874ea121b6855c7bdf2e757fa13d0b04661f Mon Sep 17 00:00:00 2001 -From: "Miguel A. Vico" <mvicomoya@nvidia.com> -Date: Tue, 1 Mar 2016 22:19:14 +0100 -Subject: [PATCH 4/7] compositor-drm: Gracefully handle vblank and flip invalid - timestamps -X-NVConfidentiality: public - -Instant query for vblank timestamp may always fail, resulting in -never scheduling a full repaint in drm_output_start_repaint_loop(). - -Additionally, timestamp provided in page_flip_handler() may also be -invalid. - -This change makes both drm_output_start_repaint_loop() and -page_flip_handler() to schedule a full repaint in any of the -situations above. - -Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com> -Reviewed-by: Andy Ritger <aritger@nvidia.com> ---- - libweston/compositor-drm.c | 28 +++++++++++++++++++++++++--- - 1 file changed, 25 insertions(+), 3 deletions(-) - -diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c -index 1d38f051..12c1b8b5 100644 ---- a/libweston/compositor-drm.c -+++ b/libweston/compositor-drm.c -@@ -1,6 +1,7 @@ - /* - * Copyright © 2008-2011 Kristian Høgsberg - * Copyright © 2011 Intel Corporation -+ * Copyright © 2016 NVIDIA Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the -@@ -825,8 +826,16 @@ drm_output_start_repaint_loop(struct weston_output *output_base) - vbl.request.type |= drm_waitvblank_pipe(output); - ret = drmWaitVBlank(backend->drm.fd, &vbl); - -- /* Error ret or zero timestamp means failure to get valid timestamp */ -- if ((ret == 0) && (vbl.reply.tval_sec > 0 || vbl.reply.tval_usec > 0)) { -+ if (ret) { -+ /* Immediate query failed. It may always fail so we'll never get -+ * a valid timestamp to update msc and call into finish frame. -+ * Hence, jump to finish frame here. -+ */ -+ goto finish_frame; -+ } -+ -+ /* Zero timestamp means failure to get valid timestamp */ -+ if (vbl.reply.tval_sec > 0 || vbl.reply.tval_usec > 0) { - ts.tv_sec = vbl.reply.tval_sec; - ts.tv_nsec = vbl.reply.tval_usec * 1000; - -@@ -847,7 +856,7 @@ drm_output_start_repaint_loop(struct weston_output *output_base) - } - } - -- /* Immediate query didn't provide valid timestamp. -+ /* Immediate query succeeded, but didn't provide valid timestamp. - * Use pageflip fallback. - */ - fb_id = output->current->fb_id; -@@ -935,6 +944,19 @@ page_flip_handler(int fd, unsigned int frame, - else if (!output->vblank_pending) { - ts.tv_sec = sec; - ts.tv_nsec = usec * 1000; -+ -+ /* Zero timestamp means failure to get valid timestamp, so -+ * immediately finish frame -+ * -+ * FIXME: Driver should never return an invalid page flip -+ * timestamp */ -+ if (ts.tv_sec == 0 && ts.tv_nsec == 0) { -+ weston_compositor_read_presentation_clock( -+ output->base.compositor, -+ &ts); -+ flags = WP_PRESENTATION_FEEDBACK_INVALID; -+ } -+ - weston_output_finish_frame(&output->base, &ts, flags); - - /* We can't call this from frame_notify, because the output's --- -2.11.1 - |