Noralf Trønnes
a89bfc5d9a
tinydrm/mipi-dbi: Use dma-safe buffers for all SPI transfers
Buffers passed to spi_sync() must be dma-safe even for tiny buffers since
some SPI controllers use DMA for all transfers.
Example splat with CONFIG_DMA_API_DEBUG enabled:
[ 23.750467] DMA-API: dw_dmac_pci 0000:00:15.0: device driver maps memory from stack [probable addr=000000001e49185d]
[ 23.750529] WARNING: CPU: 1 PID: 1296 at kernel/dma/debug.c:1161 check_for_stack+0xb7/0x190
[ 23.750533] Modules linked in: mmc_block(+) spi_pxa2xx_platform(+) pwm_lpss_pci pwm_lpss spi_pxa2xx_pci sdhci_pci cqhci intel_mrfld_pwrbtn extcon_intel_mrfld sdhci intel_mrfld_adc led_class mmc_core ili9341 mipi_dbi tinydrm backlight ti_ads7950 industrialio_triggered_buffer kfifo_buf intel_soc_pmic_mrfld hci_uart btbcm
[ 23.750599] CPU: 1 PID: 1296 Comm: modprobe Not tainted 5.0.0-rc7+ #236
[ 23.750605] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 542 2015.01.21:18.19.48
[ 23.750620] RIP: 0010:check_for_stack+0xb7/0x190
[ 23.750630] Code: 8b 6d 50 4d 85 ed 75 04 4c 8b 6d 10 48 89 ef e8 2f 8b 44 00 48 89 c6 4a 8d 0c 23 4c 89 ea 48 c7 c7 88 d0 82 b4 e8 40 7c f9 ff <0f> 0b 8b 05 79 00 4b 01 85 c0 74 07 5b 5d 41 5c 41 5d c3 8b 05 54
[ 23.750637] RSP: 0000:ffff97bbc0292fa0 EFLAGS: 00010286
[ 23.750646] RAX: 0000000000000000 RBX: ffff97bbc0290000 RCX: 0000000000000006
[ 23.750652] RDX: 0000000000000007 RSI: 0000000000000002 RDI: ffff94b33e115450
[ 23.750658] RBP: ffff94b33c8578b0 R08: 0000000000000002 R09: 00000000000201c0
[ 23.750664] R10: 00000006ecb0ccc6 R11: 0000000000034f38 R12: 000000000000316c
[ 23.750670] R13: ffff94b33c84b250 R14: ffff94b33dedd5a0 R15: 0000000000000001
[ 23.750679] FS: 0000000000000000(0000) GS:ffff94b33e100000(0063) knlGS:00000000f7faf690
[ 23.750686] CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033
[ 23.750691] CR2: 00000000f7f54faf CR3: 000000000722c000 CR4: 00000000001006e0
[ 23.750696] Call Trace:
[ 23.750713] debug_dma_map_sg+0x100/0x340
[ 23.750727] ? dma_direct_map_sg+0x3b/0xb0
[ 23.750739] spi_map_buf+0x25a/0x300
[ 23.750751] __spi_pump_messages+0x2a4/0x680
[ 23.750762] __spi_sync+0x1dd/0x1f0
[ 23.750773] spi_sync+0x26/0x40
[ 23.750790] mipi_dbi_typec3_command_read+0x14d/0x240 [mipi_dbi]
[ 23.750802] ? spi_finalize_current_transfer+0x10/0x10
[ 23.750821] mipi_dbi_typec3_command+0x1bc/0x1d0 [mipi_dbi]
Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190222124329.23046-1-noralf@tronnes.org
2019-03-20 12:02:41 +01:00
..
2019-02-01 13:15:07 +01:00
2017-11-02 11:10:55 +01:00
2019-03-20 12:02:41 +01:00
2019-02-11 10:35:35 +01:00
2018-09-14 09:38:03 -05:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-11-30 16:37:52 +01:00
2018-11-30 16:37:52 +01:00
2018-09-09 14:19:18 +02:00
2019-02-05 18:19:00 -05:00
2018-07-17 22:25:48 +02:00
2017-10-25 16:31:29 +10:00
2018-08-24 17:31:37 +01:00
2019-01-14 03:51:14 +02:00
2019-02-20 13:29:29 +01:00
2019-02-04 10:21:17 +01:00
2019-01-29 23:26:12 +02:00
2019-02-19 18:50:55 +01:00
2019-01-24 13:20:42 +01:00
2019-02-28 14:39:09 +01:00
2019-01-17 10:56:54 +01:00
2018-07-06 14:57:03 +02:00
2017-03-24 09:36:06 +01:00
2019-01-14 21:23:55 +02:00
2016-05-23 11:35:31 +10:00
2016-10-19 18:20:40 +03:00
2019-02-20 12:16:37 +10:00
2019-02-18 13:27:15 +10:00
2019-03-06 09:22:18 -05:00
2019-03-05 13:24:34 -05:00
2019-02-19 18:51:12 +01:00
2019-01-09 22:35:35 +01:00
2018-09-09 14:18:11 +02:00
2019-01-17 10:56:38 +01:00
2018-09-07 22:07:49 +02:00
2019-01-02 11:37:56 +02:00
2016-02-05 15:23:48 +10:00
2017-01-25 16:18:57 +01:00
2019-01-18 19:00:18 +01:00
2019-01-09 22:11:28 +01:00
2019-01-09 22:54:08 +01:00
2019-01-17 10:56:45 +01:00
2019-03-14 12:06:44 -07:00
2019-03-14 09:22:57 -07:00
2017-03-24 09:36:06 +01:00
2019-01-02 11:38:01 +02:00
2018-05-03 21:26:32 +02:00
2017-06-01 08:02:14 +02:00
2017-10-25 16:31:30 +10:00
2019-01-02 11:37:11 +02:00
2018-10-24 16:26:35 +02:00
2018-05-24 15:04:30 +01:00
2019-02-04 10:21:17 +01:00
2018-03-19 09:09:46 -04:00
2019-02-21 12:13:42 +01:00
2019-02-04 10:21:17 +01:00
2019-02-07 21:48:34 +01:00
2019-02-04 10:21:17 +01:00
2018-06-27 21:44:04 +02:00
2017-11-02 11:10:55 +01:00
2018-10-04 11:03:34 +10:00
2018-07-05 16:40:00 -05:00
2018-10-15 16:16:12 -05:00
2018-10-05 22:45:19 +02:00
2018-12-05 10:00:36 +01:00
2018-11-20 14:54:53 +01:00
2018-08-27 10:00:03 -04:00
2019-01-24 13:20:42 +01:00
2018-10-03 13:05:12 -07:00
2019-02-07 13:14:06 +02:00
2017-07-31 14:24:14 +02:00
2018-04-24 13:57:22 +02:00
2019-01-08 10:50:22 +02:00
2017-11-02 11:10:55 +01:00
2019-01-21 10:30:12 +01:00
2019-03-07 12:00:30 -06:00
2019-01-14 21:23:55 +02:00
2018-07-13 16:14:04 +01:00
2018-07-07 07:51:19 +02:00
2019-01-14 10:58:37 +01:00
2019-01-25 16:15:36 -05:00
2019-02-08 16:58:59 +01:00
2018-07-10 16:28:47 -07:00
2019-01-31 08:53:59 -08:00
2017-05-03 16:24:00 +03:00
2019-01-02 11:37:47 +02:00
2017-12-07 11:51:56 -05:00