class GenericTask

Defined at line 24 of file ../../src/camera/drivers/hw_accel/task/task.h

The |Task| class store all the information pertaining to

a task when registered. It maintains the VMO pool for the

output buffer collections.

Public Methods

zx_status_t GetInputBufferPhysAddr (uint32_t input_buffer_index, zx_paddr_t * out)

Returns the physical address for the input buffer.

|input_buffer_index| : Index of the input buffer for which the address is

requested. |out| : Returns the physical address if the index provided is

valid.

Defined at line 26 of file ../../src/camera/drivers/hw_accel/task/task.cc

zx_status_t GetInputBufferPhysSize (uint32_t input_buffer_index, uint64_t * out)

Returns the size of the input buffer.

|input_buffer_index| : Index of the input buffer for which the address is

requested. |out| : Returns the size if the index provided is

valid.

Defined at line 36 of file ../../src/camera/drivers/hw_accel/task/task.cc

bool IsInputBufferIndexValid (uint32_t input_buffer_index)

Validates input buffer index.

Defined at line 39 of file ../../src/camera/drivers/hw_accel/task/task.h

fpromise::result<uint32_t, zx_status_t> GetOutputBufferPhysAddr ()

Returns the physical address for the output buffer which is

picked from the pool of free buffers.

Defined at line 45 of file ../../src/camera/drivers/hw_accel/task/task.h

std::optional<fzl::VmoPool::Buffer> WriteLockOutputBuffer ()

Defined at line 56 of file ../../src/camera/drivers/hw_accel/task/task.h

uint32_t GetOutputBufferIndex ()

Releases the write lock of the output buffer and returns back and index.

Defined at line 65 of file ../../src/camera/drivers/hw_accel/task/task.h

zx_status_t ReleaseOutputBuffer (uint32_t index)

Returns the output buffer back to the VMO pool to be reused again.

Defined at line 73 of file ../../src/camera/drivers/hw_accel/task/task.h

zx_status_t ReleaseOutputBuffer (fzl::VmoPool::Buffer buffer)

Returns the output buffer back to the VMO pool to be reused again.

Defined at line 79 of file ../../src/camera/drivers/hw_accel/task/task.h

bool IsInputFormatIndexValid (uint32_t input_format_index)

Validates input buffer index.

Defined at line 85 of file ../../src/camera/drivers/hw_accel/task/task.h

bool IsOutputFormatIndexValid (uint32_t output_format_index)

Validates output buffer index.

Defined at line 89 of file ../../src/camera/drivers/hw_accel/task/task.h

uint32_t input_format_index ()

Defined at line 92 of file ../../src/camera/drivers/hw_accel/task/task.h

uint32_t output_format_index ()

Defined at line 93 of file ../../src/camera/drivers/hw_accel/task/task.h

void set_input_format_index (uint32_t new_index)

Defined at line 94 of file ../../src/camera/drivers/hw_accel/task/task.h

void set_output_format_index (uint32_t new_index)

Defined at line 95 of file ../../src/camera/drivers/hw_accel/task/task.h

image_format_2_t input_format ()

Defined at line 96 of file ../../src/camera/drivers/hw_accel/task/task.h

image_format_2_t output_format ()

Defined at line 99 of file ../../src/camera/drivers/hw_accel/task/task.h

void FrameReadyCallback (const frame_available_info_t * info)

Defined at line 103 of file ../../src/camera/drivers/hw_accel/task/task.h

void ResolutionChangeCallback (const frame_available_info_t * info)

Defined at line 107 of file ../../src/camera/drivers/hw_accel/task/task.h

void RemoveTaskCallback (task_remove_status_t status)

Defined at line 111 of file ../../src/camera/drivers/hw_accel/task/task.h

Protected Methods

zx_status_t InitBuffers (const buffer_collection_info_2_t * input_buffer_collection, const buffer_collection_info_2_t * output_buffer_collection, std::string output_buffers_name, const image_format_2_t * input_image_format_table_list, size_t input_image_format_table_count, uint32_t input_image_format_index, const image_format_2_t * output_image_format_table_list, size_t output_image_format_table_count, uint32_t output_image_format_index, const zx::bti & bti, const hw_accel_frame_callback_t * frame_callback, const hw_accel_res_change_callback_t * res_callback, const hw_accel_remove_task_callback_t * remove_task_callback)

Initializes a VMO pool from buffer collection for output buffer collection.

Pins the input buffer collection.

Defined at line 44 of file ../../src/camera/drivers/hw_accel/task/task.cc

zx_status_t InitInputBuffers (const buffer_collection_info_2_t * input_buffer_collection, const image_format_2_t * input_image_format_table_list, size_t input_image_format_table_count, uint32_t input_image_format_index, const zx::bti & bti, const hw_accel_frame_callback_t * frame_callback, const hw_accel_res_change_callback_t * res_callback, const hw_accel_remove_task_callback_t * remove_task_callback)

Just pins the input buffer collection.

Defined at line 92 of file ../../src/camera/drivers/hw_accel/task/task.cc