linux/drivers/gpu/drm/i915/i915_perf_oa_regs.h

/* SPDX-License-Identifier: MIT */
/*
 * Copyright © 2022 Intel Corporation
 */

#ifndef __INTEL_PERF_OA_REGS__
#define __INTEL_PERF_OA_REGS__

#include "i915_reg_defs.h"

#define GEN7_OACONTROL
#define GEN7_OACONTROL_CTX_MASK
#define GEN7_OACONTROL_TIMER_PERIOD_MASK
#define GEN7_OACONTROL_TIMER_PERIOD_SHIFT
#define GEN7_OACONTROL_TIMER_ENABLE
#define GEN7_OACONTROL_FORMAT_A13
#define GEN7_OACONTROL_FORMAT_A29
#define GEN7_OACONTROL_FORMAT_A13_B8_C8
#define GEN7_OACONTROL_FORMAT_A29_B8_C8
#define GEN7_OACONTROL_FORMAT_B4_C8
#define GEN7_OACONTROL_FORMAT_A45_B8_C8
#define GEN7_OACONTROL_FORMAT_B4_C8_A16
#define GEN7_OACONTROL_FORMAT_C4_B8
#define GEN7_OACONTROL_FORMAT_SHIFT
#define GEN7_OACONTROL_PER_CTX_ENABLE
#define GEN7_OACONTROL_ENABLE

#define GEN8_OACTXID

#define GEN8_OA_DEBUG
#define GEN9_OA_DEBUG_DISABLE_CLK_RATIO_REPORTS
#define GEN9_OA_DEBUG_INCLUDE_CLK_RATIO
#define GEN9_OA_DEBUG_DISABLE_GO_1_0_REPORTS
#define GEN9_OA_DEBUG_DISABLE_CTX_SWITCH_REPORTS

#define GEN8_OACONTROL
#define GEN8_OA_REPORT_FORMAT_A12
#define GEN8_OA_REPORT_FORMAT_A12_B8_C8
#define GEN8_OA_REPORT_FORMAT_A36_B8_C8
#define GEN8_OA_REPORT_FORMAT_C4_B8
#define GEN8_OA_REPORT_FORMAT_SHIFT
#define GEN8_OA_SPECIFIC_CONTEXT_ENABLE
#define GEN8_OA_COUNTER_ENABLE

#define GEN8_OACTXCONTROL
#define GEN8_OA_TIMER_PERIOD_MASK
#define GEN8_OA_TIMER_PERIOD_SHIFT
#define GEN8_OA_TIMER_ENABLE
#define GEN8_OA_COUNTER_RESUME

#define GEN7_OABUFFER
#define GEN7_OABUFFER_OVERRUN_DISABLE
#define GEN7_OABUFFER_EDGE_TRIGGER
#define GEN7_OABUFFER_STOP_RESUME_ENABLE
#define GEN7_OABUFFER_RESUME

#define GEN8_OABUFFER_UDW
#define GEN8_OABUFFER
#define GEN8_OABUFFER_MEM_SELECT_GGTT

#define GEN7_OASTATUS1
#define GEN7_OASTATUS1_TAIL_MASK
#define GEN7_OASTATUS1_COUNTER_OVERFLOW
#define GEN7_OASTATUS1_OABUFFER_OVERFLOW
#define GEN7_OASTATUS1_REPORT_LOST

#define GEN7_OASTATUS2
#define GEN7_OASTATUS2_HEAD_MASK
#define GEN7_OASTATUS2_MEM_SELECT_GGTT

#define GEN8_OASTATUS
#define GEN8_OASTATUS_TAIL_POINTER_WRAP
#define GEN8_OASTATUS_HEAD_POINTER_WRAP
#define GEN8_OASTATUS_OVERRUN_STATUS
#define GEN8_OASTATUS_COUNTER_OVERFLOW
#define GEN8_OASTATUS_OABUFFER_OVERFLOW
#define GEN8_OASTATUS_REPORT_LOST

#define GEN8_OAHEADPTR
#define GEN8_OAHEADPTR_MASK
#define GEN8_OATAILPTR
#define GEN8_OATAILPTR_MASK

#define OABUFFER_SIZE_128K
#define OABUFFER_SIZE_256K
#define OABUFFER_SIZE_512K
#define OABUFFER_SIZE_1M
#define OABUFFER_SIZE_2M
#define OABUFFER_SIZE_4M
#define OABUFFER_SIZE_8M
#define OABUFFER_SIZE_16M

#define GEN12_OA_TLB_INV_CR

/* Gen12 OAR unit */
#define GEN12_OAR_OACONTROL
#define GEN12_OAR_OACONTROL_COUNTER_FORMAT_SHIFT
#define GEN12_OAR_OACONTROL_COUNTER_ENABLE

#define GEN12_OACTXCONTROL(base)
#define GEN12_OAR_OASTATUS

/* Gen12 OAG unit */
#define GEN12_OAG_OAHEADPTR
#define GEN12_OAG_OAHEADPTR_MASK
#define GEN12_OAG_OATAILPTR
#define GEN12_OAG_OATAILPTR_MASK

#define GEN12_OAG_OABUFFER
#define GEN12_OAG_OABUFFER_BUFFER_SIZE_MASK
#define GEN12_OAG_OABUFFER_BUFFER_SIZE_SHIFT
#define GEN12_OAG_OABUFFER_MEMORY_SELECT

#define GEN12_OAG_OAGLBCTXCTRL
#define GEN12_OAG_OAGLBCTXCTRL_TIMER_PERIOD_SHIFT
#define GEN12_OAG_OAGLBCTXCTRL_TIMER_ENABLE
#define GEN12_OAG_OAGLBCTXCTRL_COUNTER_RESUME

#define GEN12_OAG_OACONTROL
#define GEN12_OAG_OACONTROL_OA_COUNTER_FORMAT_SHIFT
#define GEN12_OAG_OACONTROL_OA_COUNTER_ENABLE

#define GEN12_OAG_OA_DEBUG
#define GEN12_OAG_OA_DEBUG_INCLUDE_CLK_RATIO
#define GEN12_OAG_OA_DEBUG_DISABLE_CLK_RATIO_REPORTS
#define GEN12_OAG_OA_DEBUG_DISABLE_GO_1_0_REPORTS
#define GEN12_OAG_OA_DEBUG_DISABLE_CTX_SWITCH_REPORTS

#define GEN12_OAG_OASTATUS
#define GEN12_OAG_OASTATUS_COUNTER_OVERFLOW
#define GEN12_OAG_OASTATUS_BUFFER_OVERFLOW
#define GEN12_OAG_OASTATUS_REPORT_LOST

#define GDT_CHICKEN_BITS
#define GT_NOA_ENABLE

/* Gen12 OAM unit */
#define GEN12_OAM_HEAD_POINTER_OFFSET
#define GEN12_OAM_HEAD_POINTER_MASK

#define GEN12_OAM_TAIL_POINTER_OFFSET
#define GEN12_OAM_TAIL_POINTER_MASK

#define GEN12_OAM_BUFFER_OFFSET
#define GEN12_OAM_BUFFER_SIZE_MASK
#define GEN12_OAM_BUFFER_SIZE_SHIFT
#define GEN12_OAM_BUFFER_MEMORY_SELECT

#define GEN12_OAM_CONTEXT_CONTROL_OFFSET
#define GEN12_OAM_CONTEXT_CONTROL_TIMER_PERIOD_SHIFT
#define GEN12_OAM_CONTEXT_CONTROL_TIMER_ENABLE
#define GEN12_OAM_CONTEXT_CONTROL_COUNTER_RESUME

#define GEN12_OAM_CONTROL_OFFSET
#define GEN12_OAM_CONTROL_COUNTER_FORMAT_SHIFT
#define GEN12_OAM_CONTROL_COUNTER_ENABLE

#define GEN12_OAM_DEBUG_OFFSET
#define GEN12_OAM_DEBUG_BUFFER_SIZE_SELECT
#define GEN12_OAM_DEBUG_INCLUDE_CLK_RATIO
#define GEN12_OAM_DEBUG_DISABLE_CLK_RATIO_REPORTS
#define GEN12_OAM_DEBUG_DISABLE_GO_1_0_REPORTS
#define GEN12_OAM_DEBUG_DISABLE_CTX_SWITCH_REPORTS

#define GEN12_OAM_STATUS_OFFSET
#define GEN12_OAM_STATUS_COUNTER_OVERFLOW
#define GEN12_OAM_STATUS_BUFFER_OVERFLOW
#define GEN12_OAM_STATUS_REPORT_LOST

#define GEN12_OAM_MMIO_TRG_OFFSET

#define GEN12_OAM_MMIO_TRG(base)

#define GEN12_OAM_HEAD_POINTER(base)
#define GEN12_OAM_TAIL_POINTER(base)
#define GEN12_OAM_BUFFER(base)
#define GEN12_OAM_CONTEXT_CONTROL(base)
#define GEN12_OAM_CONTROL(base)
#define GEN12_OAM_DEBUG(base)
#define GEN12_OAM_STATUS(base)

#define GEN12_OAM_CEC0_0_OFFSET
#define GEN12_OAM_CEC7_1_OFFSET
#define GEN12_OAM_CEC0_0(base)
#define GEN12_OAM_CEC7_1(base)

#define GEN12_OAM_STARTTRIG1_OFFSET
#define GEN12_OAM_STARTTRIG8_OFFSET
#define GEN12_OAM_STARTTRIG1(base)
#define GEN12_OAM_STARTTRIG8(base)

#define GEN12_OAM_REPORTTRIG1_OFFSET
#define GEN12_OAM_REPORTTRIG8_OFFSET
#define GEN12_OAM_REPORTTRIG1(base)
#define GEN12_OAM_REPORTTRIG8(base)

#define GEN12_OAM_PERF_COUNTER_B0_OFFSET
#define GEN12_OAM_PERF_COUNTER_B(base, idx)

#endif /* __INTEL_PERF_OA_REGS__ */