From e9fcdbde7e8259e35d6dcc04014a271c156f67bd Mon Sep 17 00:00:00 2001
|
From: Jeffy Chen <jeffy.chen@rock-chips.com>
|
Date: Fri, 13 Aug 2021 10:10:01 +0800
|
Subject: [PATCH 49/74] backend-drm: Allow pageflip error
|
|
Allow to recover from pageflip error:
|
[02:08:14.089] queueing pageflip failed: Operation not permitted
|
[02:08:14.090] Couldn't apply state for output eDP-1
|
[02:08:14.090] repaint-flush failed: No such file or directory
|
|
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
|
---
|
libweston/backend-drm/kms.c | 8 ++++++--
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
|
diff --git a/libweston/backend-drm/kms.c b/libweston/backend-drm/kms.c
|
index 6596d9e..47ce5c5 100644
|
--- a/libweston/backend-drm/kms.c
|
+++ b/libweston/backend-drm/kms.c
|
@@ -1353,6 +1353,7 @@ drm_pending_state_apply(struct drm_pending_state *pending_state)
|
struct drm_backend *b = pending_state->backend;
|
struct drm_output_state *output_state, *tmp;
|
struct drm_crtc *crtc;
|
+ int has_error = 0;
|
|
if (b->atomic_modeset)
|
return drm_pending_state_apply_atomic(pending_state,
|
@@ -1395,6 +1396,7 @@ drm_pending_state_apply(struct drm_pending_state *pending_state)
|
drm_output_fini_egl(output);
|
drm_output_init_egl(output, b);
|
}
|
+ has_error = 1;
|
}
|
}
|
|
@@ -1402,7 +1404,7 @@ drm_pending_state_apply(struct drm_pending_state *pending_state)
|
|
drm_pending_state_free(pending_state);
|
|
- return 0;
|
+ return has_error ? -EACCES : 0;
|
}
|
|
/**
|
@@ -1418,6 +1420,7 @@ drm_pending_state_apply_sync(struct drm_pending_state *pending_state)
|
struct drm_backend *b = pending_state->backend;
|
struct drm_output_state *output_state, *tmp;
|
struct drm_crtc *crtc;
|
+ int has_error = 0;
|
|
if (b->atomic_modeset)
|
return drm_pending_state_apply_atomic(pending_state,
|
@@ -1446,6 +1449,7 @@ drm_pending_state_apply_sync(struct drm_pending_state *pending_state)
|
if (ret != 0) {
|
weston_log("Couldn't apply state for output %s\n",
|
output_state->output->base.name);
|
+ has_error = 1;
|
}
|
}
|
|
@@ -1453,7 +1457,7 @@ drm_pending_state_apply_sync(struct drm_pending_state *pending_state)
|
|
drm_pending_state_free(pending_state);
|
|
- return 0;
|
+ return has_error ? -EACCES : 0;
|
}
|
|
void
|
--
|
2.20.1
|