backend-drm,pipewire,remoting: do not set monitor serial to "unknown"

If serial is unknown, it's best to leave it as NULL. All usage sites
already deal with it possibly being NULL.

This makes DRM-backend consistent with all other backend that leave
serial as NULL, allowing to move the initialization of these fields into
core.

Pipewire and remoting plugins are modified just for consistency.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen 2023-08-31 14:32:07 +03:00 committed by Marius Vlad
parent e541aea2d7
commit 3728d7e99b
3 changed files with 3 additions and 5 deletions

View File

@ -601,7 +601,7 @@ update_head_from_connector(struct drm_head *head)
weston_head_set_monitor_strings(&head->base, dhi.make ?: "unknown",
dhi.model ?: "unknown",
dhi.serial_number ?: "unknown");
dhi.serial_number);
prune_eotf_modes_by_kms_support(head, &dhi.eotf_mask);
weston_head_set_supported_eotf_mask(&head->base, dhi.eotf_mask);

View File

@ -524,7 +524,6 @@ pipewire_output_create(struct weston_compositor *c, char *name)
const struct weston_drm_virtual_output_api *api;
const char *make = "Weston";
const char *model = "Virtual Display";
const char *serial_number = "unknown";
const char *connector_name = "pipewire";
char *remoting_name;
@ -566,7 +565,7 @@ pipewire_output_create(struct weston_compositor *c, char *name)
str_printf(&remoting_name, "%s-%s", connector_name, name);
weston_head_init(head, remoting_name);
weston_head_set_subpixel(head, WL_OUTPUT_SUBPIXEL_NONE);
weston_head_set_monitor_strings(head, make, model, serial_number);
weston_head_set_monitor_strings(head, make, model, NULL);
head->compositor = c;
output->head = head;

View File

@ -752,7 +752,6 @@ remoting_output_create(struct weston_compositor *c, char *name)
const struct weston_drm_virtual_output_api *api;
const char *make = "Renesas";
const char *model = "Virtual Display";
const char *serial_number = "unknown";
const char *connector_name = "remoting";
char *remoting_name;
@ -790,7 +789,7 @@ remoting_output_create(struct weston_compositor *c, char *name)
str_printf(&remoting_name, "%s-%s", connector_name, name);
weston_head_init(head, remoting_name);
weston_head_set_subpixel(head, WL_OUTPUT_SUBPIXEL_NONE);
weston_head_set_monitor_strings(head, make, model, serial_number);
weston_head_set_monitor_strings(head, make, model, NULL);
head->compositor = c;
weston_output_attach_head(output->output, head);