msm: kgsl: Fix DMA API warning while dma_buf_map_attachment()
The dma_get_max_seg_size() returns a default value of 64k when dma_parms are not allocated. When CONFIG_DMA_API_DEBUG_SG is enabled and the requested size is more 64k, it triggers a warning as below. [ 25.468427] c6 754 kgsl kgsl-3d0: DMA-API: mapping sg segment longer than device claims to support [len=2097152] [max=65536] [ 25.480236] c6 754 WARNING: CPU: 6 PID: 754 at kernel/dma/debug.c:1302 [ 25.497971] c6 754 Kernel panic - not syncing: panic_on_warn set ... [ 25.714532] c6 754 Call trace: [ 25.717938] c6 754 dump_backtrace+0x0/0x200 [ 25.722598] c6 754 dump_stack+0xb8/0xf0 [ 25.726897] c6 754 panic+0x160/0x44c [ 25.730934] c6 754 trace_raw_output_cpuhp_multi_enter+0x0/0xf4 [ 25.737284] c6 754 report_bug+0x114/0x1b8 [ 25.741756] c6 754 bug_handler+0x28/0xa0 [ 25.746146] c6 754 brk_handler+0xac/0x1d0 [ 25.750622] c6 754 do_debug_exception+0x88/0x188 [ 25.755722] c6 754 el1_dbg+0x18/0xa8 [ 25.759757] c6 754 debug_dma_map_sg+0x1e4/0x694 [ 25.764768] c6 754 ion_map_dma_buf+0x318/0x428 [ 25.769693] c6 754 dma_buf_map_attachment+0x68/0xbc [ 25.775063] c6 754 kgsl_setup_dma_buf+0xec/0x3b0 [ 25.780160] c6 754 kgsl_ioctl_gpuobj_import+0x498/0x914 [ 25.785879] c6 754 kgsl_ioctl_helper+0x11c/0x14c [ 25.790983] c6 754 kgsl_ioctl+0x30/0xa8 [ 25.795283] c6 754 do_vfs_ioctl+0x66c/0xa14 [ 25.799941] c6 754 __arm64_sys_ioctl+0x7c/0xb0 [ 25.804865] c6 754 el0_svc_common+0x98/0x1d8 [ 25.809609] c6 754 el0_svc_handler+0x5c/0x64 [ 25.813205] c5 1 F2FS-fs (sda19): Start checkpoint disabled! [ 25.814359] c6 754 el0_svc+0x8/0xc This warning can be fixed by allocating the dma_parms and setting the max_segment_size. Change-Id: I721858eadbe3588b4f5be0a0a73c428869c8e5de Signed-off-by:Harshitha Sai Neelati <hsaine@codeaurora.org> Signed-off-by:
Neeraja P <neerp@codeaurora.org>
Loading
Please register or sign in to comment