int active_engine_instance = -1;
enum address_space active_gtt = PPGTT;
+ enum address_space default_gtt = PPGTT;
struct {
struct {
NULL, pci_id, "error_state");
if (verbose)
aub.verbose_log_file = stdout;
- fail_if(!aub_use_execlists(&aub),
- "%s currently only works on gen8+\n", argv[0]);
+ default_gtt = active_gtt = aub_use_execlists(&aub) ? PPGTT : GGTT;
continue;
}
char *ring = line + strlen(active_start);
engine_from_name(ring, &active_engine_class, &active_engine_instance);
- active_gtt = PPGTT;
+ active_gtt = default_gtt;
char *count = strchr(ring, '[');
fail_if(!count || sscanf(count, "[%d]:", &num_ring_bos) < 1,
if (num_ring_bos > 0) {
unsigned hi, lo, size;
if (sscanf(line, " %x_%x %d", &hi, &lo, &size) == 3) {
- assert(aub_use_execlists(&aub));
struct bo *bo_entry = find_or_create(&bo_list, ((uint64_t)hi) << 32 | lo,
active_gtt,
active_engine_class,
enum bo_type type;
enum address_space gtt;
} bo_types[] = {
- { "gtt_offset", BO_TYPE_BATCH, PPGTT },
- { "user", BO_TYPE_USER, PPGTT },
+ { "gtt_offset", BO_TYPE_BATCH, default_gtt },
+ { "user", BO_TYPE_USER, default_gtt },
{ "HW context", BO_TYPE_CONTEXT, GGTT },
{ "ringbuffer", BO_TYPE_RINGBUFFER, GGTT },
{ "HW Status", BO_TYPE_STATUS, GGTT },
list_for_each_entry(struct bo, bo_entry, &bo_list, link) {
switch (bo_entry->type) {
case BO_TYPE_BATCH:
- aub_map_ppgtt(&aub, bo_entry->addr, bo_entry->size);
- aub_write_trace_block(&aub, AUB_TRACE_TYPE_BATCH,
- bo_entry->data, bo_entry->size, bo_entry->addr);
+ if (bo_entry->gtt == PPGTT) {
+ aub_map_ppgtt(&aub, bo_entry->addr, bo_entry->size);
+ aub_write_trace_block(&aub, AUB_TRACE_TYPE_BATCH,
+ bo_entry->data, bo_entry->size, bo_entry->addr);
+ } else
+ aub_write_ggtt(&aub, bo_entry->addr, bo_entry->size, bo_entry->data);
break;
case BO_TYPE_USER:
- aub_map_ppgtt(&aub, bo_entry->addr, bo_entry->size);
- aub_write_trace_block(&aub, AUB_TRACE_TYPE_NOTYPE,
- bo_entry->data, bo_entry->size, bo_entry->addr);
+ if (bo_entry->gtt == PPGTT) {
+ aub_map_ppgtt(&aub, bo_entry->addr, bo_entry->size);
+ aub_write_trace_block(&aub, AUB_TRACE_TYPE_NOTYPE,
+ bo_entry->data, bo_entry->size, bo_entry->addr);
+ } else
+ aub_write_ggtt(&aub, bo_entry->addr, bo_entry->size, bo_entry->data);
break;
case BO_TYPE_CONTEXT:
if (bo_entry->engine_class == batch_bo->engine_class &&
- bo_entry->engine_instance == batch_bo->engine_instance) {
+ bo_entry->engine_instance == batch_bo->engine_instance &&
+ aub_use_execlists(&aub)) {
hwsp_bo = bo_entry;
uint32_t *context = (uint32_t *) (bo_entry->data + 4096 /* GuC */ + 4096 /* HWSP */);
}
}
- fail_if(!hwsp_bo, "Failed to find Context buffer.\n");
- aub_write_context_execlists(&aub, hwsp_bo->addr + 4096 /* skip GuC page */, hwsp_bo->engine_class);
+ if (aub_use_execlists(&aub)) {
+ fail_if(!hwsp_bo, "Failed to find Context buffer.\n");
+ aub_write_context_execlists(&aub, hwsp_bo->addr + 4096 /* skip GuC page */, hwsp_bo->engine_class);
+ } else
+ aub_write_exec(&aub, batch_bo->addr, 0, I915_ENGINE_CLASS_RENDER);
/* Cleanup */
list_for_each_entry_safe(struct bo, bo_entry, &bo_list, link) {