2 * Copyright © 2006-2007 Daniel Stone
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 * DEALINGS IN THE SOFTWARE.
23 * Author: Daniel Stone <daniel@fooishbar.org>
31 extern _X_EXPORT void config_pre_init(void);
32 extern _X_EXPORT void config_init(void);
33 extern _X_EXPORT void config_fini(void);
35 struct OdevAttribute {
36 struct xorg_list member;
41 struct OdevAttributes {
42 struct xorg_list list;
45 struct OdevAttributes *
46 config_odev_allocate_attribute_list(void);
49 config_odev_free_attribute_list(struct OdevAttributes *attribs);
52 config_odev_add_attribute(struct OdevAttributes *attribs, int attrib,
53 const char *attrib_name);
56 config_odev_free_attributes(struct OdevAttributes *attribs);
58 /* path to kernel device node - Linux e.g. /dev/dri/card0 */
59 #define ODEV_ATTRIB_PATH 1
60 /* system device path - Linux e.g. /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1 */
61 #define ODEV_ATTRIB_SYSPATH 2
62 /* DRI-style bus id */
63 #define ODEV_ATTRIB_BUSID 3
65 typedef void (*config_odev_probe_proc_ptr)(struct OdevAttributes *attribs);
66 void config_odev_probe(config_odev_probe_proc_ptr probe_callback);
68 #ifdef CONFIG_UDEV_KMS
69 void NewGPUDeviceRequest(struct OdevAttributes *attribs);
70 void DeleteGPUDeviceRequest(struct OdevAttributes *attribs);
73 #define ServerIsNotSeat0() (SeatId && strcmp(SeatId, "seat0"))
74 #endif /* HOTPLUG_H */