Read DRM_CAP_ADDFB2_MODIFIERS
This commit is contained in:
parent
4e6204e079
commit
c7c917e39a
2 changed files with 6 additions and 0 deletions
|
@ -440,6 +440,11 @@ int init_drm(struct drm_t *drm, const char *device, const char *mode_str, unsign
|
|||
drm->cursor_height = 64;
|
||||
}
|
||||
|
||||
uint64_t cap;
|
||||
if (drmGetCap(drm->fd, DRM_CAP_ADDFB2_MODIFIERS, &cap) == 0 && cap != 0) {
|
||||
drm->allow_modifiers = true;
|
||||
}
|
||||
|
||||
if (drmSetClientCap(drm->fd, DRM_CLIENT_CAP_ATOMIC, 1) != 0) {
|
||||
fprintf(stderr, "drmSetClientCap(ATOMIC) failed\n");
|
||||
return -1;
|
||||
|
|
|
@ -53,6 +53,7 @@ struct drm_t {
|
|||
int fd;
|
||||
|
||||
uint64_t cursor_width, cursor_height;
|
||||
bool allow_modifiers;
|
||||
|
||||
/* only used for atomic: */
|
||||
struct plane *plane;
|
||||
|
|
Loading…
Reference in a new issue