diff options
author | Lionel Landwerlin <[email protected]> | 2018-09-03 15:11:08 +0100 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2019-03-07 15:08:32 +0000 |
commit | 0b3871bc7f4dc89895551ab87ee7b25b166e1a6d (patch) | |
tree | ac53ca947994e84a509ea5dea7b2609ac4ed8712 /src/intel/tools/gen_context.h | |
parent | c1a2c72e76fa5ace071d6ff91654918f562c292c (diff) |
intel/aub_write: factorize context image/pphwsp/ring creation
We allocate GGTT entries and physical addresses are we create engines
rather than having a fixed layout.
Context images now receive a parameter argument which is used to setup
pml4 & ring buffer addresses.
Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Rafael Antognolli <[email protected]>
Diffstat (limited to 'src/intel/tools/gen_context.h')
-rw-r--r-- | src/intel/tools/gen_context.h | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/src/intel/tools/gen_context.h b/src/intel/tools/gen_context.h index e7b75806e4e..3678d8d6965 100644 --- a/src/intel/tools/gen_context.h +++ b/src/intel/tools/gen_context.h @@ -75,22 +75,6 @@ #define NUM_PT_ENTRIES (ALIGN(MEMORY_MAP_SIZE, 4096) / 4096) #define PT_SIZE ALIGN(NUM_PT_ENTRIES * GEN8_PTE_SIZE, 4096) -#define STATIC_GGTT_MAP_START 0 - -#define RENDER_RING_ADDR STATIC_GGTT_MAP_START -#define RENDER_CONTEXT_ADDR (RENDER_RING_ADDR + RING_SIZE) - -#define BLITTER_RING_ADDR (RENDER_CONTEXT_ADDR + PPHWSP_SIZE + GEN9_LR_CONTEXT_RENDER_SIZE) -#define BLITTER_CONTEXT_ADDR (BLITTER_RING_ADDR + RING_SIZE) - -#define VIDEO_RING_ADDR (BLITTER_CONTEXT_ADDR + PPHWSP_SIZE + GEN8_LR_CONTEXT_OTHER_SIZE) -#define VIDEO_CONTEXT_ADDR (VIDEO_RING_ADDR + RING_SIZE) - -#define STATIC_GGTT_MAP_END (VIDEO_CONTEXT_ADDR + PPHWSP_SIZE + GEN8_LR_CONTEXT_OTHER_SIZE) -#define STATIC_GGTT_MAP_SIZE (STATIC_GGTT_MAP_END - STATIC_GGTT_MAP_START) - -#define PML4_PHYS_ADDR ((uint64_t)(STATIC_GGTT_MAP_END)) - #define CONTEXT_FLAGS (0x339) /* Normal Priority | L3-LLC Coherency | * PPGTT Enabled | * Legacy Context with 64 bit VA support | @@ -105,9 +89,14 @@ *(data)++ = __regs[__e]; \ } while (0) -#define RENDER_CONTEXT_DESCRIPTOR ((uint64_t)1 << 62 | RENDER_CONTEXT_ADDR | CONTEXT_FLAGS) -#define BLITTER_CONTEXT_DESCRIPTOR ((uint64_t)2 << 62 | BLITTER_CONTEXT_ADDR | CONTEXT_FLAGS) -#define VIDEO_CONTEXT_DESCRIPTOR ((uint64_t)3 << 62 | VIDEO_CONTEXT_ADDR | CONTEXT_FLAGS) + +struct gen_context_parameters { + uint64_t pml4_addr; + uint64_t ring_addr; + uint32_t ring_size; +}; + +typedef void (*gen_context_init_t)(const struct gen_context_parameters *, uint32_t *, uint32_t *); #include "gen8_context.h" #include "gen10_context.h" |