mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 08:31:55 +00:00
8f93e043d0
In zap_shader_load_mdt(), we pass a pointer to a phys_addr_t into dmam_alloc_coherent, which the compiler warns about: drivers/gpu/drm/msm/adreno/a5xx_gpu.c: In function 'zap_shader_load_mdt': drivers/gpu/drm/msm/adreno/a5xx_gpu.c:54:50: error: passing argument 3 of 'dmam_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types] The returned DMA address is later passed on to a function that takes a phys_addr_t, so it's clearly wrong to use the DMA mapping interface here: the memory may be uncached, or the address may be completely wrong if there is an IOMMU connected to the device. What the code actually wants to do is to get the physical address from the reserved-mem node. It goes through the dma-mapping interfaces for obscure reasons, and this apparently only works by chance, relying on specific bugs in the error handling of the arm64 dma-mapping implementation. The same problem existed in the "venus" media driver, which was now fixed by Stanimir Varbanov after long discussions. In order to make some progress here, I have now ported his approach over to the adreno driver. The patch is currently untested, and should get a good review, but it is now much simpler than the original, and it should be obvious what goes wrong if I made a mistake in the port. See also: |
||
---|---|---|
.. | ||
adreno | ||
dsi | ||
edp | ||
hdmi | ||
mdp | ||
Kconfig | ||
Makefile | ||
msm_atomic.c | ||
msm_debugfs.c | ||
msm_debugfs.h | ||
msm_drv.c | ||
msm_drv.h | ||
msm_fb.c | ||
msm_fbdev.c | ||
msm_fence.c | ||
msm_fence.h | ||
msm_gem_prime.c | ||
msm_gem_shrinker.c | ||
msm_gem_submit.c | ||
msm_gem_vma.c | ||
msm_gem.c | ||
msm_gem.h | ||
msm_gpu.c | ||
msm_gpu.h | ||
msm_iommu.c | ||
msm_kms.h | ||
msm_mmu.h | ||
msm_perf.c | ||
msm_rd.c | ||
msm_ringbuffer.c | ||
msm_ringbuffer.h | ||
NOTES |