aboutsummaryrefslogtreecommitdiff
path: root/backend/drm/drm.c
diff options
context:
space:
mode:
Diffstat (limited to 'backend/drm/drm.c')
-rw-r--r--backend/drm/drm.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index a045bd53..0bf51209 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -1349,12 +1349,25 @@ void scan_drm_connectors(struct wlr_drm_backend *drm) {
parse_edid(&wlr_conn->output, edid_len, edid);
free(edid);
+ char *subconnector = NULL;
+ if (wlr_conn->props.subconnector) {
+ subconnector = get_drm_prop_enum(drm->fd,
+ wlr_conn->id, wlr_conn->props.subconnector);
+ }
+ if (subconnector && strcmp(subconnector, "Native") == 0) {
+ free(subconnector);
+ subconnector = NULL;
+ }
+
struct wlr_output *output = &wlr_conn->output;
char description[128];
- snprintf(description, sizeof(description), "%s %s %s (%s)",
- output->make, output->model, output->serial, output->name);
+ snprintf(description, sizeof(description), "%s %s %s (%s%s%s)",
+ output->make, output->model, output->serial, output->name,
+ subconnector ? " via " : "", subconnector ? subconnector : "");
wlr_output_set_description(output, description);
+ free(subconnector);
+
wlr_log(WLR_INFO, "Detected modes:");
for (int i = 0; i < drm_conn->count_modes; ++i) {