Re: [PATCH] i2c: i2c-qcom-geni: Properly handle DMA safe buffers

2018-09-19 Thread Stephen Boyd
Quoting Wolfram Sang (2018-09-19 13:45:28) > > > But now when I try to use it I'm not exicted when the buffer is bounced > > but we fail to map the buffer with the DMA APIs. For an I2C_M_RD > > Yes, this was reported before and the function to unmap looks different > now as of v4.19-rc2... > > >

Re: [PATCH] i2c: i2c-qcom-geni: Properly handle DMA safe buffers

2018-09-19 Thread Wolfram Sang
> But now when I try to use it I'm not exicted when the buffer is bounced > but we fail to map the buffer with the DMA APIs. For an I2C_M_RD Yes, this was reported before and the function to unmap looks different now as of v4.19-rc2... > the buffer that we setup. Or we can pass an argument to >

Re: [PATCH] i2c: i2c-qcom-geni: Properly handle DMA safe buffers

2018-09-19 Thread Stephen Boyd
Quoting Wolfram Sang (2018-09-18 15:16:46) > > > This fixes a problem where the kernel oopses cleaning pages for a buffer > > that's mapped into the vmalloc space. The pages are returned from > > request_firmware() and passed down directly to the i2c master to write > > to the i2c touchscreen devi

Re: [PATCH] i2c: i2c-qcom-geni: Properly handle DMA safe buffers

2018-09-18 Thread Wolfram Sang
> This fixes a problem where the kernel oopses cleaning pages for a buffer > that's mapped into the vmalloc space. The pages are returned from > request_firmware() and passed down directly to the i2c master to write > to the i2c touchscreen device. Mapping vmalloc buffers with > dma_map_single() w

[PATCH] i2c: i2c-qcom-geni: Properly handle DMA safe buffers

2018-09-18 Thread Stephen Boyd
We shouldn't attempt to DMA map the message buffers passed into this driver from the i2c core unless the message we're mapping have been properly setup for DMA. The i2c core indicates such a situation by setting the I2C_M_DMA_SAFE flag, so check for that flag before using DMA mode. This fixes a pr