1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright © 2024 Intel Corporation */
5 #define TRACE_SYSTEM i915
7 #if !defined(__INTEL_UNCORE_TRACE_H__) || defined(TRACE_HEADER_MULTI_READ)
8 #define __INTEL_UNCORE_TRACE_H__
10 #include "i915_reg_defs.h"
12 #include <linux/types.h>
13 #include <linux/tracepoint.h>
15 TRACE_EVENT_CONDITION(i915_reg_rw,
16 TP_PROTO(bool write, i915_reg_t reg, u64 val, int len, bool trace),
18 TP_ARGS(write, reg, val, len, trace),
30 __entry->val = (u64)val;
31 __entry->reg = i915_mmio_reg_offset(reg);
32 __entry->write = write;
36 TP_printk("%s reg=0x%x, len=%d, val=(0x%x, 0x%x)",
37 __entry->write ? "write" : "read",
38 __entry->reg, __entry->len,
39 (u32)(__entry->val & 0xffffffff),
40 (u32)(__entry->val >> 32))
42 #endif /* __INTEL_UNCORE_TRACE_H__ */
44 /* This part must be outside protection */
45 #undef TRACE_INCLUDE_PATH
46 #undef TRACE_INCLUDE_FILE
47 #define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/i915
48 #define TRACE_INCLUDE_FILE intel_uncore_trace
49 #include <trace/define_trace.h>