|
| 1 | +/* SPDX-License-Identifier: MIT */ |
| 2 | +/* |
| 3 | + * Copyright © 2023 Intel Corporation |
| 4 | + */ |
| 5 | + |
| 6 | +#ifndef _XE_ENGINE_REGS_H_ |
| 7 | +#define _XE_ENGINE_REGS_H_ |
| 8 | + |
| 9 | +#include <asm/page.h> |
| 10 | + |
| 11 | +#include "i915_reg_defs.h" |
| 12 | + |
| 13 | +#define RING_TAIL(base) _MMIO((base) + 0x30) |
| 14 | + |
| 15 | +#define RING_HEAD(base) _MMIO((base) + 0x34) |
| 16 | +#define HEAD_ADDR 0x001FFFFC |
| 17 | + |
| 18 | +#define RING_START(base) _MMIO((base) + 0x38) |
| 19 | + |
| 20 | +#define RING_CTL(base) _MMIO((base) + 0x3c) |
| 21 | +#define RING_CTL_SIZE(size) ((size) - PAGE_SIZE) /* in bytes -> pages */ |
| 22 | +#define RING_CTL_SIZE(size) ((size) - PAGE_SIZE) /* in bytes -> pages */ |
| 23 | + |
| 24 | +#define RING_PSMI_CTL(base) _MMIO((base) + 0x50) |
| 25 | +#define GEN8_RC_SEMA_IDLE_MSG_DISABLE REG_BIT(12) |
| 26 | +#define GEN12_WAIT_FOR_EVENT_POWER_DOWN_DISABLE REG_BIT(7) |
| 27 | + |
| 28 | +#define RING_ACTHD_UDW(base) _MMIO((base) + 0x5c) |
| 29 | +#define RING_DMA_FADD_UDW(base) _MMIO((base) + 0x60) |
| 30 | +#define RING_IPEIR(base) _MMIO((base) + 0x64) |
| 31 | +#define RING_IPEHR(base) _MMIO((base) + 0x68) |
| 32 | +#define RING_ACTHD(base) _MMIO((base) + 0x74) |
| 33 | +#define RING_DMA_FADD(base) _MMIO((base) + 0x78) |
| 34 | +#define RING_HWS_PGA(base) _MMIO((base) + 0x80) |
| 35 | +#define IPEIR(base) _MMIO((base) + 0x88) |
| 36 | +#define IPEHR(base) _MMIO((base) + 0x8c) |
| 37 | +#define RING_HWSTAM(base) _MMIO((base) + 0x98) |
| 38 | +#define RING_MI_MODE(base) _MMIO((base) + 0x9c) |
| 39 | +#define RING_NOPID(base) _MMIO((base) + 0x94) |
| 40 | + |
| 41 | +#define RING_IMR(base) _MMIO((base) + 0xa8) |
| 42 | +#define RING_MAX_NONPRIV_SLOTS 12 |
| 43 | + |
| 44 | +#define RING_EIR(base) _MMIO((base) + 0xb0) |
| 45 | +#define RING_EMR(base) _MMIO((base) + 0xb4) |
| 46 | +#define RING_ESR(base) _MMIO((base) + 0xb8) |
| 47 | +#define RING_BBADDR(base) _MMIO((base) + 0x140) |
| 48 | +#define RING_BBADDR_UDW(base) _MMIO((base) + 0x168) |
| 49 | +#define RING_EXECLIST_STATUS_LO(base) _MMIO((base) + 0x234) |
| 50 | +#define RING_EXECLIST_STATUS_HI(base) _MMIO((base) + 0x234 + 4) |
| 51 | + |
| 52 | +#define RING_CONTEXT_CONTROL(base) _MMIO((base) + 0x244) |
| 53 | +#define CTX_CTRL_INHIBIT_SYN_CTX_SWITCH REG_BIT(3) |
| 54 | +#define CTX_CTRL_ENGINE_CTX_RESTORE_INHIBIT REG_BIT(0) |
| 55 | + |
| 56 | +#define RING_MODE_GEN7(base) _MMIO((base) + 0x29c) |
| 57 | +#define GEN11_GFX_DISABLE_LEGACY_MODE (1 << 3) |
| 58 | + |
| 59 | +#define RING_TIMESTAMP(base) _MMIO((base) + 0x358) |
| 60 | + |
| 61 | +#define RING_TIMESTAMP_UDW(base) _MMIO((base) + 0x358 + 4) |
| 62 | +#define RING_VALID_MASK 0x00000001 |
| 63 | +#define RING_VALID 0x00000001 |
| 64 | +#define STOP_RING REG_BIT(8) |
| 65 | +#define TAIL_ADDR 0x001FFFF8 |
| 66 | + |
| 67 | +#define RING_CTX_TIMESTAMP(base) _MMIO((base) + 0x3a8) |
| 68 | + |
| 69 | +#define RING_FORCE_TO_NONPRIV(base, i) _MMIO(((base) + 0x4d0) + (i) * 4) |
| 70 | +#define RING_FORCE_TO_NONPRIV_DENY REG_BIT(30) |
| 71 | +#define RING_FORCE_TO_NONPRIV_ADDRESS_MASK REG_GENMASK(25, 2) |
| 72 | +#define RING_FORCE_TO_NONPRIV_ACCESS_RW (0 << 28) |
| 73 | +#define RING_FORCE_TO_NONPRIV_ACCESS_RD (1 << 28) |
| 74 | +#define RING_FORCE_TO_NONPRIV_ACCESS_WR (2 << 28) |
| 75 | +#define RING_FORCE_TO_NONPRIV_ACCESS_INVALID (3 << 28) |
| 76 | +#define RING_FORCE_TO_NONPRIV_ACCESS_MASK (3 << 28) |
| 77 | +#define RING_FORCE_TO_NONPRIV_RANGE_1 (0 << 0) |
| 78 | +#define RING_FORCE_TO_NONPRIV_RANGE_4 (1 << 0) |
| 79 | +#define RING_FORCE_TO_NONPRIV_RANGE_16 (2 << 0) |
| 80 | +#define RING_FORCE_TO_NONPRIV_RANGE_64 (3 << 0) |
| 81 | +#define RING_FORCE_TO_NONPRIV_RANGE_MASK (3 << 0) |
| 82 | +#define RING_FORCE_TO_NONPRIV_MASK_VALID (RING_FORCE_TO_NONPRIV_RANGE_MASK | \ |
| 83 | + RING_FORCE_TO_NONPRIV_ACCESS_MASK | \ |
| 84 | + RING_FORCE_TO_NONPRIV_DENY) |
| 85 | +#define RING_MAX_NONPRIV_SLOTS 12 |
| 86 | + |
| 87 | +#define RING_EXECLIST_SQ_CONTENTS(base) _MMIO((base) + 0x510) |
| 88 | + |
| 89 | +#define RING_EXECLIST_CONTROL(base) _MMIO((base) + 0x550) |
| 90 | +#define EL_CTRL_LOAD REG_BIT(0) |
| 91 | + |
| 92 | +#define VDBOX_CGCTL3F10(base) _MMIO((base) + 0x3f10) |
| 93 | +#define IECPUNIT_CLKGATE_DIS REG_BIT(22) |
| 94 | + |
| 95 | +#define VDBOX_CGCTL3F18(base) _MMIO((base) + 0x3f18) |
| 96 | +#define ALNUNIT_CLKGATE_DIS REG_BIT(13) |
| 97 | + |
| 98 | +#endif |
0 commit comments