mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
377a22d3ca
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 invocation because we don't want to map the
memory for the device. Something more, the usage of
DMA mapping API is actually wrong and the current
implementation relies on several bugs in DMA mapping code.
When these bugs are fixed that will break firmware loading,
so fix this now to avoid future troubles.
The meaning of venus_boot is to copy the content of the
firmware buffer into reserved (and memblock removed)
block of memory and pass that physical address to the
trusted zone for authentication and mapping through iommu
form the secure world. After iommu mapping is done the iova
is passed as ane entry point to the remote processor.
After this change memory-region property is parsed manually
and the physical address is memremap to CPU, call mdt_load to
load firmware segments into proper places and unmap
reserved memory.
Fixes:
|
||
---|---|---|
.. | ||
core.c | ||
core.h | ||
firmware.c | ||
firmware.h | ||
helpers.c | ||
helpers.h | ||
hfi_cmds.c | ||
hfi_cmds.h | ||
hfi_helper.h | ||
hfi_msgs.c | ||
hfi_msgs.h | ||
hfi_venus_io.h | ||
hfi_venus.c | ||
hfi_venus.h | ||
hfi.c | ||
hfi.h | ||
Makefile | ||
vdec_ctrls.c | ||
vdec.c | ||
vdec.h | ||
venc_ctrls.c | ||
venc.c | ||
venc.h |