diff options
author | Simon Ser <contact@emersion.fr> | 2023-05-30 13:04:58 +0200 |
---|---|---|
committer | Alexander Orzechowski <alex@ozal.ski> | 2023-05-31 22:37:12 +0000 |
commit | 30aca4df0de6797df4d1f41550958935f986a4c9 (patch) | |
tree | e1c17b8ab731183a45b56526e29f57d8199753f9 /backend/drm | |
parent | ba276e5ac21ecfa5bf1e3b9c7ae140c4880e2a3a (diff) |
backend/drm: introduce wlr_drm_mode_get_info()
This allows compositors to get back the raw drmModeModeInfo and
look at DRM-specific fields and flags.
Diffstat (limited to 'backend/drm')
-rw-r--r-- | backend/drm/drm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index d2a4f074..cc887a14 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -907,6 +907,11 @@ struct wlr_output_mode *wlr_drm_connector_add_mode(struct wlr_output *output, return &mode->wlr_mode; } +const drmModeModeInfo *wlr_drm_mode_get_info(struct wlr_output_mode *wlr_mode) { + const struct wlr_drm_mode *mode = wl_container_of(wlr_mode, mode, wlr_mode); + return &mode->drm_mode; +} + static bool drm_connector_set_cursor(struct wlr_output *output, struct wlr_buffer *buffer, int hotspot_x, int hotspot_y) { struct wlr_drm_connector *conn = get_drm_connector_from_output(output); |