Lines Matching +full:interface +full:- +full:node

9 addition, drivers export device-specific interfaces for use by userspace
10 drivers & device-aware applications through ioctls and sysfs files.
16 Cover generic ioctls and sysfs layout here. We only need high-level
22 .. kernel-doc:: drivers/gpu/drm/drm_ioctl.c
31 .. kernel-doc:: drivers/gpu/drm/drm_auth.c
34 .. kernel-doc:: drivers/gpu/drm/drm_auth.c
37 .. kernel-doc:: include/drm/drm_auth.h
46 .. kernel-doc:: drivers/gpu/drm/drm_lease.c
49 Open-Source Userspace Requirements
57 open-sourced userspace patches, and those patches must be reviewed and ready for
75 - The Linux kernel's "no regression" policy holds in practice only for
76 open-source userspace of the DRM subsystem. DRM developers are perfectly fine
77 if closed-source blob drivers in userspace use the same uAPI as the open
82 - Any new userspace interface must have an open-source implementation as
85 The other reason for requiring open-source userspace is uAPI review. Since the
87 review can only assess whether a new interface achieves its goals by looking at
88 both sides. Making sure that the interface indeed covers the use-case fully
91 - The open-source userspace must not be a toy/test application, but the real
94 assess the fitness of a proposed interface.
96 - The userspace side must be fully reviewed and tested to the standards of that
98 mailing list. This is again to ensure that the new interface actually gets the
99 job done. The userspace-side reviewer should also provide an Acked-by on the
103 - The userspace patches must be against the canonical upstream, not some vendor
107 - The kernel patch can only be merged after all the above requirements are met,
108 but it **must** be merged to either drm-next or drm-misc-next **before** the
118 for the same thing co-existing. If we add a few more complete mistakes into the
126 DRM core provides multiple character-devices for user-space to use.
127 Depending on which device is opened, user-space can perform a different
128 set of operations (mainly ioctls). The primary node is always created
129 and called card<num>. Additionally, a currently unused control node,
130 called controlD<num> is also created. The primary node provides all
131 legacy operations and historically was the only interface used by
132 userspace. With KMS, the control node was introduced. However, the
133 planned KMS control interface has never been written and so the control
134 node stays unused to date.
139 authenticate to a DRM-Master prior to getting GPU access. To avoid this
143 Only non-global rendering commands are allowed. If a driver supports
145 capability. If not supported, the primary node must be used for render
148 If a driver advertises render node support, DRM core will create a
149 separate render node called renderD<num>. There will be one render node
150 per device. No ioctls except PRIME-related ioctls will be allowed on
151 this node. Especially GEM_OPEN will be explicitly prohibited. Render
152 nodes are designed to avoid the buffer-leaks, which occur if clients
153 guess the flink names or mmap offsets on the legacy interface.
154 Additionally to this basic interface, drivers must mark their
155 driver-dependent render-only ioctls as DRM_RENDER_ALLOW so render
159 With render nodes, user-space can now control access to the render node
160 via basic file-system access-modes. A running graphics server which
161 authenticates clients on the privileged primary/legacy node is no longer
162 required. Instead, a client can open the render node and is immediately
164 via PRIME. FLINK from render node to legacy node is not supported. New
165 clients must not use the insecure FLINK interface.
168 DRM-Master concept. There is no reason to associate render clients with
169 a DRM-Master as they are independent of any graphics server. Besides,
173 visible to user-space and accessible beyond open-file boundaries, they
176 Device Hot-Unplug
185 user is able to hot-unplug this kind of devices while they are being
187 damage from hot-unplugging a DRM device needs to be limited as much as
202 (or driver-specific ioctls returning driver-specific things), or open()
220 -------------------------
222 - KMS connectors must change their status to disconnected.
224 - Legacy modesets and pageflips, and atomic commits, both real and
228 - Pending non-blocking KMS operations deliver the DRM events userspace
231 - open() on a device node whose underlying device has disappeared will
234 - Attempting to create a DRM lease on a disappeared DRM device will
238 Requirements for Render and Cross-Device UAPI
239 ---------------------------------------------
241 - All GPU jobs that can no longer run must have their fences
242 force-signalled to avoid inflicting hangs on userspace.
245 - Some userspace APIs already define what should happen when the device
249 driver-specific ioctls and handling those in userspace drivers, or
252 - dmabuf which point to memory that has disappeared will either fail to
257 - Attempting to import a dmabuf to a disappeared device will either fail
261 - open() on a device node whose underlying device has disappeared will
268 ----------------------------
275 dmabuf which might be mapped to other devices (cross-device dmabuf
291 .. kernel-doc:: drivers/gpu/drm/drm_ioctl.c
295 -------------------------------
318 E.g. root-only or much more common, DRM master-only operations return
330 when the exporting driver of a shared dma-buf or fence doesn't support a
344 Catch-all for anything that is an invalid argument combination which
352 .. kernel-doc:: include/drm/drm_ioctl.h
355 .. kernel-doc:: drivers/gpu/drm/drm_ioctl.c
358 .. kernel-doc:: drivers/gpu/drm/drm_ioc32.c
365 --------------------------------------
367 New cross-driver userspace interface extensions, like new IOCTL, new KMS
369 should have driver-agnostic testcases in IGT for that feature, if such a test
373 ---------------------------
379 https://gitlab.freedesktop.org/drm/igt-gpu-tools/.
382 --------------------------
384 VKMS is a software-only model of a KMS driver that is useful for testing
398 It's possible to run the IGT-tests in a VM in two ways:
404 the host machine to run igt-tests. As an example it's used virtme::
406 $ virtme-run --rwdir /path/for/shared_dir --kdir=path/for/kernel/directory --mods=auto
408 Run the igt-tests in the guest machine, as example it's ran the 'kms_flip'
411 $ /path/for/igt-gpu-tools/scripts/run-tests.sh -p -s -t "kms_flip.*" -v
414 (-p option); it's created html summary of the tests results and it's saved
415 in the folder "igt-gpu-tools/results"; it's executed only the igt-tests
416 matching the -t option.
419 -------------------
421 .. kernel-doc:: drivers/gpu/drm/drm_debugfs_crc.c
424 .. kernel-doc:: drivers/gpu/drm/drm_debugfs_crc.c
428 ---------------
430 .. kernel-doc:: include/drm/drm_debugfs.h
433 .. kernel-doc:: drivers/gpu/drm/drm_debugfs.c
439 .. kernel-doc:: drivers/gpu/drm/drm_sysfs.c
442 .. kernel-doc:: drivers/gpu/drm/drm_sysfs.c
457 This was only used for user-mode-settind drivers around modesetting
461 call this any more since with kernel mode setting it is a no-op.
466 .. kernel-doc:: include/uapi/drm/drm_mode.h
472 ----------
482 .. kernel-doc:: include/uapi/drm/drm.h
485 .. kernel-doc:: include/uapi/drm/drm_mode.h