History

drm/fourcc: Fix modifier field mask for AMD modifiers.

The DCC_MAX_COMPRESSED_BLOCK has to contain one of AMD_FMT_MOD_DCC_BLOCK_* and with 3 values this doesn't fit in 1 bit. Fix this cleanly while it is only in drm-next.

Bas Nieuwenhuizen committed 6 years ago

Commit b7397ba1 parent 52f6f161 file · +7 −7Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/drm/drm_fourcc.h+7−7
@@ -1168,7 +1168,7 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) · 1167 unmodified lines
11681168 #define AMD_FMT_MOD_DCC_INDEPENDENT_128B_SHIFT 17
11691169 #define AMD_FMT_MOD_DCC_INDEPENDENT_128B_MASK 0x1
11701170 #define AMD_FMT_MOD_DCC_MAX_COMPRESSED_BLOCK_SHIFT 18
1171−#define AMD_FMT_MOD_DCC_MAX_COMPRESSED_BLOCK_MASK 0x1
1171+#define AMD_FMT_MOD_DCC_MAX_COMPRESSED_BLOCK_MASK 0x3
11721172
11731173 /*
11741174 * DCC supports embedding some clear colors directly in the DCC surface.
@@ -1179,7 +1179,7 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) · 4 unmodified lines
11791179 * If this bit is set that means the fastclear eliminate is not needed for these
11801180 * embeddable colors.
11811181 */
1182−#define AMD_FMT_MOD_DCC_CONSTANT_ENCODE_SHIFT 19
1182+#define AMD_FMT_MOD_DCC_CONSTANT_ENCODE_SHIFT 20
11831183 #define AMD_FMT_MOD_DCC_CONSTANT_ENCODE_MASK 0x1
11841184
11851185 /*
@@ -1192,15 +1192,15 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) · 6 unmodified lines
11921192 * RB = only for TILE_VER_GFX9 & DCC
11931193 * PIPE = only for TILE_VER_GFX9 & DCC & (DCC_RETILE | DCC_PIPE_ALIGN)
11941194 */
1195−#define AMD_FMT_MOD_PIPE_XOR_BITS_SHIFT 20
1195+#define AMD_FMT_MOD_PIPE_XOR_BITS_SHIFT 21
11961196 #define AMD_FMT_MOD_PIPE_XOR_BITS_MASK 0x7
1197−#define AMD_FMT_MOD_BANK_XOR_BITS_SHIFT 23
1197+#define AMD_FMT_MOD_BANK_XOR_BITS_SHIFT 24
11981198 #define AMD_FMT_MOD_BANK_XOR_BITS_MASK 0x7
1199−#define AMD_FMT_MOD_PACKERS_SHIFT 26 /* aliases with BANK_XOR_BITS */
1199+#define AMD_FMT_MOD_PACKERS_SHIFT 27 /* aliases with BANK_XOR_BITS */
12001200 #define AMD_FMT_MOD_PACKERS_MASK 0x7
1201−#define AMD_FMT_MOD_RB_SHIFT 29
1201+#define AMD_FMT_MOD_RB_SHIFT 30
12021202 #define AMD_FMT_MOD_RB_MASK 0x7
1203−#define AMD_FMT_MOD_PIPE_SHIFT 32
1203+#define AMD_FMT_MOD_PIPE_SHIFT 33
12041204 #define AMD_FMT_MOD_PIPE_MASK 0x7
12051205
12061206 #define AMD_FMT_MOD_SET(field, value) \