aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorScott Anderson <ascent12@hotmail.com>2017-09-23 18:44:39 +1200
committerScott Anderson <ascent12@hotmail.com>2017-09-23 18:44:39 +1200
commitdb5e9385d4e1492630611265afcffd9b86867489 (patch)
tree5e1720f0b1f9a9f18575502cb12002a33cf0326a /backend
parent025b3ee515aedf008b94eb8aa791ecd7eaf817c9 (diff)
Simplify retry_pageflip
Diffstat (limited to 'backend')
-rw-r--r--backend/drm/drm.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 53d08291..712a06b6 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -734,25 +734,9 @@ static struct wlr_output_impl output_impl = {
static int retry_pageflip(void *data) {
struct wlr_drm_output *output = data;
- struct wlr_drm_backend *backend =
- wl_container_of(output->renderer, backend, renderer);
-
- struct wlr_drm_crtc *crtc = output->crtc;
- struct wlr_drm_plane *plane = crtc->primary;
- struct gbm_bo *bo = plane->front ? plane->front : plane->back;
-
- struct wlr_drm_output_mode *wlr_mode =
- (struct wlr_drm_output_mode *)output->output.current_mode;
- drmModeModeInfo *mode = &wlr_mode->mode;
-
- if (backend->iface->crtc_pageflip(backend, output, crtc, get_fb_for_bo(bo), mode)) {
- output->pageflip_pending = true;
- } else {
- wl_event_source_timer_update(output->retry_pageflip,
- output->output.current_mode->refresh);
- }
-
- return 1;
+ wlr_log(L_INFO, "%s: Retrying pageflip", output->output.name);
+ wlr_drm_output_start_renderer(output);
+ return 0;
}
static int find_id(const void *item, const void *cmp_to) {