-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drm/i915/gt: Start adding module oriented dmesg output
When trying to analyse bug reports from CI, customers, etc. it can be difficult to work out exactly what is happening on which GT in a multi-GT system. So add GT oriented debug/error message wrappers. If used instead of the drm_ equivalents, you get the same output but with a GT# prefix on it. v2: Go back to using lower case names (combined review feedback). Convert intel_gt.c as a first step. v3: Add gt_err_ratelimited() as well, undo one conversation that might not have a GT pointer in some scenarios (review feedback from Michal W). Split definitions into separate header (review feedback from Jani). Convert all intel_gt*.c files. v4: Re-order some macro definitions (Andi S), update (c) date (Tvrtko) Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230111200429.2139084-2-John.C.Harrison@Intel.com
- Loading branch information
John Harrison
authored and
John Harrison
committed
Jan 17, 2023
1 parent
0c8a6e9
commit 67804e4
Showing
9 changed files
with
129 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* SPDX-License-Identifier: MIT */ | ||
/* | ||
* Copyright © 2023 Intel Corporation | ||
*/ | ||
|
||
#ifndef __INTEL_GT_PRINT__ | ||
#define __INTEL_GT_PRINT__ | ||
|
||
#include <drm/drm_print.h> | ||
#include "intel_gt_types.h" | ||
#include "i915_utils.h" | ||
|
||
#define gt_err(_gt, _fmt, ...) \ | ||
drm_err(&(_gt)->i915->drm, "GT%u: " _fmt, (_gt)->info.id, ##__VA_ARGS__) | ||
|
||
#define gt_warn(_gt, _fmt, ...) \ | ||
drm_warn(&(_gt)->i915->drm, "GT%u: " _fmt, (_gt)->info.id, ##__VA_ARGS__) | ||
|
||
#define gt_notice(_gt, _fmt, ...) \ | ||
drm_notice(&(_gt)->i915->drm, "GT%u: " _fmt, (_gt)->info.id, ##__VA_ARGS__) | ||
|
||
#define gt_info(_gt, _fmt, ...) \ | ||
drm_info(&(_gt)->i915->drm, "GT%u: " _fmt, (_gt)->info.id, ##__VA_ARGS__) | ||
|
||
#define gt_dbg(_gt, _fmt, ...) \ | ||
drm_dbg(&(_gt)->i915->drm, "GT%u: " _fmt, (_gt)->info.id, ##__VA_ARGS__) | ||
|
||
#define gt_err_ratelimited(_gt, _fmt, ...) \ | ||
drm_err_ratelimited(&(_gt)->i915->drm, "GT%u: " _fmt, (_gt)->info.id, ##__VA_ARGS__) | ||
|
||
#define gt_probe_error(_gt, _fmt, ...) \ | ||
do { \ | ||
if (i915_error_injected()) \ | ||
gt_dbg(_gt, _fmt, ##__VA_ARGS__); \ | ||
else \ | ||
gt_err(_gt, _fmt, ##__VA_ARGS__); \ | ||
} while (0) | ||
|
||
#define gt_WARN(_gt, _condition, _fmt, ...) \ | ||
drm_WARN(&(_gt)->i915->drm, _condition, "GT%u: " _fmt, (_gt)->info.id, ##__VA_ARGS__) | ||
|
||
#define gt_WARN_ONCE(_gt, _condition, _fmt, ...) \ | ||
drm_WARN_ONCE(&(_gt)->i915->drm, _condition, "GT%u: " _fmt, (_gt)->info.id, ##__VA_ARGS__) | ||
|
||
#define gt_WARN_ON(_gt, _condition) \ | ||
gt_WARN(_gt, _condition, "%s", "gt_WARN_ON(" __stringify(_condition) ")") | ||
|
||
#define gt_WARN_ON_ONCE(_gt, _condition) \ | ||
gt_WARN_ONCE(_gt, _condition, "%s", "gt_WARN_ONCE(" __stringify(_condition) ")") | ||
|
||
#endif /* __INTEL_GT_PRINT_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.