Skip to content

Commit b3c818a

Browse files
efarmancohuck
authored andcommitted
Update linux headers to 5.11-rc2
Signed-off-by: Eric Farman <[email protected]> Message-Id: <[email protected]> [CH: dropped qatomic->atomic changes in pvrdma_ring.h] Signed-off-by: Cornelia Huck <[email protected]>
1 parent ab5ec23 commit b3c818a

File tree

27 files changed

+454
-41
lines changed

27 files changed

+454
-41
lines changed

include/standard-headers/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ struct pvrdma_port_attr {
176176
uint8_t subnet_timeout;
177177
uint8_t init_type_reply;
178178
uint8_t active_width;
179-
uint16_t active_speed;
179+
uint8_t active_speed;
180180
uint8_t phys_state;
181181
uint8_t reserved[2];
182182
};

include/standard-headers/drm/drm_fourcc.h

+174-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,30 @@ extern "C" {
5757
* may preserve meaning - such as number of planes - from the fourcc code,
5858
* whereas others may not.
5959
*
60+
* Modifiers must uniquely encode buffer layout. In other words, a buffer must
61+
* match only a single modifier. A modifier must not be a subset of layouts of
62+
* another modifier. For instance, it's incorrect to encode pitch alignment in
63+
* a modifier: a buffer may match a 64-pixel aligned modifier and a 32-pixel
64+
* aligned modifier. That said, modifiers can have implicit minimal
65+
* requirements.
66+
*
67+
* For modifiers where the combination of fourcc code and modifier can alias,
68+
* a canonical pair needs to be defined and used by all drivers. Preferred
69+
* combinations are also encouraged where all combinations might lead to
70+
* confusion and unnecessarily reduced interoperability. An example for the
71+
* latter is AFBC, where the ABGR layouts are preferred over ARGB layouts.
72+
*
73+
* There are two kinds of modifier users:
74+
*
75+
* - Kernel and user-space drivers: for drivers it's important that modifiers
76+
* don't alias, otherwise two drivers might support the same format but use
77+
* different aliases, preventing them from sharing buffers in an efficient
78+
* format.
79+
* - Higher-level programs interfacing with KMS/GBM/EGL/Vulkan/etc: these users
80+
* see modifiers as opaque tokens they can check for equality and intersect.
81+
* These users musn't need to know to reason about the modifier value
82+
* (i.e. they are not expected to extract information out of the modifier).
83+
*
6084
* Vendors should document their modifier usage in as much detail as
6185
* possible, to ensure maximum compatibility across devices, drivers and
6286
* applications.
@@ -154,6 +178,12 @@ extern "C" {
154178
#define DRM_FORMAT_ARGB16161616F fourcc_code('A', 'R', '4', 'H') /* [63:0] A:R:G:B 16:16:16:16 little endian */
155179
#define DRM_FORMAT_ABGR16161616F fourcc_code('A', 'B', '4', 'H') /* [63:0] A:B:G:R 16:16:16:16 little endian */
156180

181+
/*
182+
* RGBA format with 10-bit components packed in 64-bit per pixel, with 6 bits
183+
* of unused padding per component:
184+
*/
185+
#define DRM_FORMAT_AXBXGXRX106106106106 fourcc_code('A', 'B', '1', '0') /* [63:0] A:x:B:x:G:x:R:x 10:6:10:6:10:6:10:6 little endian */
186+
157187
/* packed YCbCr */
158188
#define DRM_FORMAT_YUYV fourcc_code('Y', 'U', 'Y', 'V') /* [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian */
159189
#define DRM_FORMAT_YVYU fourcc_code('Y', 'V', 'Y', 'U') /* [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian */
@@ -319,7 +349,6 @@ extern "C" {
319349
*/
320350

321351
/* Vendor Ids: */
322-
#define DRM_FORMAT_MOD_NONE 0
323352
#define DRM_FORMAT_MOD_VENDOR_NONE 0
324353
#define DRM_FORMAT_MOD_VENDOR_INTEL 0x01
325354
#define DRM_FORMAT_MOD_VENDOR_AMD 0x02
@@ -391,6 +420,16 @@ extern "C" {
391420
*/
392421
#define DRM_FORMAT_MOD_LINEAR fourcc_mod_code(NONE, 0)
393422

423+
/*
424+
* Deprecated: use DRM_FORMAT_MOD_LINEAR instead
425+
*
426+
* The "none" format modifier doesn't actually mean that the modifier is
427+
* implicit, instead it means that the layout is linear. Whether modifiers are
428+
* used is out-of-band information carried in an API-specific way (e.g. in a
429+
* flag for drm_mode_fb_cmd2).
430+
*/
431+
#define DRM_FORMAT_MOD_NONE 0
432+
394433
/* Intel framebuffer modifiers */
395434

396435
/*
@@ -1055,6 +1094,140 @@ drm_fourcc_canonicalize_nvidia_format_mod(uint64_t modifier)
10551094
*/
10561095
#define AMLOGIC_FBC_OPTION_MEM_SAVING (1ULL << 0)
10571096

1097+
/*
1098+
* AMD modifiers
1099+
*
1100+
* Memory layout:
1101+
*
1102+
* without DCC:
1103+
* - main surface
1104+
*
1105+
* with DCC & without DCC_RETILE:
1106+
* - main surface in plane 0
1107+
* - DCC surface in plane 1 (RB-aligned, pipe-aligned if DCC_PIPE_ALIGN is set)
1108+
*
1109+
* with DCC & DCC_RETILE:
1110+
* - main surface in plane 0
1111+
* - displayable DCC surface in plane 1 (not RB-aligned & not pipe-aligned)
1112+
* - pipe-aligned DCC surface in plane 2 (RB-aligned & pipe-aligned)
1113+
*
1114+
* For multi-plane formats the above surfaces get merged into one plane for
1115+
* each format plane, based on the required alignment only.
1116+
*
1117+
* Bits Parameter Notes
1118+
* ----- ------------------------ ---------------------------------------------
1119+
*
1120+
* 7:0 TILE_VERSION Values are AMD_FMT_MOD_TILE_VER_*
1121+
* 12:8 TILE Values are AMD_FMT_MOD_TILE_<version>_*
1122+
* 13 DCC
1123+
* 14 DCC_RETILE
1124+
* 15 DCC_PIPE_ALIGN
1125+
* 16 DCC_INDEPENDENT_64B
1126+
* 17 DCC_INDEPENDENT_128B
1127+
* 19:18 DCC_MAX_COMPRESSED_BLOCK Values are AMD_FMT_MOD_DCC_BLOCK_*
1128+
* 20 DCC_CONSTANT_ENCODE
1129+
* 23:21 PIPE_XOR_BITS Only for some chips
1130+
* 26:24 BANK_XOR_BITS Only for some chips
1131+
* 29:27 PACKERS Only for some chips
1132+
* 32:30 RB Only for some chips
1133+
* 35:33 PIPE Only for some chips
1134+
* 55:36 - Reserved for future use, must be zero
1135+
*/
1136+
#define AMD_FMT_MOD fourcc_mod_code(AMD, 0)
1137+
1138+
#define IS_AMD_FMT_MOD(val) (((val) >> 56) == DRM_FORMAT_MOD_VENDOR_AMD)
1139+
1140+
/* Reserve 0 for GFX8 and older */
1141+
#define AMD_FMT_MOD_TILE_VER_GFX9 1
1142+
#define AMD_FMT_MOD_TILE_VER_GFX10 2
1143+
#define AMD_FMT_MOD_TILE_VER_GFX10_RBPLUS 3
1144+
1145+
/*
1146+
* 64K_S is the same for GFX9/GFX10/GFX10_RBPLUS and hence has GFX9 as canonical
1147+
* version.
1148+
*/
1149+
#define AMD_FMT_MOD_TILE_GFX9_64K_S 9
1150+
1151+
/*
1152+
* 64K_D for non-32 bpp is the same for GFX9/GFX10/GFX10_RBPLUS and hence has
1153+
* GFX9 as canonical version.
1154+
*/
1155+
#define AMD_FMT_MOD_TILE_GFX9_64K_D 10
1156+
#define AMD_FMT_MOD_TILE_GFX9_64K_S_X 25
1157+
#define AMD_FMT_MOD_TILE_GFX9_64K_D_X 26
1158+
#define AMD_FMT_MOD_TILE_GFX9_64K_R_X 27
1159+
1160+
#define AMD_FMT_MOD_DCC_BLOCK_64B 0
1161+
#define AMD_FMT_MOD_DCC_BLOCK_128B 1
1162+
#define AMD_FMT_MOD_DCC_BLOCK_256B 2
1163+
1164+
#define AMD_FMT_MOD_TILE_VERSION_SHIFT 0
1165+
#define AMD_FMT_MOD_TILE_VERSION_MASK 0xFF
1166+
#define AMD_FMT_MOD_TILE_SHIFT 8
1167+
#define AMD_FMT_MOD_TILE_MASK 0x1F
1168+
1169+
/* Whether DCC compression is enabled. */
1170+
#define AMD_FMT_MOD_DCC_SHIFT 13
1171+
#define AMD_FMT_MOD_DCC_MASK 0x1
1172+
1173+
/*
1174+
* Whether to include two DCC surfaces, one which is rb & pipe aligned, and
1175+
* one which is not-aligned.
1176+
*/
1177+
#define AMD_FMT_MOD_DCC_RETILE_SHIFT 14
1178+
#define AMD_FMT_MOD_DCC_RETILE_MASK 0x1
1179+
1180+
/* Only set if DCC_RETILE = false */
1181+
#define AMD_FMT_MOD_DCC_PIPE_ALIGN_SHIFT 15
1182+
#define AMD_FMT_MOD_DCC_PIPE_ALIGN_MASK 0x1
1183+
1184+
#define AMD_FMT_MOD_DCC_INDEPENDENT_64B_SHIFT 16
1185+
#define AMD_FMT_MOD_DCC_INDEPENDENT_64B_MASK 0x1
1186+
#define AMD_FMT_MOD_DCC_INDEPENDENT_128B_SHIFT 17
1187+
#define AMD_FMT_MOD_DCC_INDEPENDENT_128B_MASK 0x1
1188+
#define AMD_FMT_MOD_DCC_MAX_COMPRESSED_BLOCK_SHIFT 18
1189+
#define AMD_FMT_MOD_DCC_MAX_COMPRESSED_BLOCK_MASK 0x3
1190+
1191+
/*
1192+
* DCC supports embedding some clear colors directly in the DCC surface.
1193+
* However, on older GPUs the rendering HW ignores the embedded clear color
1194+
* and prefers the driver provided color. This necessitates doing a fastclear
1195+
* eliminate operation before a process transfers control.
1196+
*
1197+
* If this bit is set that means the fastclear eliminate is not needed for these
1198+
* embeddable colors.
1199+
*/
1200+
#define AMD_FMT_MOD_DCC_CONSTANT_ENCODE_SHIFT 20
1201+
#define AMD_FMT_MOD_DCC_CONSTANT_ENCODE_MASK 0x1
1202+
1203+
/*
1204+
* The below fields are for accounting for per GPU differences. These are only
1205+
* relevant for GFX9 and later and if the tile field is *_X/_T.
1206+
*
1207+
* PIPE_XOR_BITS = always needed
1208+
* BANK_XOR_BITS = only for TILE_VER_GFX9
1209+
* PACKERS = only for TILE_VER_GFX10_RBPLUS
1210+
* RB = only for TILE_VER_GFX9 & DCC
1211+
* PIPE = only for TILE_VER_GFX9 & DCC & (DCC_RETILE | DCC_PIPE_ALIGN)
1212+
*/
1213+
#define AMD_FMT_MOD_PIPE_XOR_BITS_SHIFT 21
1214+
#define AMD_FMT_MOD_PIPE_XOR_BITS_MASK 0x7
1215+
#define AMD_FMT_MOD_BANK_XOR_BITS_SHIFT 24
1216+
#define AMD_FMT_MOD_BANK_XOR_BITS_MASK 0x7
1217+
#define AMD_FMT_MOD_PACKERS_SHIFT 27
1218+
#define AMD_FMT_MOD_PACKERS_MASK 0x7
1219+
#define AMD_FMT_MOD_RB_SHIFT 30
1220+
#define AMD_FMT_MOD_RB_MASK 0x7
1221+
#define AMD_FMT_MOD_PIPE_SHIFT 33
1222+
#define AMD_FMT_MOD_PIPE_MASK 0x7
1223+
1224+
#define AMD_FMT_MOD_SET(field, value) \
1225+
((uint64_t)(value) << AMD_FMT_MOD_##field##_SHIFT)
1226+
#define AMD_FMT_MOD_GET(field, value) \
1227+
(((value) >> AMD_FMT_MOD_##field##_SHIFT) & AMD_FMT_MOD_##field##_MASK)
1228+
#define AMD_FMT_MOD_CLEAR(field) \
1229+
(~((uint64_t)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT))
1230+
10581231
#if defined(__cplusplus)
10591232
}
10601233
#endif
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2+
/* const.h: Macros for dealing with constants. */
3+
4+
#ifndef _LINUX_CONST_H
5+
#define _LINUX_CONST_H
6+
7+
/* Some constant macros are used in both assembler and
8+
* C code. Therefore we cannot annotate them always with
9+
* 'UL' and other type specifiers unilaterally. We
10+
* use the following macros to deal with this.
11+
*
12+
* Similarly, _AT() will cast an expression with a type in C, but
13+
* leave it unchanged in asm.
14+
*/
15+
16+
#ifdef __ASSEMBLY__
17+
#define _AC(X,Y) X
18+
#define _AT(T,X) X
19+
#else
20+
#define __AC(X,Y) (X##Y)
21+
#define _AC(X,Y) __AC(X,Y)
22+
#define _AT(T,X) ((T)(X))
23+
#endif
24+
25+
#define _UL(x) (_AC(x, UL))
26+
#define _ULL(x) (_AC(x, ULL))
27+
28+
#define _BITUL(x) (_UL(1) << (x))
29+
#define _BITULL(x) (_ULL(1) << (x))
30+
31+
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1)
32+
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
33+
34+
#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
35+
36+
#endif /* _LINUX_CONST_H */

include/standard-headers/linux/ethtool.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#include "net/eth.h"
1818

19-
#include "standard-headers/linux/kernel.h"
19+
#include "standard-headers/linux/const.h"
2020
#include "standard-headers/linux/types.h"
2121
#include "standard-headers/linux/if_ether.h"
2222

include/standard-headers/linux/fuse.h

+25-5
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@
175175
*
176176
* 7.32
177177
* - add flags to fuse_attr, add FUSE_ATTR_SUBMOUNT, add FUSE_SUBMOUNTS
178+
*
179+
* 7.33
180+
* - add FUSE_HANDLE_KILLPRIV_V2, FUSE_WRITE_KILL_SUIDGID, FATTR_KILL_SUIDGID
181+
* - add FUSE_OPEN_KILL_SUIDGID
178182
*/
179183

180184
#ifndef _LINUX_FUSE_H
@@ -206,7 +210,7 @@
206210
#define FUSE_KERNEL_VERSION 7
207211

208212
/** Minor version number of this interface */
209-
#define FUSE_KERNEL_MINOR_VERSION 32
213+
#define FUSE_KERNEL_MINOR_VERSION 33
210214

211215
/** The node ID of the root inode */
212216
#define FUSE_ROOT_ID 1
@@ -267,6 +271,7 @@ struct fuse_file_lock {
267271
#define FATTR_MTIME_NOW (1 << 8)
268272
#define FATTR_LOCKOWNER (1 << 9)
269273
#define FATTR_CTIME (1 << 10)
274+
#define FATTR_KILL_SUIDGID (1 << 11)
270275

271276
/**
272277
* Flags returned by the OPEN request
@@ -316,6 +321,11 @@ struct fuse_file_lock {
316321
* foffset and moffset fields in struct
317322
* fuse_setupmapping_out and fuse_removemapping_one.
318323
* FUSE_SUBMOUNTS: kernel supports auto-mounting directory submounts
324+
* FUSE_HANDLE_KILLPRIV_V2: fs kills suid/sgid/cap on write/chown/trunc.
325+
* Upon write/truncate suid/sgid is only killed if caller
326+
* does not have CAP_FSETID. Additionally upon
327+
* write/truncate sgid is killed only if file has group
328+
* execute permission. (Same as Linux VFS behavior).
319329
*/
320330
#define FUSE_ASYNC_READ (1 << 0)
321331
#define FUSE_POSIX_LOCKS (1 << 1)
@@ -345,6 +355,7 @@ struct fuse_file_lock {
345355
#define FUSE_EXPLICIT_INVAL_DATA (1 << 25)
346356
#define FUSE_MAP_ALIGNMENT (1 << 26)
347357
#define FUSE_SUBMOUNTS (1 << 27)
358+
#define FUSE_HANDLE_KILLPRIV_V2 (1 << 28)
348359

349360
/**
350361
* CUSE INIT request/reply flags
@@ -374,11 +385,14 @@ struct fuse_file_lock {
374385
*
375386
* FUSE_WRITE_CACHE: delayed write from page cache, file handle is guessed
376387
* FUSE_WRITE_LOCKOWNER: lock_owner field is valid
377-
* FUSE_WRITE_KILL_PRIV: kill suid and sgid bits
388+
* FUSE_WRITE_KILL_SUIDGID: kill suid and sgid bits
378389
*/
379390
#define FUSE_WRITE_CACHE (1 << 0)
380391
#define FUSE_WRITE_LOCKOWNER (1 << 1)
381-
#define FUSE_WRITE_KILL_PRIV (1 << 2)
392+
#define FUSE_WRITE_KILL_SUIDGID (1 << 2)
393+
394+
/* Obsolete alias; this flag implies killing suid/sgid only. */
395+
#define FUSE_WRITE_KILL_PRIV FUSE_WRITE_KILL_SUIDGID
382396

383397
/**
384398
* Read flags
@@ -427,6 +441,12 @@ struct fuse_file_lock {
427441
*/
428442
#define FUSE_ATTR_SUBMOUNT (1 << 0)
429443

444+
/**
445+
* Open flags
446+
* FUSE_OPEN_KILL_SUIDGID: Kill suid and sgid if executable
447+
*/
448+
#define FUSE_OPEN_KILL_SUIDGID (1 << 0)
449+
430450
enum fuse_opcode {
431451
FUSE_LOOKUP = 1,
432452
FUSE_FORGET = 2, /* no reply */
@@ -588,14 +608,14 @@ struct fuse_setattr_in {
588608

589609
struct fuse_open_in {
590610
uint32_t flags;
591-
uint32_t unused;
611+
uint32_t open_flags; /* FUSE_OPEN_... */
592612
};
593613

594614
struct fuse_create_in {
595615
uint32_t flags;
596616
uint32_t mode;
597617
uint32_t umask;
598-
uint32_t padding;
618+
uint32_t open_flags; /* FUSE_OPEN_... */
599619
};
600620

601621
struct fuse_open_out {

include/standard-headers/linux/kernel.h

+1-8
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@
33
#define _LINUX_KERNEL_H
44

55
#include "standard-headers/linux/sysinfo.h"
6-
7-
/*
8-
* 'kernel.h' contains some often-used function prototypes etc
9-
*/
10-
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1)
11-
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
12-
13-
#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
6+
#include "standard-headers/linux/const.h"
147

158
#endif /* _LINUX_KERNEL_H */

0 commit comments

Comments
 (0)