From 2c0497b95d46635e2493a20f17204ceee332d18f Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 19 Jan 2022 11:26:44 -0800 Subject: [PATCH] venus: document vkr_cs_decoder_temp_pool Signed-off-by: Chia-I Wu Reviewed-by: Ryan Neph Reviewed-by: Yiwei Zhang --- src/venus/vkr_cs.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/venus/vkr_cs.h b/src/venus/vkr_cs.h index bf77212..2e37f9d 100644 --- a/src/venus/vkr_cs.h +++ b/src/venus/vkr_cs.h @@ -40,6 +40,14 @@ struct vkr_cs_decoder_saved_state { uint8_t *pool_reset_to; }; +/* + * We usually need many small allocations during decoding. Those allocations + * are suballocated from the temp pool. + * + * After a command is decoded, vkr_cs_decoder_reset_temp_pool is called to + * reset pool->cur. After an entire command stream is decoded, + * vkr_cs_decoder_gc_temp_pool is called to garbage collect pool->buffers. + */ struct vkr_cs_decoder_temp_pool { uint8_t **buffers; uint32_t buffer_count;