diff options
Diffstat (limited to 'libdrm')
-rw-r--r-- | libdrm/xf86drmMode.c | 9 | ||||
-rw-r--r-- | libdrm/xf86drmMode.h | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/libdrm/xf86drmMode.c b/libdrm/xf86drmMode.c index 681ad417..52fef81b 100644 --- a/libdrm/xf86drmMode.c +++ b/libdrm/xf86drmMode.c @@ -191,6 +191,15 @@ err_allocs: return r; } +uint32_t drmModeGetHotplug(int fd) +{ + struct drm_mode_hotplug arg; + arg.counter = 0; + + ioctl(fd, DRM_IOCTL_MODE_HOTPLUG, &arg); + return arg.counter; +} + int drmModeAddFB(int fd, uint32_t width, uint32_t height, uint8_t depth, uint8_t bpp, uint32_t pitch, drmBO *bo, uint32_t *buf_id) { diff --git a/libdrm/xf86drmMode.h b/libdrm/xf86drmMode.h index e878c40a..7cc3ceca 100644 --- a/libdrm/xf86drmMode.h +++ b/libdrm/xf86drmMode.h @@ -159,6 +159,10 @@ extern void drmModeFreeOutput( drmModeOutputPtr ptr ); */ extern drmModeResPtr drmModeGetResources(int fd); +/** + * Retrives the hotplug counter + */ +extern uint32_t drmModeGetHotplug(int fd); /* * FrameBuffer manipulation. |