Is tegra_channel_buffer_prepare() in channel.c file is invoked during buffer enqueueing?

In the channel.c driver , we’re using the tegra_channel_buffer_prepare() function to manage buffers and track the framecount variable. I believe this function is invoked when a buffer is being enqueued. Can anyone confirm if tegra_channel_buffer_prepare() is specifically triggered during the enqueue process, and if it’s the correct place to capture and track the current frame count?

hello abraham.s,

tegra_channel_buffer_prepare() it means this buffer has been prepared.

may I know what’s the real use-case? you may tracking the vbuf->sequence as following.
note, vb2_buffer_done is the function call for sending a frame to user-space.
for instance, $public_sources/kernel_src/kernel/nvidia/drivers/media/platform/tegra/camera/vi/vi5_fops.c

static void vi5_release_buffer(...)
{
        vbuf->sequence = chan->sequence++;
        vb2_buffer_done(&vbuf->vb2_buf, buf->vb2_state);

I want to obtain the frame id from the embedded metadata and that to from enqueue buffer. Is it possible to obtain that value during the enqueuing process

hello abraham.s,

there’s capture_descr_index, an index into the VI capture descriptor queue.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.