linux/kernel/dma
Yunfei Wang 5146690a6c ANDROID: dma/debug: fix warning of check_sync
check_sync() checks for whether device driver DMA sync sg list entry count equals to map sg list entry count, but in struct dma_buf_ops, there has below interface:
 int (*begin_cpu_access_partial)
 int (*end_cpu_access_partial)

When vendor implement these interface in dma heap to support dma-buf partial cache sync for performance improvement, in dma_buf_ops of heap, we copy a sgtable from orginal sgtable but with necessary nents, it will less then nents used in map attachment, in the way, the following warning had occurred:
DMA-API: device_xxx: device driver syncs DMA sg list with different entry count [map count=5] [sync count=1]
Call trace:
 check_sync+0x6d8/0xb40
 debug_dma_sync_sg_for_cpu+0x114/0x16c
 dma_sync_sg_for_cpu+0xa0/0xe4

So need change check conditation in check_sync to support dma-buf partial cache sync.

Bug: 236343688
Signed-off-by: Mingyuan Ma <mingyuan.ma@mediatek.com>
Signed-off-by: Yunfei Wang <yf.wang@mediatek.com>
Change-Id: I2f4db3b156e752eeb022927957f77a3fa534a573
(cherry picked from commit d61fe3ad4bab3f4bc040e7ac0c7ec919b50e8a43)
2022-06-22 19:59:42 +00:00
..
coherent.c FROMLIST: dma-mapping: Add dma_release_coherent_memory to DMA API 2022-05-31 17:47:08 +00:00
contiguous.c ANDROID: dma-contiguous: Add tracehook to allow subpage allocations in dma_alloc_contiguous 2021-12-17 02:31:49 -08:00
debug.c ANDROID: dma/debug: fix warning of check_sync 2022-06-22 19:59:42 +00:00
debug.h dma-mapping: move dma-debug.h to kernel/dma/ 2020-10-06 07:07:05 +02:00
direct.c ANDROID: dma-direct: Make DMA32 disablement work for CONFIG_NUMA 2022-03-03 23:34:32 +00:00
direct.h dma-mapping: move large parts of <linux/dma-direct.h> to kernel/dma 2020-10-06 07:07:06 +02:00
dummy.c dma-mapping: split <linux/dma-mapping.h> 2020-10-06 07:07:03 +02:00
Kconfig dma-mapping: merge <linux/dma-contiguous.h> into <linux/dma-map-ops.h> 2020-10-06 07:07:04 +02:00
Makefile dma-mapping: move dma_common_{mmap,get_sgtable} out of mapping.c 2020-09-11 09:14:56 +02:00
mapping.c ANDROID: iommu/dma: Add support for DMA_ATTR_SYS_CACHE_ONLY_NWA 2021-01-13 18:27:04 +00:00
ops_helpers.c This is the 5.10.54 stable release 2021-07-28 15:23:47 +02:00
pool.c This is the 5.10.94 stable release 2022-01-27 11:49:22 +01:00
remap.c dma-mapping: move more functions to dma-map-ops.h 2020-10-20 10:41:07 +02:00
swiotlb.c swiotlb: fix info leak with DMA_FROM_DEVICE 2022-04-08 14:39:46 +02:00
virt.c dma-mapping: split <linux/dma-mapping.h> 2020-10-06 07:07:03 +02:00