mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
f79ee3013a
Rather than a backpointer to the xe_device, a GT should have a backpointer to its tile (which can then be used to lookup the device if necessary). The gt_to_xe() helper macro (which moves from xe_gt.h to xe_gt_types.h) can and should still be used to jump directly from an xe_gt to xe_device. v2: - Fix kunit test build - Move a couple changes to the previous patch. (Lucas) Reviewed-by: Matt Atwood <matthew.s.atwood@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://lore.kernel.org/r/20230601215244.678611-4-matthew.d.roper@intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
46 lines
1.4 KiB
C
46 lines
1.4 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2023 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_GT_PRINTK_H_
|
|
#define _XE_GT_PRINTK_H_
|
|
|
|
#include <drm/drm_print.h>
|
|
|
|
#include "xe_device_types.h"
|
|
|
|
#define xe_gt_printk(_gt, _level, _fmt, ...) \
|
|
drm_##_level(>_to_xe(_gt)->drm, "GT%u: " _fmt, (_gt)->info.id, ##__VA_ARGS__)
|
|
|
|
#define xe_gt_err(_gt, _fmt, ...) \
|
|
xe_gt_printk((_gt), err, _fmt, ##__VA_ARGS__)
|
|
|
|
#define xe_gt_warn(_gt, _fmt, ...) \
|
|
xe_gt_printk((_gt), warn, _fmt, ##__VA_ARGS__)
|
|
|
|
#define xe_gt_notice(_gt, _fmt, ...) \
|
|
xe_gt_printk((_gt), notice, _fmt, ##__VA_ARGS__)
|
|
|
|
#define xe_gt_info(_gt, _fmt, ...) \
|
|
xe_gt_printk((_gt), info, _fmt, ##__VA_ARGS__)
|
|
|
|
#define xe_gt_dbg(_gt, _fmt, ...) \
|
|
xe_gt_printk((_gt), dbg, _fmt, ##__VA_ARGS__)
|
|
|
|
#define xe_gt_err_ratelimited(_gt, _fmt, ...) \
|
|
xe_gt_printk((_gt), err_ratelimited, _fmt, ##__VA_ARGS__)
|
|
|
|
#define xe_gt_WARN(_gt, _condition, _fmt, ...) \
|
|
drm_WARN(>_to_xe(_gt)->drm, _condition, "GT%u: " _fmt, (_gt)->info.id, ##__VA_ARGS__)
|
|
|
|
#define xe_gt_WARN_ONCE(_gt, _condition, _fmt, ...) \
|
|
drm_WARN_ONCE(>_to_xe(_gt)->drm, _condition, "GT%u: " _fmt, (_gt)->info.id, ##__VA_ARGS__)
|
|
|
|
#define xe_gt_WARN_ON(_gt, _condition) \
|
|
xe_gt_WARN((_gt), _condition, "%s(%s)", "gt_WARN_ON", __stringify(_condition))
|
|
|
|
#define xe_gt_WARN_ON_ONCE(_gt, _condition) \
|
|
xe_gt_WARN_ONCE((_gt), _condition, "%s(%s)", "gt_WARN_ON_ONCE", __stringify(_condition))
|
|
|
|
#endif
|