drm: Branch 'master' - 3 commits
[email protected] (Emil Velikov)
| Newsgroups | gmane.comp.video.dri.patches |
|---|---|
| Message-ID | <[email protected]> |
Makefile.am | 1 configure.ac | 2 include/drm/README | 157 +++++++++++++++++++++++++++++++++++++++++++++++++++++ xf86drm.c | 4 - 4 files changed, 161 insertions(+), 3 deletions(-) New commits: commit 317bdff14ac8f1e8735f97d96c7eb963e1e47a4a Author: Emil Velikov <[email protected]> Date: Mon Nov 14 19:48:38 2016 +0000 Bump version for release diff --git a/configure.ac b/configure.ac index 1c7a7fb..9f25a4c 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ AC_PREREQ([2.63]) AC_INIT([libdrm], - [2.4.72], + [2.4.73], [https://bugs.freedesktop.org/enter_bug.cgi?product=DRI], [libdrm]) commit f53d3542c1dfa2a1c1a5a7155d058df9a6bcce7b Author: Emil Velikov <[email protected]> Date: Fri Nov 11 19:04:11 2016 +0000 xd86drm: read more than 128 bytes of uevent in drmParsePciBusInfo Some platforms (such as Macs using OF) can have more information in the uevent file thus reading only the first 128 might not be sufficient. Bump it to 512, which "should be enough for everybody" ;-) v2: Use sizeof(data)-1 over hardcoded number (Eric). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98629 Signed-off-by: Emil Velikov <[email protected]> Reported-by: Mingcong Bai <[email protected]> Tested-by: Mingcong Bai <[email protected]> (v1) Reviewed-by: Eric Engestrom <[email protected]> diff --git a/xf86drm.c b/xf86drm.c index 52add5e..9b97bbb 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -2864,7 +2864,7 @@ static int drmParsePciBusInfo(int maj, int min, drmPciBusInfoPtr info) { #ifdef __linux__ char path[PATH_MAX + 1]; - char data[128 + 1]; + char data[512 + 1]; char *str; int domain, bus, dev, func; int fd, ret; @@ -2875,7 +2875,7 @@ static int drmParsePciBusInfo(int maj, int min, drmPciBusInfoPtr info) return -errno; ret = read(fd, data, sizeof(data)); - data[128] = '\0'; + data[sizeof(data)-1] = '\0'; close(fd); if (ret < 0) return -errno; commit de13ea387737cdc99ec43813acb4d4f443075db2 Author: Emil Velikov <[email protected]> Date: Mon Nov 14 17:59:28 2016 +0000 headers: Add README file Since we're trying to standardise and make things more consistent in the area, add a basic README which covers some of the more popular topics. v2: - Drop drm-misc (Daniel Vetter) v3: - Elaborate on when and which headers to update - Add a list of headers and the respective "issues" - Add file to EXTRA_DIST Cc: Dave Airlie <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> (v1) Signed-off-by: Emil Velikov <[email protected]> diff --git a/Makefile.am b/Makefile.am index 630edc4..2e46bde 100644 --- a/Makefile.am +++ b/Makefile.am @@ -133,6 +133,7 @@ if HAVE_VMWGFX klibdrminclude_HEADERS += $(LIBDRM_INCLUDE_VMWGFX_H_FILES) endif +EXTRA_DIST = include/drm/README copy-headers : cp -r $(kernel_source)/include/uapi/drm/*.h $(top_srcdir)/include/drm/ diff --git a/include/drm/README b/include/drm/README new file mode 100644 index 0000000..c3292f3 --- /dev/null +++ b/include/drm/README @@ -0,0 +1,157 @@ +What are these headers ? +------------------------ +This is the canonical source of drm headers that user space should use for +communicating with the kernel DRM subsystem. + +They flow from the kernel, thus any changes must be merged there first. +Do _not_ attempt to "fix" these by deviating from the kernel ones ! + + +Non-linux platforms - changes/patches +------------------------------------- +If your platform has local changes, please send them upstream for inclusion. +Even if your patches don't get accepted in their current form, devs will +give you feedback on how to address things properly. + +git send-email --subject-prefix="PATCH libdrm" your patches to dri-devel +mailing list. + +Before doing so, please consider the following: + - Have the [libdrm vs kernel] headers on your platform deviated ? +Consider unifying them first. + + - Have you introduced additional ABI that's not available in Linux ? +Propose it for [Linux kernel] upstream inclusion. +If that doesn't work out (hopefully it never does), move it to another header +and/or keep the change(s) local ? + + - Are your changes DRI1/UMS specific ? +There is virtually no interest/power in keeping those legacy interfaces. They +are around due to the kernel "thou shalt not break existing user space" rule. + +Consider porting the driver to DRI2/KMS - all (almost?) sensible hardware is +capable of supporting those. + + +Which headers go where ? +------------------------ +A snipped from the, now removed, Makefile.am used to state: + + XXX airlied says, nothing besides *_drm.h and drm*.h should be necessary. + however, r300 and via need their reg headers installed in order to build. + better solutions are welcome. + +Obviously the r300 and via headers are no longer around ;-) + +Reason behind is that the drm headers can be used as a basic communications +channel with the respective kernel modules. If more advanced functionality is +required one can pull the specific libdrm_$driver which is free to pull +additional files from the kernel. + +For example: nouveau has nouveau/nvif/*.h while vc4 has vc4/*.h + +If your driver is still in prototyping/staging state, consider moving the +$driver_drm.h into $driver and _not_ installing it. An header providing opaque +definitions and access [via $driver_drmif.h or similar] would be better fit. + + +When and which headers to update +-------------------------------- +Ideally all files will be synced (updated) with the latest released kernel on +each libdrm release. Sadly that's not yet possible since quite a few headers +differ significantly - see Outdated or Broken Headers section below. + +That said, it's up-to the individual developers to sync with newer version +(from drm-next) as they see fit. + + +When and how to update these files +---------------------------------- +In order to update the files do the following: + - Switch to a Linux kernel tree/branch which is not rebased. +For example: airlied/drm-next + - Install the headers via `make headers_install' to a separate location. + - Copy the drm header[s] + git add + git commit. + - Note: Your commit message must include: + a) Brief summary on the delta. If there's any change that looks like an +API/ABI break one _must_ explicitly state why it's safe to do so. + b) "Generated using make headers_install." + c) "Generated from $tree/branch commit $sha" + + +Outdated or Broken Headers +-------------------------- +This section contains a list of headers and the respective "issues" they might +have relative to their kernel equivalent. + +Nearly all headers: + - Missing extern C notation. +Status: Trivial. + +Most UMS headers: + - Not using fixed size interers - compat ioctls are broken. +Status: ? +Promote to fixed size ints, which match the current (32bit) ones. + + +amdgpu_drm.h + - Using the stdint.h uint*_t over the respective __u* ones +Status: Trivial. + +drm_mode.h + - Missing DPI encode/connector pair. +Status: Trivial. + +i915_drm.h + - Missing PARAMS - HAS_POOLED_EU, MIN_EU_IN_POOL CONTEXT_PARAM_NO_ERROR_CAPTURE +Status: Trivial. + +mga_drm.h + - Typo fix, use struct over typedef. +Status: Trivial. + +nouveau_drm.h + - Missing macros NOUVEAU_GETPARAM*, NOUVEAU_DRM_HEADER_PATCHLEVEL, structs, +enums, using stdint.h over the __u* types. +Status: ? + +qxl_drm.h + - Using the stdint.h uint*_t over the respective __u* ones +Status: Trivial. + +r128_drm.h + - Broken compat ioctls. + +radeon_drm.h + - Missing RADEON_TILING_R600_NO_SCANOUT, CIK_TILE_MODE_*, broken UMS ioctls, +using stdint types. + - Both kernel and libdrm: missing padding - +drm_radeon_gem_{create,{g,s}et_tiling,set_domain} others ? +Status: ? + +savage_drm.h + - Renamed ioctls - DRM_IOCTL_SAVAGE_{,BCI}_EVENT_EMIT, compat ioctls are broken. +Status: ? + +sis_drm.h + - Borken ioctls + libdrm uses int vs kernel long +Status: ? + +via_drm.h + - Borken ioctls - libdrm int vs kernel long +Status: ? + + +omap_drm.h (living in $TOP/omap) + - License mismatch, missing DRM_IOCTL_OMAP_GEM_NEW and related struct +Status: ? + +msm_drm.h (located in $TOP/freedreno/msm/) + - License mismatch, missing MSM_PIPE_*, MSM_SUBMIT_*. Renamed +drm_msm_gem_submit::flags, missing drm_msm_gem_submit::fence_fd. +Status: ? + +exynos_drm.h (living in $TOP/exynos) + - License mismatch, now using fixed size ints (but not everywhere). Lots of +new stuff. +Status: ? ------------------------------------------------------------------------------ --