/* * Put the restart at the end of pushbuffer memory
*/ staticvoid push_buffer_init(struct push_buffer *pb)
{
*(u32 *)(pb->mapped + pb->size) = host1x_opcode_restart(0);
}
/* start the command DMA */
host1x_ch_writel(ch, 0, HOST1X_CHANNEL_DMACTRL);
cdma->running = true;
}
/* * Similar to cdma_start(), but rather than starting from an idle * state (where DMA GET is set to DMA PUT), on a timeout we restore * DMA GET from an explicit value (so DMA may again be pending).
*/ staticvoid cdma_timeout_restart(struct host1x_cdma *cdma, u32 getptr)
{ struct host1x *host1x = cdma_to_host1x(cdma); struct host1x_channel *ch = cdma_to_channel(cdma);
u64 start, end;
/* set GET, by loading the value in PUT (then reset GET) */
host1x_ch_writel(ch, getptr, HOST1X_CHANNEL_DMAPUT);
host1x_ch_writel(ch, HOST1X_CHANNEL_DMACTRL_DMASTOP |
HOST1X_CHANNEL_DMACTRL_DMAGETRST |
HOST1X_CHANNEL_DMACTRL_DMAINITGET,
HOST1X_CHANNEL_DMACTRL);
dev_dbg(host1x->dev, "%s: DMA GET 0x%x, PUT HW 0x%x / shadow 0x%x\n", __func__,
host1x_ch_readl(ch, HOST1X_CHANNEL_DMAGET),
host1x_ch_readl(ch, HOST1X_CHANNEL_DMAPUT),
cdma->last_pos);
/* deassert GET reset and set PUT */
host1x_ch_writel(ch, HOST1X_CHANNEL_DMACTRL_DMASTOP,
HOST1X_CHANNEL_DMACTRL);
host1x_ch_writel(ch, cdma->push_buffer.pos, HOST1X_CHANNEL_DMAPUT);
/* start the command DMA */
host1x_ch_writel(ch, 0, HOST1X_CHANNEL_DMACTRL);
cdma->running = true;
}
/* * Kick channel DMA into action by writing its PUT offset (if it has changed)
*/ staticvoid cdma_flush(struct host1x_cdma *cdma)
{ struct host1x_channel *ch = cdma_to_channel(cdma);
staticvoid timeout_release_mlock(struct host1x_cdma *cdma)
{ #if HOST1X_HW >= 8 /* Tegra186 and Tegra194 require a more complicated MLOCK release * sequence. Furthermore, those chips by default don't enforce MLOCKs, * so it turns out that if we don't /actually/ need MLOCKs, we can just * ignore them. * * As such, for now just implement this on Tegra234 where things are * stricter but also easy to implement.
*/ struct host1x_channel *ch = cdma_to_channel(cdma); struct host1x *host1x = cdma_to_host1x(cdma);
u32 offset;
switch (ch->client->class) { case HOST1X_CLASS_NVJPG1:
offset = HOST1X_COMMON_NVJPG1_MLOCK; break; case HOST1X_CLASS_NVENC:
offset = HOST1X_COMMON_NVENC_MLOCK; break; case HOST1X_CLASS_VIC:
offset = HOST1X_COMMON_VIC_MLOCK; break; case HOST1X_CLASS_NVJPG:
offset = HOST1X_COMMON_NVJPG_MLOCK; break; case HOST1X_CLASS_NVDEC:
offset = HOST1X_COMMON_NVDEC_MLOCK; break; case HOST1X_CLASS_OFA:
offset = HOST1X_COMMON_OFA_MLOCK; break; default:
WARN(1, "%s was not updated for class %u", __func__, ch->client->class); return;
}
/* * If this timeout fires, it indicates the current sync_queue entry has * exceeded its TTL and the userctx should be timed out and remaining * submits already issued cleaned up (future submits return an error).
*/ staticvoid cdma_timeout_handler(struct work_struct *work)
{
u32 syncpt_val; struct host1x_cdma *cdma; struct host1x *host1x; struct host1x_channel *ch;
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.