aboutsummaryrefslogtreecommitdiff
path: root/include/wlr/backend/drm.h
diff options
context:
space:
mode:
authorScott Anderson <ascent12@hotmail.com>2017-05-03 22:40:19 +1200
committerScott Anderson <ascent12@hotmail.com>2017-05-03 22:41:49 +1200
commitef9768858e5befde26db2cc4fec26a5e5bd0fe22 (patch)
tree48d4c4b579cb453472b72b985dcc682acd98235f /include/wlr/backend/drm.h
parentd196a79b6c493d74d0057d74238353180d717255 (diff)
Changed modesetting interface.
Diffstat (limited to 'include/wlr/backend/drm.h')
-rw-r--r--include/wlr/backend/drm.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/wlr/backend/drm.h b/include/wlr/backend/drm.h
index d56c7e77..c3df2409 100644
--- a/include/wlr/backend/drm.h
+++ b/include/wlr/backend/drm.h
@@ -3,16 +3,26 @@
#include <wayland-server.h>
#include <wlr/session.h>
+#include <xf86drmMode.h> // drmModeModeInfo
struct wlr_drm_backend;
struct wlr_drm_output;
+struct wlr_drm_mode {
+ uint16_t width;
+ uint16_t height;
+ uint32_t rate;
+ drmModeModeInfo mode;
+};
+
struct wlr_drm_backend *wlr_drm_backend_init(struct wl_display *display,
struct wlr_session *session, struct wl_listener *add, struct wl_listener *rem,
struct wl_listener *render);
void wlr_drm_backend_free(struct wlr_drm_backend *backend);
-bool wlr_drm_output_modeset(struct wlr_drm_output *out, const char *str);
+struct wlr_drm_mode *wlr_drm_output_get_modes(struct wlr_drm_output *out, size_t *count);
+bool wlr_drm_output_modeset(struct wlr_drm_output *out, struct wlr_drm_mode *mode);
+
void wlr_drm_output_begin(struct wlr_drm_output *out);
void wlr_drm_output_end(struct wlr_drm_output *out);