/** * update_logtype() - Send KCCB command to trigger FW to update logtype * @pvr_dev: Target PowerVR device * @group_mask: New log group mask. * * Returns: * * 0 on success, * * Any error returned by pvr_kccb_send_cmd(), or * * -%EIO if the device is lost.
*/ staticint
update_logtype(struct pvr_device *pvr_dev, u32 group_mask)
{ struct pvr_fw_trace *fw_trace = &pvr_dev->fw_dev.fw_trace; struct rogue_fwif_kccb_cmd cmd; int idx; int err;
/** * fw_trace_get_next() - Advance trace index to next entry * @trace_seq_data: Trace sequence data. * * Returns: * * %true if trace index is now pointing to a valid entry, or * * %false if trace index is pointing to an invalid entry, or has hit the end * of the trace.
*/ staticbool fw_trace_get_next(struct pvr_fw_trace_seq_data *trace_seq_data)
{
u32 id, sf_id;
while (trace_seq_data->idx < ROGUE_FW_TRACE_BUF_DEFAULT_SIZE_IN_DWORDS) {
id = read_fw_trace(trace_seq_data, 0);
trace_seq_data->idx++; if (!ROGUE_FW_LOG_VALIDID(id)) continue; if (id == ROGUE_FW_SF_MAIN_ASSERT_FAILED) { /* Assertion failure marks the end of the trace. */ returnfalse;
}
sf_id = find_sfid(id); if (sf_id == ROGUE_FW_SF_FIRST) continue; if (sf_id == ROGUE_FW_SF_LAST) { /* * Could not match with an ID in the SF table, trace is * most likely corrupt from this point.
*/ returnfalse;
}
/* Skip over the timestamp, and any parameters. */
trace_seq_data->idx += 2 + ROGUE_FW_SF_PARAMNUM(id);
/* Ensure index is now pointing to a valid trace entry. */
id = read_fw_trace(trace_seq_data, 0); if (!ROGUE_FW_LOG_VALIDID(id)) continue;
returntrue;
}
/* Hit end of trace data. */ returnfalse;
}
/** * fw_trace_get_first() - Find first valid entry in trace * @trace_seq_data: Trace sequence data. * * Skips over invalid (usually zero) and ROGUE_FW_SF_FIRST entries. * * If the trace has no valid entries, this function will exit with the trace * index pointing to the end of the trace. trace_seq_show() will return an error * in this state.
*/ staticvoid fw_trace_get_first(struct pvr_fw_trace_seq_data *trace_seq_data)
{
trace_seq_data->idx = 0;
while (trace_seq_data->idx < ROGUE_FW_TRACE_BUF_DEFAULT_SIZE_IN_DWORDS) {
u32 id = read_fw_trace(trace_seq_data, 0);
if (ROGUE_FW_LOG_VALIDID(id)) {
u32 sf_id = find_sfid(id);
if (sf_id != ROGUE_FW_SF_FIRST) break;
}
trace_seq_data->idx++;
}
}
/* * Take a local copy of the trace buffer, as firmware may still be * writing to it. This will exist as long as this file is open.
*/
memcpy(trace_seq_data->buffer, trace_buffer->buf,
ROGUE_FW_TRACE_BUF_DEFAULT_SIZE_IN_DWORDS * sizeof(u32));
trace_seq_data->start_offset = READ_ONCE(tracebuf_space->trace_pointer);
trace_seq_data->assert_buf = tracebuf_space->assert_buf;
fw_trace_get_first(trace_seq_data);
err = seq_open(file, &pvr_fw_trace_seq_ops); if (err) goto err_free_buffer;
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.