Commit 1cf52a0
drm: define NVIDIA DRM format modifiers for GB20x
The layout of bits within the individual tiles
(referred to as sectors in the
DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D() macro)
changed for 8 and 16-bit surfaces starting in
Blackwell 2 GPUs (With the exception of GB10).
To denote the difference, extend the sector field
in the parametric format modifier definition used
to generate modifier values for NVIDIA hardware.
Without this change, it would be impossible to
differentiate the two layouts based on modifiers,
and as a result software could attempt to share
surfaces directly between pre-GB20x and GB20x
cards, resulting in corruption when the surface
was accessed on one of the GPUs after being
populated with content by the other.
Of note: This change causes the
DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D() macro to
evaluate its "s" parameter twice, with the side
effects that entails. I surveyed all usage of the
modifier in the kernel and Mesa code, and that
does not appear to be problematic in any current
usage, but I thought it was worth calling out.
Fixes: 6cc6e08 ("drm/nouveau/kms: add support for GB20x")
Signed-off-by: James Jones <[email protected]>
Reviewed-by: Faith Ekstrand <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Cc: [email protected]
Link: https://patch.msgid.link/[email protected]1 parent ebe7556 commit 1cf52a0
1 file changed
+16
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
979 | 979 | | |
980 | 980 | | |
981 | 981 | | |
982 | | - | |
983 | | - | |
984 | | - | |
985 | | - | |
986 | | - | |
987 | | - | |
988 | | - | |
989 | | - | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
990 | 996 | | |
991 | 997 | | |
992 | 998 | | |
| |||
1001 | 1007 | | |
1002 | 1008 | | |
1003 | 1009 | | |
1004 | | - | |
| 1010 | + | |
1005 | 1011 | | |
1006 | 1012 | | |
1007 | 1013 | | |
1008 | 1014 | | |
1009 | 1015 | | |
1010 | 1016 | | |
1011 | 1017 | | |
| 1018 | + | |
1012 | 1019 | | |
1013 | 1020 | | |
1014 | 1021 | | |
| |||
0 commit comments