diff options
author | Scott Anderson <ascent12@hotmail.com> | 2018-10-08 21:01:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-08 21:01:30 +0200 |
commit | 885586a831437c1f9b5bff74fc48e64c2ed9669e (patch) | |
tree | 68d4a1d6347d1c872501929df0b6afbf8a87bc1f /backend/drm/properties.c | |
parent | 97049576f7d19534aacc685902b582f9d5ad4e83 (diff) | |
parent | f5a147b739ebd33bc61996a179801775192b19ce (diff) |
Merge pull request #1280 from emersion/drm-link-status
backend/drm: add support for the link-status property
Diffstat (limited to 'backend/drm/properties.c')
-rw-r--r-- | backend/drm/properties.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/backend/drm/properties.c b/backend/drm/properties.c index 372de232..5ca4c8ac 100644 --- a/backend/drm/properties.c +++ b/backend/drm/properties.c @@ -19,9 +19,10 @@ struct prop_info { static const struct prop_info connector_info[] = { #define INDEX(name) (offsetof(union wlr_drm_connector_props, name) / sizeof(uint32_t)) - { "CRTC_ID", INDEX(crtc_id) }, - { "DPMS", INDEX(dpms) }, - { "EDID", INDEX(edid) }, + { "CRTC_ID", INDEX(crtc_id) }, + { "DPMS", INDEX(dpms) }, + { "EDID", INDEX(edid) }, + { "link-status", INDEX(link_status) }, #undef INDEX }; @@ -87,7 +88,8 @@ static bool scan_properties(int fd, uint32_t id, uint32_t type, uint32_t *result return true; } -bool get_drm_connector_props(int fd, uint32_t id, union wlr_drm_connector_props *out) { +bool get_drm_connector_props(int fd, uint32_t id, + union wlr_drm_connector_props *out) { return scan_properties(fd, id, DRM_MODE_OBJECT_CONNECTOR, out->props, connector_info, sizeof(connector_info) / sizeof(connector_info[0])); } @@ -103,7 +105,8 @@ bool get_drm_plane_props(int fd, uint32_t id, union wlr_drm_plane_props *out) { } bool get_drm_prop(int fd, uint32_t obj, uint32_t prop, uint64_t *ret) { - drmModeObjectProperties *props = drmModeObjectGetProperties(fd, obj, DRM_MODE_OBJECT_ANY); + drmModeObjectProperties *props = + drmModeObjectGetProperties(fd, obj, DRM_MODE_OBJECT_ANY); if (!props) { return false; } |