/** * pvr_cccb_get_size_of_cmd_with_hdr() - Get the size of a command and its header. * @cmd_size: Command size. * * Returns the size of the command and its header.
*/ static __always_inline u32
pvr_cccb_get_size_of_cmd_with_hdr(u32 cmd_size)
{
WARN_ON(!IS_ALIGNED(cmd_size, 8)); returnsizeof(struct rogue_fwif_ccb_cmd_header) + ALIGN(cmd_size, 8);
}
/** * pvr_cccb_cmdseq_can_fit() - Check if a command sequence can fit in the CCCB. * @pvr_cccb: Target Client CCB. * @size: Command sequence size. * * Returns: * * true it the CCCB is big enough to contain a command sequence, or * * false otherwise.
*/ static __always_inline bool
pvr_cccb_cmdseq_can_fit(struct pvr_cccb *pvr_cccb, size_t size)
{ /* We divide the capacity by two to simplify our CCCB fencing logic: * we want to be sure that, no matter what we had queued before, we * are able to either queue our command sequence at the end or add a * padding command and queue the command sequence at the beginning * of the CCCB. If the command sequence size is bigger than half the * CCCB capacity, we'd have to queue the padding command and make sure * the FW is done processing it before queueing our command sequence.
*/ return size + PADDING_COMMAND_SIZE <= pvr_cccb->size / 2;
}
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.