/* Dump the registers even if an external error prevents gathering the stack. */
addr = avs_log_buffer_addr(adev, msg->ext.coredump.core_id); if (!addr) gotoexit;
buf = avs_apl_log_payload_addr(addr);
memcpy_fromio(&layout, addr, sizeof(layout)); if (!avs_apl_is_entry_stackdump(buf + layout.read_ptr)) { union avs_notify_msg lbs_msg = AVS_NOTIFICATION(LOG_BUFFER_STATUS);
/* * DSP awaits the remaining logs to be * gathered before dumping stack
*/
lbs_msg.log.core = msg->ext.coredump.core_id;
avs_log_buffer_status_locked(adev, &lbs_msg);
}
pos = dump + AVS_FW_REGS_SIZE; /* gather the stack */ do {
u32 count;
if (avs_apl_wait_log_entry(adev, msg->ext.coredump.core_id, &layout)) break;
spin_lock(&adev->path_list_lock); /* Any gateway without buffer allocated in LP area disqualifies D0IX. */
list_for_each_entry(path, &adev->path_list, node) { struct avs_path_pipeline *ppl;
/* only copiers have gateway attributes */ if (!guid_equal(&cfg->type, &AVS_COPIER_MOD_UUID)) continue; /* non-gateway copiers do not prevent PG */ if (cfg->copier.dma_type == INVALID_OBJECT_ID) continue;
if (!mod->gtw_attrs.lp_buffer_alloc) {
spin_unlock(&adev->path_list_lock); returnfalse;
}
}
}
}
spin_unlock(&adev->path_list_lock);
returntrue;
}
bool avs_apl_d0ix_toggle(struct avs_dev *adev, struct avs_ipc_msg *tx, bool wake)
{ /* wake in all cases */ if (wake) returntrue;
/* * If no pipelines are running, allow for d0ix schedule. * If all gateways have lp=1, allow for d0ix schedule. * If any gateway with lp=0 is allocated, abort scheduling d0ix. * * Note: for cAVS 1.5+ and 1.8, D0IX is LP-firmware transition, * not the power-gating mechanism known from cAVS 2.0.
*/ return avs_apl_lp_streaming(adev);
}
int avs_apl_set_d0ix(struct avs_dev *adev, bool enable)
{ bool streaming = false; int ret;
if (enable) /* Either idle or all gateways with lp=1. */
streaming = !list_empty(&adev->path_list);
ret = avs_ipc_set_d0ix(adev, enable, streaming); return AVS_IPC_RET(ret);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.