mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-07 13:29:49 -05:00
backend/drm: use drmModeGetConnectorTypeName
No need to manually maintain this table now.
The wlroots names and the libdrm (= kernel) names all match.
References: 50f8d51773
This commit is contained in:
parent
972a5cdf7a
commit
bd587a7f43
4 changed files with 8 additions and 36 deletions
|
|
@ -1250,9 +1250,14 @@ void scan_drm_connectors(struct wlr_drm_backend *drm,
|
|||
wlr_conn->status = WLR_DRM_CONN_DISCONNECTED;
|
||||
wlr_conn->id = drm_conn->connector_id;
|
||||
|
||||
const char *conn_name =
|
||||
drmModeGetConnectorTypeName(drm_conn->connector_type);
|
||||
if (conn_name == NULL) {
|
||||
conn_name = "Unknown";
|
||||
}
|
||||
|
||||
snprintf(wlr_conn->name, sizeof(wlr_conn->name),
|
||||
"%s-%"PRIu32, conn_get_name(drm_conn->connector_type),
|
||||
drm_conn->connector_type_id);
|
||||
"%s-%"PRIu32, conn_name, drm_conn->connector_type_id);
|
||||
|
||||
wl_list_insert(drm->outputs.prev, &wlr_conn->link);
|
||||
wlr_log(WLR_INFO, "Found connector '%s'", wlr_conn->name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue