aboutsummaryrefslogtreecommitdiff
path: root/include/backend
diff options
context:
space:
mode:
Diffstat (limited to 'include/backend')
-rw-r--r--include/backend/drm/drm.h11
-rw-r--r--include/backend/drm/iface.h8
-rw-r--r--include/backend/drm/properties.h3
-rw-r--r--include/backend/multi.h1
-rw-r--r--include/backend/x11.h1
5 files changed, 19 insertions, 5 deletions
diff --git a/include/backend/drm/drm.h b/include/backend/drm/drm.h
index ac23cd9a..de5212d3 100644
--- a/include/backend/drm/drm.h
+++ b/include/backend/drm/drm.h
@@ -6,6 +6,7 @@
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
+#include <time.h>
#include <wayland-server.h>
#include <wayland-util.h>
#include <wlr/backend/drm.h>
@@ -57,6 +58,9 @@ struct wlr_drm_crtc {
union wlr_drm_crtc_props props;
struct wl_list connectors;
+
+ uint16_t *gamma_table;
+ size_t gamma_table_size;
};
struct wlr_drm_backend {
@@ -64,6 +68,7 @@ struct wlr_drm_backend {
struct wlr_drm_backend *parent;
const struct wlr_drm_interface *iface;
+ clockid_t clock;
int fd;
@@ -104,10 +109,14 @@ struct wlr_drm_backend {
};
enum wlr_drm_connector_state {
+ // Connector is available but no output is plugged in
WLR_DRM_CONN_DISCONNECTED,
+ // An output just has been plugged in and is waiting for a modeset
WLR_DRM_CONN_NEEDS_MODESET,
WLR_DRM_CONN_CLEANUP,
WLR_DRM_CONN_CONNECTED,
+ // Connector disappeared, waiting for being destroyed on next page-flip
+ WLR_DRM_CONN_DISAPPEARED,
};
struct wlr_drm_mode {
@@ -147,5 +156,7 @@ void restore_drm_outputs(struct wlr_drm_backend *drm);
void scan_drm_connectors(struct wlr_drm_backend *state);
int handle_drm_event(int fd, uint32_t mask, void *data);
bool enable_drm_connector(struct wlr_output *output, bool enable);
+bool set_drm_connector_gamma(struct wlr_output *output, size_t size,
+ const uint16_t *r, const uint16_t *g, const uint16_t *b);
#endif
diff --git a/include/backend/drm/iface.h b/include/backend/drm/iface.h
index ef0e7bf8..5308b136 100644
--- a/include/backend/drm/iface.h
+++ b/include/backend/drm/iface.h
@@ -28,11 +28,11 @@ struct wlr_drm_interface {
struct wlr_drm_crtc *crtc, int x, int y);
// Set the gamma lut on crtc
bool (*crtc_set_gamma)(struct wlr_drm_backend *drm,
- struct wlr_drm_crtc *crtc, uint16_t *r, uint16_t *g, uint16_t *b,
- uint32_t size);
+ struct wlr_drm_crtc *crtc, size_t size,
+ uint16_t *r, uint16_t *g, uint16_t *b);
// Get the gamma lut size of a crtc
- uint32_t (*crtc_get_gamma_size)(struct wlr_drm_backend *drm,
- struct wlr_drm_crtc *crtc);
+ size_t (*crtc_get_gamma_size)(struct wlr_drm_backend *drm,
+ struct wlr_drm_crtc *crtc);
};
extern const struct wlr_drm_interface atomic_iface;
diff --git a/include/backend/drm/properties.h b/include/backend/drm/properties.h
index 5b17e77e..321b4492 100644
--- a/include/backend/drm/properties.h
+++ b/include/backend/drm/properties.h
@@ -14,12 +14,13 @@ union wlr_drm_connector_props {
struct {
uint32_t edid;
uint32_t dpms;
+ uint32_t link_status; // not guaranteed to exist
// atomic-modesetting only
uint32_t crtc_id;
};
- uint32_t props[3];
+ uint32_t props[4];
};
union wlr_drm_crtc_props {
diff --git a/include/backend/multi.h b/include/backend/multi.h
index c57c48f3..2f5f1bd4 100644
--- a/include/backend/multi.h
+++ b/include/backend/multi.h
@@ -8,6 +8,7 @@
struct wlr_multi_backend {
struct wlr_backend backend;
+ struct wlr_session *session;
struct wl_list backends;
diff --git a/include/backend/x11.h b/include/backend/x11.h
index 38aaad50..37e3e4b6 100644
--- a/include/backend/x11.h
+++ b/include/backend/x11.h
@@ -3,6 +3,7 @@
#include <stdbool.h>
#include <wayland-server.h>
+#include <wlr/config.h>
#include <wlr/backend/x11.h>
#include <wlr/interfaces/wlr_input_device.h>
#include <wlr/interfaces/wlr_output.h>