headers: Sync with drm-next
Subsystems (2)
PATCH 1/2 headers: Sync with drm-next
Taken from the drm-next pull for 4.17-rc1 (694f54f680f7), and manually reconciled:
core:
- Dropped DRM_MODE_TYPE_ALL and DRM_MODE_FLAG_ALL; these are purely internal details of the bits accepted by the currently running kernel, and can not be generally relied on by userspace
- Add HDCP flags
- Note CTM entry representation is sign-magnitude format, not two's-complement
amdgpu:
- Add QUERY_STATE2 context op
- Add VCN firmware version query
etnaviv:
- Add more GPU feature flags
i915:
- Add caps, params and ioctls for PMU / perf-stream
- Add support for explicit fencing
nouveau:
- Add TILE_COMP layout
vc4:
- Add perfmon ioctls
virtgpu:
- Add capset-fix param
vmware:
- Add handle-close ioctl and explicit-fencing support
--- etnaviv/etnaviv_drm.h | 7 + include/drm/amdgpu_drm.h | 11 ++ include/drm/drm_mode.h | 25 ++-- include/drm/i915_drm.h | 321 ++++++++++++++++++++++++++++++++++++++++++++-- include/drm/nouveau_drm.h | 1 + include/drm/vc4_drm.h | 76 +++++++++++ include/drm/virtgpu_drm.h | 1 + include/drm/vmwgfx_drm.h | 35 ++++- 8 files changed, 451 insertions(+), 26 deletions(-)
etnaviv/etnaviv_drm.h +7 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * Copyright (C) 2015 Etnaviv Project *
@@ -54,6 +55,12 @@ struct drm_etnaviv_timespec {#define ETNAVIV_PARAM_GPU_FEATURES_4 0x07#define ETNAVIV_PARAM_GPU_FEATURES_5 0x08#define ETNAVIV_PARAM_GPU_FEATURES_6 0x09 +#define ETNAVIV_PARAM_GPU_FEATURES_7 0x0a +#define ETNAVIV_PARAM_GPU_FEATURES_8 0x0b +#define ETNAVIV_PARAM_GPU_FEATURES_9 0x0c +#define ETNAVIV_PARAM_GPU_FEATURES_10 0x0d +#define ETNAVIV_PARAM_GPU_FEATURES_11 0x0e +#define ETNAVIV_PARAM_GPU_FEATURES_12 0x0f#define ETNAVIV_PARAM_GPU_STREAM_COUNT 0x10#define ETNAVIV_PARAM_GPU_REGISTER_MAX 0x11
include/drm/amdgpu_drm.h +11 -0
@@ -160,6 +160,7 @@ union drm_amdgpu_bo_list {#define AMDGPU_CTX_OP_ALLOC_CTX 1#define AMDGPU_CTX_OP_FREE_CTX 2#define AMDGPU_CTX_OP_QUERY_STATE 3 +#define AMDGPU_CTX_OP_QUERY_STATE2 4/* GPU reset status */ #define AMDGPU_CTX_NO_RESET 0
@@ -170,6 +171,13 @@ union drm_amdgpu_bo_list {/* unknown cause */ #define AMDGPU_CTX_UNKNOWN_RESET 3 +/* indicate gpu reset occured after ctx created */ +#define AMDGPU_CTX_QUERY2_FLAGS_RESET (1<<0) +/* indicate vram lost occured after ctx created */ +#define AMDGPU_CTX_QUERY2_FLAGS_VRAMLOST (1<<1) +/* indicate some job from this context once cause gpu hang */ +#define AMDGPU_CTX_QUERY2_FLAGS_GUILTY (1<<2) +/* Context priority level */ #define AMDGPU_CTX_PRIORITY_UNSET -2048#define AMDGPU_CTX_PRIORITY_VERY_LOW -1023
@@ -610,6 +618,8 @@ struct drm_amdgpu_cs_chunk_data {#define AMDGPU_INFO_FW_SOS 0x0c/* Subquery id: Query PSP ASD firmware version */ #define AMDGPU_INFO_FW_ASD 0x0d +/* Subquery id: Query VCN firmware version */ +#define AMDGPU_INFO_FW_VCN 0x0e/* number of bytes moved for TTM migration */ #define AMDGPU_INFO_NUM_BYTES_MOVED 0x0f/* the used VRAM size */
@@ -798,6 +808,7 @@ struct drm_amdgpu_info_firmware {#define AMDGPU_VRAM_TYPE_GDDR5 5#define AMDGPU_VRAM_TYPE_HBM 6#define AMDGPU_VRAM_TYPE_DDR3 7 +#define AMDGPU_VRAM_TYPE_DDR4 8struct drm_amdgpu_info_device {/** PCI Device ID */
include/drm/drm_mode.h +16 -9
@@ -38,11 +38,11 @@ extern "C" {#define DRM_DISPLAY_MODE_LEN 32#define DRM_PROP_NAME_LEN 32 -#define DRM_MODE_TYPE_BUILTIN (1<<0) -#define DRM_MODE_TYPE_CLOCK_C ((1<<1) | DRM_MODE_TYPE_BUILTIN) -#define DRM_MODE_TYPE_CRTC_C ((1<<2) | DRM_MODE_TYPE_BUILTIN) +#define DRM_MODE_TYPE_BUILTIN (1<<0)/* deprecated */ +#define DRM_MODE_TYPE_CLOCK_C ((1<<1) | DRM_MODE_TYPE_BUILTIN)/* deprecated */ +#define DRM_MODE_TYPE_CRTC_C ((1<<2) | DRM_MODE_TYPE_BUILTIN)/* deprecated */ #define DRM_MODE_TYPE_PREFERRED (1<<3) -#define DRM_MODE_TYPE_DEFAULT (1<<4) +#define DRM_MODE_TYPE_DEFAULT (1<<4)/* deprecated */ #define DRM_MODE_TYPE_USERDEF (1<<5)#define DRM_MODE_TYPE_DRIVER (1<<6)
@@ -66,8 +66,8 @@ extern "C" {#define DRM_MODE_FLAG_PCSYNC (1<<7)#define DRM_MODE_FLAG_NCSYNC (1<<8)#define DRM_MODE_FLAG_HSKEW (1<<9)/* hskew provided */ -#define DRM_MODE_FLAG_BCAST (1<<10) -#define DRM_MODE_FLAG_PIXMUX (1<<11) +#define DRM_MODE_FLAG_BCAST (1<<10)/* deprecated */ +#define DRM_MODE_FLAG_PIXMUX (1<<11)/* deprecated */ #define DRM_MODE_FLAG_DBLCLK (1<<12)#define DRM_MODE_FLAG_CLKDIV2 (1<<13)/*
@@ -173,6 +173,10 @@ extern "C" { DRM_MODE_REFLECT_X | \ DRM_MODE_REFLECT_Y) +/* Content Protection Flags */ +#define DRM_MODE_CONTENT_PROTECTION_UNDESIRED 0 +#define DRM_MODE_CONTENT_PROTECTION_DESIRED 1 +#define DRM_MODE_CONTENT_PROTECTION_ENABLED 2struct drm_mode_modeinfo {__u32 clock;
@@ -341,7 +345,7 @@ struct drm_mode_get_connector {__u32 pad; }; -#define DRM_MODE_PROP_PENDING (1<<0) +#define DRM_MODE_PROP_PENDING (1<<0)/* deprecated, do not use */ #define DRM_MODE_PROP_RANGE (1<<1)#define DRM_MODE_PROP_IMMUTABLE (1<<2)#define DRM_MODE_PROP_ENUM (1<<3)/* enumerated type with text strings */
@@ -576,8 +580,11 @@ struct drm_mode_crtc_lut { };struct drm_color_ctm { -/* Conversion matrix in S31.32 format. */ -__s64 matrix[9 ]; +/* +* Conversion matrix in S31.32 sign-magnitude +* (not two's complement!) format. +*/ +__u64 matrix[9 ]; };struct drm_color_lut {
include/drm/i915_drm.h +307 -14
419 lines not on this page · raw message
include/drm/nouveau_drm.h +1 -0
@@ -104,6 +104,7 @@ struct drm_nouveau_setparam {#define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3)#define NOUVEAU_GEM_DOMAIN_COHERENT (1 << 4) +#define NOUVEAU_GEM_TILE_COMP 0x00030000/* nv50-only */ #define NOUVEAU_GEM_TILE_LAYOUT_MASK 0x0000ff00#define NOUVEAU_GEM_TILE_16BPP 0x00000001#define NOUVEAU_GEM_TILE_32BPP 0x00000002
include/drm/vc4_drm.h +76 -0
106 lines not on this page · raw message
include/drm/virtgpu_drm.h +1 -0
@@ -63,6 +63,7 @@ struct drm_virtgpu_execbuffer { };#define VIRTGPU_PARAM_3D_FEATURES 1/* do we have 3D features in the hw */ +#define VIRTGPU_PARAM_CAPSET_QUERY_FIX 2/* do we have the capset fix */ struct drm_virtgpu_getparam {__u64 param;
include/drm/vmwgfx_drm.h +32 -3
@@ -41,6 +41,7 @@ extern "C" {#define DRM_VMW_GET_PARAM 0#define DRM_VMW_ALLOC_DMABUF 1#define DRM_VMW_UNREF_DMABUF 2 +#define DRM_VMW_HANDLE_CLOSE 2#define DRM_VMW_CURSOR_BYPASS 3/* guarded by DRM_VMW_PARAM_NUM_STREAMS != 0*/ #define DRM_VMW_CONTROL_STREAM 4
@@ -296,13 +297,17 @@ union drm_vmw_surface_reference_arg {* @version: Allows expanding the execbuf ioctl parameters without breaking * backwards compatibility, since user-space will always tell the kernel * which version it uses. -* @flags: Execbuf flags. None currently. +* @flags: Execbuf flags. +* @imported_fence_fd: FD for a fence imported from another device * * Argument to the DRM_VMW_EXECBUF Ioctl. */ #define DRM_VMW_EXECBUF_VERSION 2 +#define DRM_VMW_EXECBUF_FLAG_IMPORT_FENCE_FD (1 << 0) +#define DRM_VMW_EXECBUF_FLAG_EXPORT_FENCE_FD (1 << 1) +struct drm_vmw_execbuf_arg {__u64 commands;__u32 command_size;
@@ -311,7 +316,7 @@ struct drm_vmw_execbuf_arg {__u32 version;__u32 flags;__u32 context_handle; -__u32 pad64; +__s32 imported_fence_fd; };/**
@@ -327,6 +332,7 @@ struct drm_vmw_execbuf_arg {* @passed_seqno: The highest seqno number processed by the hardware * so far. This can be used to mark user-space fence objects as signaled, and * to determine whether a fence seqno might be stale. +* @fd: FD associated with the fence, -1 if not exported * @error: This member should've been set to -EFAULT on submission. * The following actions should be take on completion: * error == -EFAULT: Fence communication failed. The host is synchronized.
@@ -344,7 +350,7 @@ struct drm_vmw_fence_rep {__u32 mask;__u32 seqno;__u32 passed_seqno; -__u32 pad64; +__s32 fd;__s32 error; };
@@ -1092,6 +1098,29 @@ union drm_vmw_extended_context_arg {struct drm_vmw_context_arg rep; }; +/*************************************************************************/ +/* +* DRM_VMW_HANDLE_CLOSE - Close a user-space handle and release its +* underlying resource. +* +* Note that this ioctl is overlaid on the DRM_VMW_UNREF_DMABUF Ioctl. +* The ioctl arguments therefore need to be identical in layout. +* +*/ + +/** +* struct drm_vmw_handle_close_arg +* +* @handle: Handle to close. +* +* Argument to the DRM_VMW_HANDLE_CLOSE Ioctl. +*/ +struct drm_vmw_handle_close_arg { +__u32 handle; +__u32 pad64; +}; + +#if defined(__cplusplus) }#endif
Signature · 6 lines
2.16.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/2 headers: Update README
Nouveau has made a very deliberate choice to hide its actual kernel ABI behind libdrm. i915 is no longer out of date.
--- include/drm/README | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
include/drm/README +1 -5
@@ -91,14 +91,10 @@ Most UMS headers: Status: ? Promote to fixed size ints, which match the current (32bit) ones. -i915_drm.h - - Missing PARAMS - HAS_POOLED_EU, MIN_EU_IN_POOL CONTEXT_PARAM_NO_ERROR_CAPTURE -Status: Trivial. - nouveau_drm.h - Missing macros NOUVEAU_GETPARAM*, NOUVEAU_DRM_HEADER_PATCHLEVEL, structs, enums -Status: ? +Status: Deliberate UABI choice; nouveau hides the exact kernel ABI behind libdrm r128_drm.h - Broken compat ioctls.
Signature · 6 lines
2.16.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH libdrm 2/2] headers: Update README
Quoted 4 lines · Daniel Stone
Nouveau has made a very deliberate choice to hide its actual kernel ABI behind libdrm. i915 is no longer out of date.
Signed-off-by Daniel Stone <[email protected]>
Quoted 27 lines
--- include/drm/README | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)include/drm/README +1
-6@@ -91,14 +91,10 @@ Most UMS headers: Status: ? Promote to fixed size ints, which match the current (32bit) ones. -i915_drm.h - - Missing PARAMS - HAS_POOLED_EU, MIN_EU_IN_POOL CONTEXT_PARAM_NO_ERROR_CAPTURE -Status: Trivial. - nouveau_drm.h - Missing macros NOUVEAU_GETPARAM*, NOUVEAU_DRM_HEADER_PATCHLEVEL, structs, enums -Status: ? +Status: Deliberate UABI choice; nouveau hides the exact kernel ABI behind libdrm r128_drm.h - Broken compat ioctls. --2.16.2
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 27 lines · Daniel Stone
Taken from the drm-next pull for 4.17-rc1 (
694f54f680f7), and manually reconciled:core:
- DroppedDRM_MODE_TYPE_ALLandDRM_MODE_FLAG_ALL; these are purely internal details of the bits accepted by the currently running kernel, and can not be generally relied on by userspace
- Add HDCP flags
- Note CTM entry representation is sign-magnitude format, not two's-complement
amdgpu:
- AddQUERY_STATE2context op
- Add VCN firmware version query
etnaviv:
- Add more GPU feature flags
i915:
- Add caps, params and ioctls for PMU / perf-stream
- Add support for explicit fencing
nouveau:
- AddTILE_COMPlayout
vc4:
- Add perfmon ioctls
virtgpu:
- Add capset-fix param
vmware:
- Add handle-close ioctl and explicit-fencing support
Quoted 1 line
Signed-off-by Daniel Stone <[email protected]>
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 4 lines · Alex Deucher
Quoted 1 line · Daniel Stone
Taken from the drm-next pull for 4.17-rc1 (
694f54f680f7), and manuallyReviewed-by Alex Deucher <[email protected]>
Both pushed, thanks a lot Alex!
Cheers,
Daniel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel