mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
Various cleanups
This commit is contained in:
parent
d1ca1ec16e
commit
dd7a349295
3 changed files with 61 additions and 50 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue