coe: make CoE capture more robust

Modify CoE capture logic a bit to make it more robust and error-proof:
- RCE Rx queue limit size is 16, no point to have 32 elements long queue
  in kernel.
- Pass kernel's queue length to RCE when opening a channel so it can be
  validated (to not exceed RCE max depth)
- validate image buffers IOVA addresses and buffer length before queuing
  to RCE

Jira CT26X-1892

Change-Id: I199143fe726ebab05a1236d4b14b59f0528d65a8
Signed-off-by: Igor Mitsyanko <imitsyanko@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3419638
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: Raki Hassan <rakibulh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
This commit is contained in:
Igor Mitsyanko
2025-06-26 06:59:47 +00:00
committed by mobile promotions
parent f374450381
commit 344aa664d2
2 changed files with 43 additions and 3 deletions

View File

@@ -872,7 +872,7 @@ struct capture_coe_channel_config {
/**
* Numerical instance ID of an ethernet controller for the channel
*/
uint32_t mgbe_instance_id;
uint16_t mgbe_instance_id;
/**
* Virtual DMA channel number for this capture channel
*/
@@ -885,6 +885,10 @@ struct capture_coe_channel_config {
* Hardware IRQ ID which will be asserted for events on that DMA channel
*/
uint16_t mgbe_irq_num;
/**
* Maximum number of capture requests in the requests queue [1, 16].
*/
uint16_t rx_queue_depth;
/**
* Ethernet address of a camera module which will us the channel
*/