Good afternoon,
I am trying to determine the physical memory location of the buffer allocated by video for linux's IO_METHOD_MMAP
Looking through the mmap function,
mmap(NULL /* start anywhere */,
buf.length,
PROT_READ | PROT_WRITE /* required */,
MAP_SHARED /* recommended */,
fd, //FileDescriptor
buf.m.offset);
I see that buf.m.offset is 0, then increments the by the buf.length value for each plane.
What I am looking for is the physcial address in memory for the filedescriptor (fd) created by /dev/video0 device.
This is on Im6.
The purpose of this is to pass that physical address to the Gpu,
Thanks,
After the successful
mmap
you couldopen
(e.g. usingfopen
), then sequentially read (e.g. usingfgets
) the textual (pipe-like)/proc/self/maps
file (or also/proc/self/smaps
).See proc(5) and this answer.