✗ CI.checkpatch: warning for drm/xe/vf: Post-migration recovery of GGTT nodes and CTB (rev4)
Patchwork
patchwork at emeril.freedesktop.org
Fri Dec 20 23:41:38 UTC 2024
== Series Details ==
Series: drm/xe/vf: Post-migration recovery of GGTT nodes and CTB (rev4)
URL : https://patchwork.freedesktop.org/series/141439/
State : warning
== Summary ==
+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
30ab6715fc09baee6cc14cb3c89ad8858688d474
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 9e8348b39ea9a079e34d44d175d38f03e4c4bc4a
Author: Tomasz Lis <tomasz.lis at intel.com>
Date: Sat Dec 21 00:34:09 2024 +0100
drm/xe/vf: Fixup CTB send buffer messages after migration
During post-migration recovery of a VF, it is necessary to update
GGTT references included in messages which are going to be sent
to GuC. GuC will start consuming messages after VF KMD will inform
it about fixups being done; before that, the VF KMD is expected
to update any H2G messages which are already in send buffer but
were not consumed by GuC.
Only a small subset of messages allowed for VFs have GGTT references
in them. This patch adds the functionality to parse the CTB send
ring buffer and shift addresses contained within.
While fixing the CTB content, ct->lock is not taken. This means
the only barrier taken remains GGTT address lock - which is ok,
because only requests with GGTT addresses matter, but it also means
tail changes can happen during the CTB fixups execution (which may
be ignored as any new messages will not have anything to fix).
The GGTT address locking will be introduced in a future series.
v2: removed storing shift as that's now done in VMA nodes patch;
macros to inlines; warns to asserts; log messages fixes (Michal)
v3: Removed inline keywords, enums for offsets in CTB messages,
less error messages, if return unused then made functs void (Michal)
Signed-off-by: Tomasz Lis <tomasz.lis at intel.com>
+ /mt/dim checkpatch 0eede13975362b755a208b2e2ba322940013f183 drm-intel
ea017f1605d3 drm/drm_mm: Safe macro for iterating through nodes in range
-:32: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'node__' - possible side-effects?
#32: FILE: include/drm/drm_mm.h:520:
+#define drm_mm_for_each_node_in_range_safe(node__, next__, mm__, start__, end__) \
+ for (node__ = __drm_mm_interval_first((mm__), (start__), (end__)-1), \
+ next__ = list_next_entry(node__, node_list); \
+ node__->start < (end__); \
+ node__ = next__, next__ = list_next_entry(next__, node_list))
-:32: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'next__' - possible side-effects?
#32: FILE: include/drm/drm_mm.h:520:
+#define drm_mm_for_each_node_in_range_safe(node__, next__, mm__, start__, end__) \
+ for (node__ = __drm_mm_interval_first((mm__), (start__), (end__)-1), \
+ next__ = list_next_entry(node__, node_list); \
+ node__->start < (end__); \
+ node__ = next__, next__ = list_next_entry(next__, node_list))
-:32: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'end__' - possible side-effects?
#32: FILE: include/drm/drm_mm.h:520:
+#define drm_mm_for_each_node_in_range_safe(node__, next__, mm__, start__, end__) \
+ for (node__ = __drm_mm_interval_first((mm__), (start__), (end__)-1), \
+ next__ = list_next_entry(node__, node_list); \
+ node__->start < (end__); \
+ node__ = next__, next__ = list_next_entry(next__, node_list))
-:33: CHECK:SPACING: spaces preferred around that '-' (ctx:VxV)
#33: FILE: include/drm/drm_mm.h:521:
+ for (node__ = __drm_mm_interval_first((mm__), (start__), (end__)-1), \
^
total: 0 errors, 0 warnings, 4 checks, 25 lines checked
c2d5a31ffa03 drm/xe/sriov: Shifting GGTT area post migration
-:41: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#41: FILE: drivers/gpu/drm/xe/xe_ggtt.c:498:
+static void xe_ggtt_mm_shift_nodes(struct xe_ggtt *ggtt, struct drm_mm_node *balloon_beg,
+ struct drm_mm_node *balloon_fin, s64 shift)
-:153: ERROR:OPEN_BRACE: that open brace { should be on the previous line
#153: FILE: drivers/gpu/drm/xe/xe_ggtt.c:610:
+ if (!*balloon_beg)
+ {
-:166: ERROR:OPEN_BRACE: that open brace { should be on the previous line
#166: FILE: drivers/gpu/drm/xe/xe_ggtt.c:623:
+ if (!*balloon_fin)
+ {
-:184: ERROR:OPEN_BRACE: that open brace { should be on the previous line
#184: FILE: drivers/gpu/drm/xe/xe_ggtt.c:641:
+ if (*balloon_beg && !xe_ggtt_node_allocated(*balloon_beg))
+ {
-:190: ERROR:OPEN_BRACE: that open brace { should be on the previous line
#190: FILE: drivers/gpu/drm/xe/xe_ggtt.c:647:
+ if (*balloon_fin && !xe_ggtt_node_allocated(*balloon_fin))
+ {
total: 4 errors, 0 warnings, 1 checks, 270 lines checked
9e8348b39ea9 drm/xe/vf: Fixup CTB send buffer messages after migration
-:68: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#68: FILE: drivers/gpu/drm/xe/xe_guc_ct.c:1628:
+static u32 ctb_read32(struct xe_device *xe, struct iosys_map *cmds,
+ u32 head, u32 pos)
-:78: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#78: FILE: drivers/gpu/drm/xe/xe_guc_ct.c:1638:
+static void ctb_fixup64(struct xe_device *xe, struct iosys_map *cmds,
+ u32 head, u32 pos, s64 shift)
-:122: WARNING:LONG_LINE: line length of 106 exceeds 100 columns
#122: FILE: drivers/gpu/drm/xe/xe_guc_ct.c:1682:
+ n = ctb_read32(xe, cmds, head, XE_GUC_REGISTER_CONTEXT_MULTI_LRC_OFFS_N_CHILDREN);
-:125: WARNING:LONG_LINE: line length of 122 exceeds 100 columns
#125: FILE: drivers/gpu/drm/xe/xe_guc_ct.c:1685:
+ ctb_fixup64(xe, cmds, head, XE_GUC_REGISTER_CONTEXT_MULTI_LRC_OFFS_HWLRCA + 2 * i, shift);
-:205: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#205: FILE: drivers/gpu/drm/xe/xe_guc_ct.c:1765:
+ xe_gt_err(gt, "Corrupted H2G descriptor head=%u tail=%u size=%u\n",
+ head, tail, size);
total: 0 errors, 2 warnings, 3 checks, 229 lines checked
More information about the Intel-xe
mailing list