mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 14:12:07 +02:00
drm/i915: extract intel_uncore_trace.[ch]
The i915_reg_rw tracing is a small isolated part of i915_trace.h. Its users are orthogonal to the other i915_trace.h users as well, and its implementation does not require all the includes of i915_trace.h. Split i915_reg_rw tracing to separate intel_uncore_trace.[ch]. The main underlying goal is to reduce implicit includes of i915_drv.h from display code. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/1a3623fbb120adc55bc1cab1e27aca6e55487163.1732104170.git.jani.nikula@intel.com
This commit is contained in:
parent
57442cfb45
commit
17d7072607
|
|
@ -43,6 +43,7 @@ i915-y += \
|
|||
intel_sbi.o \
|
||||
intel_step.o \
|
||||
intel_uncore.o \
|
||||
intel_uncore_trace.o \
|
||||
intel_wakeref.o \
|
||||
vlv_sideband.o \
|
||||
vlv_suspend.o
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@
|
|||
#define __INTEL_DE_H__
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_trace.h"
|
||||
#include "intel_dsb.h"
|
||||
#include "intel_uncore.h"
|
||||
#include "intel_uncore_trace.h"
|
||||
|
||||
static inline struct intel_uncore *__to_uncore(struct intel_display *display)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "i915_trace.h"
|
||||
#include "intel_de.h"
|
||||
#include "intel_display_types.h"
|
||||
#include "intel_dp.h"
|
||||
|
|
@ -14,6 +13,7 @@
|
|||
#include "intel_pps.h"
|
||||
#include "intel_quirks.h"
|
||||
#include "intel_tc.h"
|
||||
#include "intel_uncore_trace.h"
|
||||
|
||||
#define AUX_CH_NAME_BUFSIZE 6
|
||||
|
||||
|
|
|
|||
|
|
@ -642,34 +642,6 @@ DEFINE_EVENT(i915_request, i915_request_wait_end,
|
|||
TP_ARGS(rq)
|
||||
);
|
||||
|
||||
TRACE_EVENT_CONDITION(i915_reg_rw,
|
||||
TP_PROTO(bool write, i915_reg_t reg, u64 val, int len, bool trace),
|
||||
|
||||
TP_ARGS(write, reg, val, len, trace),
|
||||
|
||||
TP_CONDITION(trace),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(u64, val)
|
||||
__field(u32, reg)
|
||||
__field(u16, write)
|
||||
__field(u16, len)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->val = (u64)val;
|
||||
__entry->reg = i915_mmio_reg_offset(reg);
|
||||
__entry->write = write;
|
||||
__entry->len = len;
|
||||
),
|
||||
|
||||
TP_printk("%s reg=0x%x, len=%d, val=(0x%x, 0x%x)",
|
||||
__entry->write ? "write" : "read",
|
||||
__entry->reg, __entry->len,
|
||||
(u32)(__entry->val & 0xffffffff),
|
||||
(u32)(__entry->val >> 32))
|
||||
);
|
||||
|
||||
/**
|
||||
* DOC: i915_ppgtt_create and i915_ppgtt_release tracepoints
|
||||
*
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@
|
|||
#include "i915_drv.h"
|
||||
#include "i915_iosf_mbi.h"
|
||||
#include "i915_reg.h"
|
||||
#include "i915_trace.h"
|
||||
#include "i915_vgpu.h"
|
||||
#include "intel_uncore_trace.h"
|
||||
|
||||
#define FORCEWAKE_ACK_TIMEOUT_MS 50
|
||||
#define GT_FIFO_TIMEOUT_MS 10
|
||||
|
|
|
|||
7
drivers/gpu/drm/i915/intel_uncore_trace.c
Normal file
7
drivers/gpu/drm/i915/intel_uncore_trace.c
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/* Copyright © 2024 Intel Corporation */
|
||||
|
||||
#ifndef __CHECKER__
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include "intel_uncore_trace.h"
|
||||
#endif
|
||||
49
drivers/gpu/drm/i915/intel_uncore_trace.h
Normal file
49
drivers/gpu/drm/i915/intel_uncore_trace.h
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/* Copyright © 2024 Intel Corporation */
|
||||
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM i915
|
||||
|
||||
#if !defined(__INTEL_UNCORE_TRACE_H__) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define __INTEL_UNCORE_TRACE_H__
|
||||
|
||||
#include "i915_reg_defs.h"
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/tracepoint.h>
|
||||
|
||||
TRACE_EVENT_CONDITION(i915_reg_rw,
|
||||
TP_PROTO(bool write, i915_reg_t reg, u64 val, int len, bool trace),
|
||||
|
||||
TP_ARGS(write, reg, val, len, trace),
|
||||
|
||||
TP_CONDITION(trace),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(u64, val)
|
||||
__field(u32, reg)
|
||||
__field(u16, write)
|
||||
__field(u16, len)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->val = (u64)val;
|
||||
__entry->reg = i915_mmio_reg_offset(reg);
|
||||
__entry->write = write;
|
||||
__entry->len = len;
|
||||
),
|
||||
|
||||
TP_printk("%s reg=0x%x, len=%d, val=(0x%x, 0x%x)",
|
||||
__entry->write ? "write" : "read",
|
||||
__entry->reg, __entry->len,
|
||||
(u32)(__entry->val & 0xffffffff),
|
||||
(u32)(__entry->val >> 32))
|
||||
);
|
||||
#endif /* __INTEL_UNCORE_TRACE_H__ */
|
||||
|
||||
/* This part must be outside protection */
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
#undef TRACE_INCLUDE_FILE
|
||||
#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/i915
|
||||
#define TRACE_INCLUDE_FILE intel_uncore_trace
|
||||
#include <trace/define_trace.h>
|
||||
|
|
@ -13,6 +13,7 @@
|
|||
#include "i915_trace.h"
|
||||
#include "i915_utils.h"
|
||||
#include "intel_clock_gating.h"
|
||||
#include "intel_uncore_trace.h"
|
||||
#include "vlv_suspend.h"
|
||||
|
||||
#include "gt/intel_gt_regs.h"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user