diff options
author | Jakob Bornecrantz <jakob@tungstengraphics.com> | 2008-02-07 19:25:52 +0100 |
---|---|---|
committer | Jakob Bornecrantz <jakob@tungstengraphics.com> | 2008-02-07 19:25:52 +0100 |
commit | c8b45e9362aa16fed08540996af6d0b1e2e730d0 (patch) | |
tree | 1266049cad56dc682a3d1a70ee31f2fc1c9d42be /libdrm | |
parent | 0618ac8a07d834e469cb96818a1dfee6f50662b8 (diff) |
Added userspace part of hotplug ioctl and demo
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. |