Skip to content

Commit 2dae0c8

Browse files
committed
drm/i915: Use ABI engine class in error state ecode
Instead of printing out the internal engine mask, which can change between kernel versions making it difficult to map to actual engines, present a bitmask of hanging engines ABI classes. For example: [drm] GPU HANG: ecode 9:8:24dffffd, in gem_exec_schedu [1334] Engine ABI class is useful to quickly categorize render vs media etc hangs in bug reports. Considering virtual engine even more so than the current scheme. v2: * Do not re-order fields. (Chris) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20201105113842.1395391-1-tvrtko.ursulin@linux.intel.com
1 parent bda3002 commit 2dae0c8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/gpu/drm/i915/i915_gpu_error.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,17 +1659,16 @@ static u32 generate_ecode(const struct intel_engine_coredump *ee)
16591659
static const char *error_msg(struct i915_gpu_coredump *error)
16601660
{
16611661
struct intel_engine_coredump *first = NULL;
1662+
unsigned int hung_classes = 0;
16621663
struct intel_gt_coredump *gt;
1663-
intel_engine_mask_t engines;
16641664
int len;
16651665

1666-
engines = 0;
16671666
for (gt = error->gt; gt; gt = gt->next) {
16681667
struct intel_engine_coredump *cs;
16691668

16701669
for (cs = gt->engine; cs; cs = cs->next) {
16711670
if (cs->hung) {
1672-
engines |= cs->engine->mask;
1671+
hung_classes |= BIT(cs->engine->uabi_class);
16731672
if (!first)
16741673
first = cs;
16751674
}
@@ -1678,7 +1677,7 @@ static const char *error_msg(struct i915_gpu_coredump *error)
16781677

16791678
len = scnprintf(error->error_msg, sizeof(error->error_msg),
16801679
"GPU HANG: ecode %d:%x:%08x",
1681-
INTEL_GEN(error->i915), engines,
1680+
INTEL_GEN(error->i915), hung_classes,
16821681
generate_ecode(first));
16831682
if (first && first->context.pid) {
16841683
/* Just show the first executing process, more is confusing */

0 commit comments

Comments
 (0)