✗ CI.checkpatch: warning for drm/xe: Add WA BB to capture active context utilization
Patchwork
patchwork at emeril.freedesktop.org
Fri Apr 25 21:50:26 UTC 2025
== Series Details ==
Series: drm/xe: Add WA BB to capture active context utilization
URL : https://patchwork.freedesktop.org/series/148289/
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
202708c00696422fd217223bb679a353a5936e23
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit a4e5d9a86fb800922bd3d60ed6e256f49ace5ecc
Author: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
Date: Fri Apr 25 12:10:39 2025 -0700
drm/xe: Add WA BB to capture active context utilization
Context Timestamp (CTX_TIMESTAMP) in the lrc accumulates the run ticks
of the context, but only gets updated when the context switches out. In
order to check how long a context has been active before it switches
out, two things are required:
(1) Determine if the context is running:
To do so, we program the wa bb to set an initial value for CTX_TIMESTAMP
in the lrc. The value chosen is 1 since 0 is the initial value when the
lrc is initialized. During a query, we just check for this value to
determine if the context is active. If the context switched out, it
would overwrite this location with the actual CTX_TIMESTAMP MMIO value.
Note that wa bb will run after the context has been restored, so reusing
this lrc location will not clobber anything.
(2) Calculate the time that the context has been active for:
The CTX_TIMESTAMP ticks only when the context is active. If a context is
active, we just use the CTX_TIMESTAMP MMIO as the new value of
utilization. While doing so, we need to read the CTX_TIMESTAMP MMIO
for the specific engine instance. Since we do not know which instance
the context is running on until it is scheduled, we also read the
ENGINE_ID MMIO in the wa bb and store it in the PPHSWP.
Using the above 2 instructions in a WA BB, capture active context
utilization.
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
+ /mt/dim checkpatch 6e67a7af43567bb9f23fe156fde7efa3d214fd20 drm-intel
a4e5d9a86fb8 drm/xe: Add WA BB to capture active context utilization
-:174: ERROR:CODE_INDENT: code indent should use tabs where possible
#174: FILE: drivers/gpu/drm/xe/xe_lrc.c:939:
+ *cmd++ = MI_STORE_DATA_IMM | MI_SDI_GGTT | MI_SDI_NUM_DW(1);$
-:174: WARNING:LEADING_SPACE: please, no spaces at the start of a line
#174: FILE: drivers/gpu/drm/xe/xe_lrc.c:939:
+ *cmd++ = MI_STORE_DATA_IMM | MI_SDI_GGTT | MI_SDI_NUM_DW(1);$
-:175: ERROR:CODE_INDENT: code indent should use tabs where possible
#175: FILE: drivers/gpu/drm/xe/xe_lrc.c:940:
+ *cmd++ = __xe_lrc_ctx_timestamp_ggtt_addr(lrc);$
-:175: WARNING:LEADING_SPACE: please, no spaces at the start of a line
#175: FILE: drivers/gpu/drm/xe/xe_lrc.c:940:
+ *cmd++ = __xe_lrc_ctx_timestamp_ggtt_addr(lrc);$
-:176: ERROR:CODE_INDENT: code indent should use tabs where possible
#176: FILE: drivers/gpu/drm/xe/xe_lrc.c:941:
+ *cmd++ = 0;$
-:176: WARNING:LEADING_SPACE: please, no spaces at the start of a line
#176: FILE: drivers/gpu/drm/xe/xe_lrc.c:941:
+ *cmd++ = 0;$
-:177: ERROR:CODE_INDENT: code indent should use tabs where possible
#177: FILE: drivers/gpu/drm/xe/xe_lrc.c:942:
+ *cmd++ = 1;$
-:177: WARNING:LEADING_SPACE: please, no spaces at the start of a line
#177: FILE: drivers/gpu/drm/xe/xe_lrc.c:942:
+ *cmd++ = 1;$
total: 4 errors, 4 warnings, 0 checks, 291 lines checked
More information about the Intel-xe
mailing list