aboutsummaryrefslogtreecommitdiff
path: root/backend/drm/drm.c
diff options
context:
space:
mode:
authorScott Anderson <ascent12@hotmail.com>2017-08-05 18:15:39 +1200
committerScott Anderson <ascent12@hotmail.com>2017-08-06 15:51:49 +1200
commitdd7a3492958d2e97de185abf2539b78131cab548 (patch)
tree822d5bf30c30e4b6c9faab837c2d64c7e0051c8f /backend/drm/drm.c
parentd1ca1ec16ea29457a6964984f2fe4c808015fe6f (diff)
Various cleanups
Diffstat (limited to 'backend/drm/drm.c')
-rw-r--r--backend/drm/drm.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index d617473c..d2a4f06b 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -18,6 +18,19 @@
#include "drm.h"
#include "drm-util.h"
+bool wlr_drm_check_features(struct wlr_backend_state *drm) {
+ if (drmSetClientCap(drm->fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1)) {
+ wlr_log(L_INFO, "DRM universal planes unsupported");
+ return false;
+ }
+
+ if (drmSetClientCap(drm->fd, DRM_CLIENT_CAP_ATOMIC, 1)) {
+ wlr_log(L_INFO, "Atomic modesetting unsupported");
+ }
+
+ return true;
+}
+
static int cmp_plane(const void *arg1, const void *arg2)
{
const struct wlr_drm_plane *a = arg1;
@@ -112,7 +125,7 @@ error_res:
return false;
}
-bool wlr_drm_init_resources(struct wlr_backend_state *drm) {
+bool wlr_drm_resources_init(struct wlr_backend_state *drm) {
drmModeRes *res = drmModeGetResources(drm->fd);
if (!res) {
wlr_log_errno(L_ERROR, "Failed to get DRM resources");