diff options
-rw-r--r-- | backend/drm/drm.c | 5 | ||||
-rw-r--r-- | include/wlr/backend/drm.h | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 0bf51209..99520143 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -1046,6 +1046,11 @@ bool wlr_output_is_drm(struct wlr_output *output) { return output->impl == &output_impl; } +uint32_t wlr_drm_connector_get_id(struct wlr_output *output) { + struct wlr_drm_connector *conn = get_drm_connector_from_output(output); + return conn->id; +} + static const int32_t subpixel_map[] = { [DRM_MODE_SUBPIXEL_UNKNOWN] = WL_OUTPUT_SUBPIXEL_UNKNOWN, [DRM_MODE_SUBPIXEL_HORIZONTAL_RGB] = WL_OUTPUT_SUBPIXEL_HORIZONTAL_RGB, diff --git a/include/wlr/backend/drm.h b/include/wlr/backend/drm.h index 0a307166..baa03421 100644 --- a/include/wlr/backend/drm.h +++ b/include/wlr/backend/drm.h @@ -29,6 +29,11 @@ bool wlr_backend_is_drm(struct wlr_backend *backend); bool wlr_output_is_drm(struct wlr_output *output); /** + * Get the KMS connector object ID. + */ +uint32_t wlr_drm_connector_get_id(struct wlr_output *output); + +/** * Add mode to the list of available modes */ typedef struct _drmModeModeInfo drmModeModeInfo; |