Hi Anand, I've made the test of OSA_dmaOpen x64 calls in several places in my flow but the IDs reported aren't constant so this suggests that the channels are being somehow opened and then closed by a user. I can't really rely on such info as I need to use channels that I can be sure are mine alone to use.
Also, even if I make some OR logic and extract from several runs IDs that were never used by Linux, who can tell what VPSS and all bios6-M3 code is using?
I must say that I find it very strange there isn't some single direct map of used channels, after all, someone had to bring-up the Appro device and validate the system functionality, no?
Any thoughts of why I get non-constant free channels IDs?
To avoid confusion, this is the code I was using for finding the relevant free channels:
#define BITS64_1(n) ( 1ll << (n) )
static void PrintFreeEdmaChannels()
{
OSA_DmaChHndl dmaHndl;
int status;
status = OSA_dmaInit();
uint32 i;
uint64 dmaBit = 0;
if (status == 0)
{
for (i = 0; i < 64; i++)
{
status = OSA_dmaOpen(&dmaHndl, OSA_DMA_MODE_NORMAL, 1);
if (status != 0)
{
OSA_printf("%s:OSA_dmaOpen %u failed - %d\n", __func__, i, status);
}
else
{
// OSA_printf("%s:OSA_dmaOpen passed with ch id = %d\n", __func__, dmaHndl.chId);
dmaBit |= BITS64_1(dmaHndl.chId);
}
}
}
else
{
OSA_printf("%s:OSA_dmaInit failed - %d\n", __func__, status);
}
for (i = 0; i < 64; i++)
{
if ((BITS64_1(i) & dmaBit) == 0)
{
OSA_printf("OSA_dmaOpen free for bios6 = %u\n", i);
}
}
}
Regards,
Roei