mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
backend/drm: fix frame scheduling on secondary GPUs
There was a missing copy_drm_surface_mgpu call in drm_connector_schedule_frame so we asked for a pageflip with an unknown BO, resulting in ENOENT. Additionally, this commit makes schedule_frame return a bool indicating failures. This allows schedule_frame_handle_idle_timer to only set frame_pending to true if a frame has been successfully scheduled. Thus, if a pageflip fails, rendering won't be blocked forever anymore. In case a pageflip is already pending, true is returned because a frame has already been scheduled and will be sent sometime soon.
This commit is contained in:
parent
659d39baaa
commit
68362b37a8
4 changed files with 17 additions and 11 deletions
|
|
@ -197,17 +197,18 @@ static bool output_move_cursor(struct wlr_output *_output, int x, int y) {
|
|||
return true;
|
||||
}
|
||||
|
||||
static void output_schedule_frame(struct wlr_output *wlr_output) {
|
||||
static bool output_schedule_frame(struct wlr_output *wlr_output) {
|
||||
struct wlr_wl_output *output = get_wl_output_from_output(wlr_output);
|
||||
|
||||
if (output->frame_callback != NULL) {
|
||||
wlr_log(WLR_ERROR, "Skipping frame scheduling");
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
output->frame_callback = wl_surface_frame(output->surface);
|
||||
wl_callback_add_listener(output->frame_callback, &frame_listener, output);
|
||||
wl_surface_commit(output->surface);
|
||||
return true;
|
||||
}
|
||||
|
||||
static const struct wlr_output_impl output_impl = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue