Can I use Mali to access I/O registers?


I am playing with Juno board and its Mali T624 GPU. Basically, i am trying to read/write the I/O registers from GPU. In my case, i know the physical address of the registers and i can map the registers to the virtual memory space of the application processor. However, i don't really know how to make Mali access these registers.

The ARM computer library provides a nice support for the OpenCL APIs, so I tried to use OpenCL first. I mapped the registers to virtual memory space, and use clCreateBuffer with CL_MEM_USE_HOST_PTR to make the virtual memory accessible to Mali. The problem is that the buffer accessed by Mali is actually a copy, and writing to the buffer won't directly write back to the registers. I might use map/unmap operations to achieve the write back, but this is not what i really want. The manual tells that the flag CL_MEM_ALLOC_HOST_PTR is the only way to avoid data copying, but if i create a buffer with CL_MEM_ALLOC_HOST_PTR, i cannot get an efficient way to map the I/O registers to the allocated buffer.

I also tried to look through the provided open source kernel GPU driver. Since the source code does not contain a formal documentation and the GPU manual is not publicly avaliable, i am totally lost in the code.

Does anyone have any experience on similar problem? Thanks for any suggestions and discussions!

Best Regards,


More questions in this forum