linux_dsm_epyc7002/drivers/media/platform/qcom/venus
Stanimir Varbanov 377a22d3ca 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 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: af2c3834c8 ("[media] media: venus: adding core part and helper functions")

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-26 06:14:32 -04:00
..
core.c media: venus: don't abuse dma_alloc for non-DMA allocations 2017-07-26 06:14:32 -04:00
core.h media: venus: don't abuse dma_alloc for non-DMA allocations 2017-07-26 06:14:32 -04:00
firmware.c media: venus: don't abuse dma_alloc for non-DMA allocations 2017-07-26 06:14:32 -04:00
firmware.h media: venus: don't abuse dma_alloc for non-DMA allocations 2017-07-26 06:14:32 -04:00
helpers.c [media] media: venus: helpers: fix variable dereferenced before check 2017-06-20 08:53:40 -03:00
helpers.h
hfi_cmds.c [media] media: venus: hfi_cmds: fix variable dereferenced before check 2017-06-20 08:53:40 -03:00
hfi_cmds.h [media] media: venus: hfi: add Host Firmware Interface (HFI) 2017-06-20 08:53:40 -03:00
hfi_helper.h [media] media: venus: hfi: add Host Firmware Interface (HFI) 2017-06-20 08:53:40 -03:00
hfi_msgs.c media: venus: hfi: fix error handling in hfi_sys_init_done() 2017-07-26 06:14:32 -04:00
hfi_msgs.h [media] media: venus: hfi: add Host Firmware Interface (HFI) 2017-06-20 08:53:40 -03:00
hfi_venus_io.h [media] media: venus: hfi: add Venus HFI files 2017-06-20 08:53:40 -03:00
hfi_venus.c [media] media: venus: hfi_venus: fix variable dereferenced before check 2017-06-20 08:53:40 -03:00
hfi_venus.h [media] media: venus: hfi: add Venus HFI files 2017-06-20 08:53:40 -03:00
hfi.c [media] media: venus: hfi: fix mutex unlock 2017-06-20 08:53:40 -03:00
hfi.h [media] media: venus: hfi: add Host Firmware Interface (HFI) 2017-06-20 08:53:40 -03:00
Makefile [media] media: venus: enable building of Venus video driver 2017-06-20 08:53:40 -03:00
vdec_ctrls.c [media] media: venus: vdec: add support for min buffers for capture 2017-06-20 08:53:41 -03:00
vdec.c [media] media: venus: vdec: add support for min buffers for capture 2017-06-20 08:53:41 -03:00
vdec.h
venc_ctrls.c [media] media: venus: venc: add video encoder files 2017-06-20 08:53:39 -03:00
venc.c [media] media: venus: venc: fix compile error in venc_close 2017-06-20 08:53:41 -03:00
venc.h [media] media: venus: venc: add video encoder files 2017-06-20 08:53:39 -03:00