• Home
Name Date Size #Lines LOC

..--

READMED03-May-20244.7 KiB13499

amdgpu_drm.hD03-May-202426.9 KiB950575

drm.hD03-May-202429.9 KiB989592

drm_fourcc.hD03-May-202417.7 KiB413127

drm_mode.hD03-May-202423 KiB876466

drm_sarea.hD03-May-20242.7 KiB9342

i915_drm.hD03-May-202454.7 KiB1,725772

mach64_drm.hD03-May-20247.7 KiB257148

mga_drm.hD03-May-202412.7 KiB428231

nouveau_class.hD03-May-202424.7 KiB652513

nouveau_drm.hD03-May-20247.8 KiB301231

nouveau_ioctl.hD03-May-20243.2 KiB129102

qxl_drm.hD03-May-20244.1 KiB16198

r128_drm.hD03-May-20249.8 KiB337217

radeon_drm.hD03-May-202437.4 KiB1,080791

savage_drm.hD03-May-20247 KiB221140

sis_drm.hD03-May-20242.6 KiB7836

tegra_drm.hD03-May-20246.5 KiB247177

vc4_drm.hD03-May-202413.9 KiB436219

via_drm.hD03-May-20248.2 KiB284190

virtgpu_drm.hD03-May-20244.7 KiB176118

vmwgfx_drm.hD03-May-202431.3 KiB1,129310

README

1What are these headers ?
2------------------------
3This is the canonical source of drm headers that user space should use for
4communicating with the kernel DRM subsystem.
5
6They flow from the kernel, thus any changes must be merged there first.
7Do _not_ attempt to "fix" these by deviating from the kernel ones !
8
9
10Non-linux platforms - changes/patches
11-------------------------------------
12If your platform has local changes, please send them upstream for inclusion.
13Even if your patches don't get accepted in their current form, devs will
14give you feedback on how to address things properly.
15
16git send-email --subject-prefix="PATCH libdrm" your patches to dri-devel
17mailing list.
18
19Before doing so, please consider the following:
20 - Have the [libdrm vs kernel] headers on your platform deviated ?
21Consider unifying them first.
22
23 - Have you introduced additional ABI that's not available in Linux ?
24Propose it for [Linux kernel] upstream inclusion.
25If that doesn't work out (hopefully it never does), move it to another header
26and/or keep the change(s) local ?
27
28 - Are your changes DRI1/UMS specific ?
29There is virtually no interest/power in keeping those legacy interfaces. They
30are around due to the kernel "thou shalt not break existing user space" rule.
31
32Consider porting the driver to DRI2/KMS - all (almost?) sensible hardware is
33capable of supporting those.
34
35
36Which headers go where ?
37------------------------
38A snipped from the, now removed, Makefile.am used to state:
39
40  XXX airlied says, nothing besides *_drm.h and drm*.h should be necessary.
41  however, r300 and via need their reg headers installed in order to build.
42  better solutions are welcome.
43
44Obviously the r300 and via headers are no longer around ;-)
45
46Reason behind is that the drm headers can be used as a basic communications
47channel with the respective kernel modules. If more advanced functionality is
48required one can pull the specific libdrm_$driver which is free to pull
49additional files from the kernel.
50
51For example: nouveau has nouveau/nvif/*.h while vc4 has vc4/*.h
52
53If your driver is still in prototyping/staging state, consider moving the
54$driver_drm.h into $driver and _not_ installing it. An header providing opaque
55definitions and access [via $driver_drmif.h or similar] would be better fit.
56
57
58When and which headers to update
59--------------------------------
60Ideally all files will be synced (updated) with the latest released kernel on
61each libdrm release. Sadly that's not yet possible since quite a few headers
62differ significantly - see Outdated or Broken Headers section below.
63
64That said, it's up-to the individual developers to sync with newer version
65(from drm-next) as they see fit.
66
67
68When and how to update these files
69----------------------------------
70Note: One should not do _any_ changes to the files apart from the steps below.
71
72In order to update the files do the following:
73 - Switch to a Linux kernel tree/branch which is not rebased.
74For example: airlied/drm-next
75 - Install the headers via `make headers_install' to a separate location.
76 - Copy the drm header[s] + git add + git commit.
77 - Note: Your commit message must include:
78   a) Brief summary on the delta. If there's any change that looks like an
79API/ABI break one _must_ explicitly state why it's safe to do so.
80   b) "Generated using make headers_install."
81   c) "Generated from $tree/branch commit $sha"
82
83
84Outdated or Broken Headers
85--------------------------
86This section contains a list of headers and the respective "issues" they might
87have relative to their kernel equivalent.
88
89Most UMS headers:
90 - Not using fixed size integers - compat ioctls are broken.
91Status: ?
92Promote to fixed size ints, which match the current (32bit) ones.
93
94nouveau_drm.h
95 - Missing macros NOUVEAU_GETPARAM*, NOUVEAU_DRM_HEADER_PATCHLEVEL, structs,
96enums
97Status: Deliberate UABI choice; nouveau hides the exact kernel ABI behind libdrm
98
99r128_drm.h
100 - Broken compat ioctls.
101
102radeon_drm.h
103 - Missing RADEON_TILING_R600_NO_SCANOUT, CIK_TILE_MODE_*, broken UMS ioctls
104 - Both kernel and libdrm: missing padding -
105drm_radeon_gem_{create,{g,s}et_tiling,set_domain} others ?
106Status: ?
107
108savage_drm.h
109 - Renamed ioctls - DRM_IOCTL_SAVAGE_{,BCI}_EVENT_EMIT, compat ioctls are broken.
110Status: ?
111
112sis_drm.h
113 - Borken ioctls + libdrm uses int vs kernel long
114Status: ?
115
116via_drm.h
117 - Borken ioctls - libdrm int vs kernel long
118Status: ?
119
120
121omap_drm.h (living in $TOP/omap)
122 - License mismatch, missing DRM_IOCTL_OMAP_GEM_NEW and related struct
123Status: ?
124
125msm_drm.h (located in $TOP/freedreno/msm/)
126 - License mismatch, missing MSM_PIPE_*, MSM_SUBMIT_*. Renamed
127drm_msm_gem_submit::flags, missing drm_msm_gem_submit::fence_fd.
128Status: ?
129
130exynos_drm.h (living in $TOP/exynos)
131 - License mismatch, now using fixed size ints (but not everywhere). Lots of
132new stuff.
133Status: ?
134