hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/Documentation/gpu/drm-internals.rst
....@@ -24,9 +24,9 @@
2424 At the core of every DRM driver is a :c:type:`struct drm_driver
2525 <drm_driver>` structure. Drivers typically statically initialize
2626 a drm_driver structure, and then pass it to
27
-:c:func:`drm_dev_alloc()` to allocate a device instance. After the
27
+drm_dev_alloc() to allocate a device instance. After the
2828 device instance is fully initialized it can be registered (which makes
29
-it accessible from userspace) using :c:func:`drm_dev_register()`.
29
+it accessible from userspace) using drm_dev_register().
3030
3131 The :c:type:`struct drm_driver <drm_driver>` structure
3232 contains static information that describes the driver and features it
....@@ -38,68 +38,6 @@
3838
3939 Driver Information
4040 ------------------
41
-
42
-Driver Features
43
-~~~~~~~~~~~~~~~
44
-
45
-Drivers inform the DRM core about their requirements and supported
46
-features by setting appropriate flags in the driver_features field.
47
-Since those flags influence the DRM core behaviour since registration
48
-time, most of them must be set to registering the :c:type:`struct
49
-drm_driver <drm_driver>` instance.
50
-
51
-u32 driver_features;
52
-
53
-DRIVER_USE_AGP
54
- Driver uses AGP interface, the DRM core will manage AGP resources.
55
-
56
-DRIVER_LEGACY
57
- Denote a legacy driver using shadow attach. Don't use.
58
-
59
-DRIVER_KMS_LEGACY_CONTEXT
60
- Used only by nouveau for backwards compatibility with existing userspace.
61
- Don't use.
62
-
63
-DRIVER_PCI_DMA
64
- Driver is capable of PCI DMA, mapping of PCI DMA buffers to
65
- userspace will be enabled. Deprecated.
66
-
67
-DRIVER_SG
68
- Driver can perform scatter/gather DMA, allocation and mapping of
69
- scatter/gather buffers will be enabled. Deprecated.
70
-
71
-DRIVER_HAVE_DMA
72
- Driver supports DMA, the userspace DMA API will be supported.
73
- Deprecated.
74
-
75
-DRIVER_HAVE_IRQ; DRIVER_IRQ_SHARED
76
- DRIVER_HAVE_IRQ indicates whether the driver has an IRQ handler
77
- managed by the DRM Core. The core will support simple IRQ handler
78
- installation when the flag is set. The installation process is
79
- described in ?.
80
-
81
- DRIVER_IRQ_SHARED indicates whether the device & handler support
82
- shared IRQs (note that this is required of PCI drivers).
83
-
84
-DRIVER_GEM
85
- Driver use the GEM memory manager.
86
-
87
-DRIVER_MODESET
88
- Driver supports mode setting interfaces (KMS).
89
-
90
-DRIVER_PRIME
91
- Driver implements DRM PRIME buffer sharing.
92
-
93
-DRIVER_RENDER
94
- Driver supports dedicated render nodes.
95
-
96
-DRIVER_ATOMIC
97
- Driver supports atomic properties. In this case the driver must
98
- implement appropriate obj->atomic_get_property() vfuncs for any
99
- modeset objects with driver specific properties.
100
-
101
-DRIVER_SYNCOBJ
102
- Driver support drm sync objects.
10341
10442 Major, Minor and Patchlevel
10543 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
....@@ -143,6 +81,9 @@
14381 .. kernel-doc:: drivers/gpu/drm/drm_drv.c
14482 :doc: driver instance overview
14583
84
+.. kernel-doc:: include/drm/drm_device.h
85
+ :internal:
86
+
14687 .. kernel-doc:: include/drm/drm_drv.h
14788 :internal:
14889
....@@ -152,6 +93,11 @@
15293 Driver Load
15394 -----------
15495
96
+Component Helper Usage
97
+~~~~~~~~~~~~~~~~~~~~~~
98
+
99
+.. kernel-doc:: drivers/gpu/drm/drm_drv.c
100
+ :doc: component helper usage recommendations
155101
156102 IRQ Helper Library
157103 ~~~~~~~~~~~~~~~~~~
....@@ -185,6 +131,18 @@
185131 be unmapped; on many devices, the ROM address decoder is shared with
186132 other BARs, so leaving it mapped could cause undesired behaviour like
187133 hangs or memory corruption.
134
+
135
+Managed Resources
136
+-----------------
137
+
138
+.. kernel-doc:: drivers/gpu/drm/drm_managed.c
139
+ :doc: managed resources
140
+
141
+.. kernel-doc:: drivers/gpu/drm/drm_managed.c
142
+ :export:
143
+
144
+.. kernel-doc:: include/drm/drm_managed.h
145
+ :internal:
188146
189147 Bus-specific Device Registration and PCI Support
190148 ------------------------------------------------
....@@ -230,6 +188,15 @@
230188 .. kernel-doc:: drivers/gpu/drm/drm_print.c
231189 :export:
232190
191
+Utilities
192
+---------
193
+
194
+.. kernel-doc:: include/drm/drm_util.h
195
+ :doc: drm utils
196
+
197
+.. kernel-doc:: include/drm/drm_util.h
198
+ :internal:
199
+
233200
234201 Legacy Support Code
235202 ===================