Bug 83884 - Recover from missing DRM completion events
Summary: Recover from missing DRM completion events
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium enhancement
Assignee: Frederic Plourde
QA Contact: Wayland bug list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-15 13:12 UTC by Pekka Paalanen
Modified: 2017-03-07 14:54 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pekka Paalanen 2014-09-15 13:12:23 UTC
Add a watchdog to the DRM backend that will recover Weston, if the DRM page flip events stop coming.

Weston relies on those events, and will normally not repaint until the previous update has been acked. However, on buggy DRM drivers, and now that we are getting closer to the universal planes and atomic mode setting and page flipping framework, it is quite likely that some drivers are sometimes buggy. Recovering from buggy drivers while still clearly signalling the failure should help developers in testing their drivers.

How to recover?
Some options:
- gracefully quit Weston with an error
- fall back to immediate, timer throttled display updates (drmModeSetCrtc / drmModePageFlip without events) and hope it works

Need to take care to not cause the watchdog to trigger during e.g. VT-switched away, or during high load.
Comment 1 Frederic Plourde 2014-10-31 10:41:30 UTC
Those patches were sent to wayland-devel and now need review :

[WESTON PATCH 1/2] compositor: Return a user-defined exit code
[PATCH weston v3 2/2] compositor-drm: Watchdog timer implementation
Comment 2 Link Mauve 2017-01-09 20:31:56 UTC
I sent an updated and improved version of this patch to wayland-devel, rebased against master.

Please review: https://patchwork.freedesktop.org/patch/131766/
Comment 3 Pekka Paalanen 2017-03-07 14:54:33 UTC
Merged upstream:

commit 11ae2a3036bc95ff26b12a6d60f12514d8145143
Author: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Date:   Tue Mar 7 13:27:54 2017 +0000

    compositor-drm: pageflip timeout implementation


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.