drm: Remove unnecessary parameter from drm_output_state_alloc()

We never pass this anything but NULL.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2024-08-19 10:25:25 -05:00
parent 49278973c0
commit 60d777803d
5 changed files with 7 additions and 12 deletions

View File

@ -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,

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);