diff --git a/libweston/backend-drm/drm-internal.h b/libweston/backend-drm/drm-internal.h index bf6b2cdd..6118e1a7 100644 --- a/libweston/backend-drm/drm-internal.h +++ b/libweston/backend-drm/drm-internal.h @@ -822,8 +822,8 @@ enum drm_output_state_duplicate_mode { }; struct drm_output_state * -drm_output_state_alloc(struct drm_output *output, - struct drm_pending_state *pending_state); +drm_output_state_alloc(struct drm_output *output); + struct drm_output_state * drm_output_state_duplicate(struct drm_output_state *src, struct drm_pending_state *pending_state, diff --git a/libweston/backend-drm/drm-virtual.c b/libweston/backend-drm/drm-virtual.c index e47c59b4..3c38f395 100644 --- a/libweston/backend-drm/drm-virtual.c +++ b/libweston/backend-drm/drm-virtual.c @@ -375,7 +375,7 @@ drm_virtual_output_create(struct weston_compositor *c, char *name, output->base.attach_head = NULL; output->backend = b; - output->state_cur = drm_output_state_alloc(output, NULL); + output->state_cur = drm_output_state_alloc(output); weston_compositor_add_pending_output(&output->base, c); diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c index 40ac863a..11a5c3d4 100644 --- a/libweston/backend-drm/drm.c +++ b/libweston/backend-drm/drm.c @@ -2859,7 +2859,7 @@ drm_output_create(struct weston_backend *backend, const char *name) output->destroy_pending = false; output->disable_pending = false; - output->state_cur = drm_output_state_alloc(output, NULL); + output->state_cur = drm_output_state_alloc(output); weston_compositor_add_pending_output(&output->base, b->compositor); diff --git a/libweston/backend-drm/kms.c b/libweston/backend-drm/kms.c index 1de5e46c..d6be1efc 100644 --- a/libweston/backend-drm/kms.c +++ b/libweston/backend-drm/kms.c @@ -1660,7 +1660,7 @@ drm_pending_state_apply(struct drm_pending_state *pending_state) output->base.name); weston_output_repaint_failed(&output->base); drm_output_state_free(output->state_cur); - output->state_cur = drm_output_state_alloc(output, NULL); + output->state_cur = drm_output_state_alloc(output); device->state_invalid = true; if (b->compositor->renderer->type == WESTON_RENDERER_GL) { drm_output_fini_egl(output); diff --git a/libweston/backend-drm/state-helpers.c b/libweston/backend-drm/state-helpers.c index b8fe7d87..b85fe423 100644 --- a/libweston/backend-drm/state-helpers.c +++ b/libweston/backend-drm/state-helpers.c @@ -370,8 +370,7 @@ drm_output_state_get_plane(struct drm_output_state *state_output, * in the repaint cycle; see drm_output_state_duplicate. */ struct drm_output_state * -drm_output_state_alloc(struct drm_output *output, - struct drm_pending_state *pending_state) +drm_output_state_alloc(struct drm_output *output) { struct drm_output_state *state = zalloc(sizeof(*state)); @@ -379,11 +378,7 @@ drm_output_state_alloc(struct drm_output *output, state->output = output; state->dpms = WESTON_DPMS_OFF; state->protection = WESTON_HDCP_DISABLE; - state->pending_state = pending_state; - if (pending_state) - wl_list_insert(&pending_state->output_list, &state->link); - else - wl_list_init(&state->link); + wl_list_init(&state->link); wl_list_init(&state->plane_list);