diff options
author | Hans de Goede <hdegoede@redhat.com> | 2014-01-13 12:03:46 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2014-03-03 08:13:55 +0100 |
commit | 5fb641a29bfb4a33da964e1e9af523f3472015c6 (patch) | |
tree | 113f9a528d7d22f0a0cb10017a58f2ed52591be5 /include | |
parent | a8d802cb019da0549da57576ba0cc2cef1c8a98c (diff) |
hotplug: Extend OdevAttributes for server-managed fd support
With systemd-logind support, the xserver, rather than the drivers will be
responsible for opening/closing the fd for drm nodes.
This commit adds a fd member to OdevAttributes to store the fd to pass it
along to the driver.
systemd-logind tracks devices by their chardev major + minor numbers, so
also add OdevAttributes to store the major and minor.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hotplug.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/hotplug.h b/include/hotplug.h index 0e78721b0..1d9364eee 100644 --- a/include/hotplug.h +++ b/include/hotplug.h @@ -78,6 +78,12 @@ config_odev_free_attributes(struct OdevAttributes *attribs); #define ODEV_ATTRIB_SYSPATH 2 /* DRI-style bus id */ #define ODEV_ATTRIB_BUSID 3 +/* Server managed FD */ +#define ODEV_ATTRIB_FD 4 +/* Major number of the device node pointed to by ODEV_ATTRIB_PATH */ +#define ODEV_ATTRIB_MAJOR 5 +/* Minor number of the device node pointed to by ODEV_ATTRIB_PATH */ +#define ODEV_ATTRIB_MINOR 6 typedef void (*config_odev_probe_proc_ptr)(struct OdevAttributes *attribs); void config_odev_probe(config_odev_probe_proc_ptr probe_callback); @@ -88,4 +94,8 @@ void DeleteGPUDeviceRequest(struct OdevAttributes *attribs); #endif #define ServerIsNotSeat0() (SeatId && strcmp(SeatId, "seat0")) + +struct xf86_platform_device * +xf86_find_platform_device_by_devnum(int major, int minor); + #endif /* HOTPLUG_H */ |