diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-01-18 10:24:19 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-01-18 12:27:47 +0100 |
commit | 1eeeaefecb634ea734059685648c058dd600bcae (patch) | |
tree | c03f7dab7aa64179f295ebb83e0d4bdbdb7b5e67 /drmtools.c | |
parent | 1e49f9371f39475be7d2a3a9be2994ce5d27870b (diff) | |
download | fbida-1eeeaefecb634ea734059685648c058dd600bcae.tar.gz |
kbd: experimental libinput support
Diffstat (limited to 'drmtools.c')
-rw-r--r-- | drmtools.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -10,6 +10,7 @@ #include <sys/ioctl.h> #include <sys/mman.h> +#include <sys/stat.h> #include "gfx.h" #include "drmtools.h" @@ -226,6 +227,7 @@ static void drm_flush_display(bool second) gfxstate *drm_init(const char *device, const char *output, const char *mode, bool pageflip) { + struct stat st; gfxstate *gfx; char dev[64]; @@ -266,6 +268,9 @@ gfxstate *drm_init(const char *device, const char *output, gfx->cleanup_display = drm_cleanup_display; gfx->flush_display = drm_flush_display; + fstat(drm_fd, &st); + gfx->devnum = st.st_rdev; + if (pageflip) { if (drm_init_fb(&fb2) == 0) { gfx->mem2 = fb2.mem; |