Hi all:
I develop on dm8168 use dvrrdk 4.0 packet,
I am reading the Epdrv_sample_apps of pcie devices on dm8168,
and i have three questions:
1. In file ti81xx_ep_app.c in function send_data_by_cpu(), send_to_remote_buf_by_cpu((u32 *)mapped_pci, offset, ret) is called, i think that
mapped_pci = (char *)mmap(0, PCIE_NON_PREFETCH_SIZE,PROT_READ|PROT_WRITE, MAP_SHARED, fd, (off_t)0x20000000);
the start address is 0x20000000, but offset may not start from base 0x20000000, only that first ob(0) is not use
to map RC mem whose address is getted from scan_mgmt_area fun ob->ob_offset_idx = rm_info[1];
if the RC mem is mapped to ob(6), how can i access it through mapped_pci ?
void send_data_by_cpu()
{
int ret;
unsigned int offset;
ACCESS_MGMT:
while ((ret = access_mgmt_area((u32 *)mapped_pci,
mgmt_area.my_unique_id)) < 0) {
debug_print("mgmt_area access not granted\n");
sleep(2);
continue;
}
while ((ret = get_free_buffer((u32 *)mapped_pci)) < 0) {
debug_print("buffer not available\n");
release_mgmt_area((u32 *)mapped_pci);
sleep(2);
goto ACCESS_MGMT;
}
offset = offset_to_buffer((u32 *)mapped_pci, ret);
send_to_remote_buf_by_cpu((u32 *)mapped_pci, offset, ret);
debug_print("send by cpu successful\n");
release_mgmt_area((u32 *)mapped_pci);
}
----------------------------------------------------
2. Does this demo support multi EP devices in the system, how to use
struct ti81xx_mgmt_area {
unsigned int unique_id;
unsigned int my_unique_id;
}
--------------------------------------------------------
3. If want to pass video frame between RC and EP,
usually video capture is done at vpss, and video process on dsp,
How to modfies Epdrv_sample_apps to facility transfer video frames between Rc and ep as a8 has no phy address of each frame use kernal reserve mem will increase dma transfer between m3 or dsp to A8
best regards
xavier