VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.17.1/hotplug.h@ 77662

最後變更 在這個檔案從77662是 54163,由 vboxsync 提交於 10 年 前

Additions/x11/vboxvideo: support X.Org Server 1.17 (still untested).

  • 屬性 svn:eol-style 設為 native
檔案大小: 2.8 KB
 
1/*
2 * Copyright © 2006-2007 Daniel Stone
3 *
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:
10 *
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
13 * Software.
14 *
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.
22 *
23 * Author: Daniel Stone <[email protected]>
24 */
25
26#ifndef HOTPLUG_H
27#define HOTPLUG_H
28
29#include "list.h"
30
31extern _X_EXPORT void config_pre_init(void);
32extern _X_EXPORT void config_init(void);
33extern _X_EXPORT void config_fini(void);
34
35/* Bump this each time you add something to the struct
36 * so that drivers can easily tell what is available
37 */
38#define ODEV_ATTRIBUTES_VERSION 1
39
40struct OdevAttributes {
41 /* path to kernel device node - Linux e.g. /dev/dri/card0 */
42 char *path;
43
44 /* system device path - Linux e.g. /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1 */
45 char *syspath;
46
47 /* DRI-style bus id */
48 char *busid;
49
50 /* Server managed FD */
51 int fd;
52
53 /* Major number of the device node pointed to by ODEV_ATTRIB_PATH */
54 int major;
55
56 /* Minor number of the device node pointed to by ODEV_ATTRIB_PATH */
57 int minor;
58
59 /* kernel driver name */
60 char *driver;
61};
62
63/* Note starting with xserver 1.16 this function never fails */
64struct OdevAttributes *
65config_odev_allocate_attributes(void);
66
67void
68config_odev_free_attributes(struct OdevAttributes *attribs);
69
70typedef void (*config_odev_probe_proc_ptr)(struct OdevAttributes *attribs);
71void config_odev_probe(config_odev_probe_proc_ptr probe_callback);
72
73#ifdef CONFIG_UDEV_KMS
74void NewGPUDeviceRequest(struct OdevAttributes *attribs);
75void DeleteGPUDeviceRequest(struct OdevAttributes *attribs);
76#endif
77
78#define ServerIsNotSeat0() (SeatId && strcmp(SeatId, "seat0"))
79
80struct xf86_platform_device *
81xf86_find_platform_device_by_devnum(int major, int minor);
82
83#endif /* HOTPLUG_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette