drm-backend: really reset/restart outputs of a failed commit
This reverts f843ba34d1
("drm-backend: limit
reset/restart to output of a failed commit") and actually solves the problem
correctly.
The pending_state is no longer valid at this point, so it cannot be used to
determine the outputs of the current commit. So only clear will_repaint when
starting to repaint, so it can be used to determine which outputs of a device
were actually repainted and use it to reset/restart those outputs.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
This commit is contained in:
parent
661a7142ca
commit
1c7cf4796a
|
@ -944,7 +944,7 @@ drm_repaint_flush_device(struct drm_device *device)
|
|||
{
|
||||
struct drm_backend *b = device->backend;
|
||||
struct drm_pending_state *pending_state;
|
||||
struct drm_output_state *output_state;
|
||||
struct weston_output *base;
|
||||
int ret;
|
||||
|
||||
pending_state = device->repaint_data;
|
||||
|
@ -962,13 +962,15 @@ drm_repaint_flush_device(struct drm_device *device)
|
|||
if (ret == 0)
|
||||
return;
|
||||
|
||||
wl_list_for_each(output_state, &pending_state->output_list, link) {
|
||||
struct drm_output *tmp = output_state->output;
|
||||
wl_list_for_each(base, &b->compositor->output_list, link) {
|
||||
struct drm_output *tmp = to_drm_output(base);
|
||||
if (!base->will_repaint || !tmp || tmp->device != device)
|
||||
continue;
|
||||
|
||||
if (ret == -EBUSY)
|
||||
weston_output_schedule_repaint_restart(&tmp->base);
|
||||
weston_output_schedule_repaint_restart(base);
|
||||
else
|
||||
weston_output_schedule_repaint_reset(&tmp->base);
|
||||
weston_output_schedule_repaint_reset(base);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3871,8 +3871,10 @@ output_repaint_timer_handler(void *data)
|
|||
compositor->last_repaint_start = now;
|
||||
|
||||
wl_list_for_each(output, &compositor->output_list, link) {
|
||||
if (!weston_output_check_repaint(output, &now))
|
||||
if (!weston_output_check_repaint(output, &now)) {
|
||||
output->will_repaint = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
output->will_repaint = true;
|
||||
output->backend->will_repaint = true;
|
||||
|
@ -3897,7 +3899,6 @@ output_repaint_timer_handler(void *data)
|
|||
if (!output->will_repaint)
|
||||
continue;
|
||||
|
||||
output->will_repaint = false;
|
||||
ret = weston_output_repaint(output, &now);
|
||||
if (ret)
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue