1This directory contains a copy of the installed kernel headers 2required by several drivers to communicate with the kernel. 3Whenever one of those driver needs new definitions for new kernel 4APIs, these files should be updated. 5 6These files in upstream Mesa should only be updated once the changes 7have landed in the drm-next branch of the drm repository. 8 9The drm repository is currently located at: 10 11 * https://gitlab.freedesktop.org/drm/kernel 12 13 * git url: https://gitlab.freedesktop.org/drm/kernel.git 14 15Tagged Linux kernel releases can also be used. 16 17When using the drm repository, it is recommended that the headers are 18generated using a *merge commit* in the drm-next branch. After 19checking out the commit in the drm (or tagged Linux release) tree, the 20drm-uapi files can be generated by running this from the drm tree: 21 22$ make headers_install INSTALL_HDR_PATH=/path/to/install 23 24This will generate files under /path/to/install/include/drm which can 25be copied into the Mesa include/drm-uapi directory. It is not required 26to copy/update all kernel header files. 27 28The commit message for the Mesa drm-uapi update should include the 29full commit version of the drm kernel tree. An easy way to generate 30this is with the following command in the drm tree: 31 32$ git log -1 --pretty=short --no-decorate 33 34Which would produce output similar to this to include in the Mesa 35commit: 36 37commit a78313bb206e0c456a989f380c4cbd8af8af7c76 38Merge: 365aa9f57399 79655e867ad6 39Author: Dave Airlie <[email protected]> 40 41 Merge tag 'drm-intel-gt-next-2024-06-12' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next 42