Commit c45be4c3 authored by Stanimir Varbanov's avatar Stanimir Varbanov
Browse files

media: venus: don't abuse dma_alloc for non-DMA allocations



In venus_boot(), we pass a pointer to a phys_addr_t
into dmam_alloc_coherent, which the compiler warns about:

platform/qcom/venus/firmware.c: In function 'venus_boot':
platform/qcom/venus/firmware.c:63:49: error: passing argument 3 of 'dmam_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]

To avoid the error refactor venus_boot function by discard
dma_alloc_coherent usage because we don't want to map the
memory for the device. The meaning of venus_boot is to
copy the content of the firmware buffer into the reserved
(and memblock removed) block of memory and pass the physical
address to the remote processor.

Now we parse memory-region property by hand and memremap
the physical address to CPU, call mdt_load to load firmware
segments into proper places and unmap reserved memory.

Fixes: af2c3834 ("[media] media: venus: adding core part and helper functions")
Signed-off-by: default avatarStanimir Varbanov <stanimir.varbanov@linaro.org>
parent 57ee147f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment