[PATCH 1/3] i3c: mipi-i3c-hci: Make bounce buffer code generic to all DMA transfers

Jarkko Nikula jarkko.nikula at linux.intel.com
Thu Jul 31 07:23:03 PDT 2025


Hi Frank

On 6/27/25 5:17 PM, Jarkko Nikula wrote:
> Hi Frank
> 
> On 6/19/25 4:37 PM, Jarkko Nikula wrote:
>> Hi
>>
>> On 6/17/25 6:09 PM, Frank Li wrote:
>>>> Thanks, I finially understand the problem you faced. I think other 
>>>> master
>>>> controller face similar issue if they use dma. Let me think more. If 
>>>> alloc
>>>> buffer size is not align to cache line, swtlib will bounce again.
>>>>
>>>> rough idea i3c core layer provide an i3c_(un)map_api to do that.
>>>
> Unfortunately I run out of time before vacation to have a clean and 
> tested patchset about your idea but wanted to share work in progress 
> diff below. Which is not actually a standalone but goes on top of this 
> patchset.
> 
> I have mixed feeling does this yet bring enough value to the I3C core or 
> does it make sense to wait for another I3C driver using DMA to see 
> better common needs.
> 
> But I'm open for your comments and will continue after vacation :-)
> 
I sent an update where above idea was formed as a proper patch and rest 
of the patches updated accordingly. Diff between the sets below :-)

--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -1786,7 +1786,7 @@ EXPORT_SYMBOL_GPL(i3c_master_dma_map_single);
   * @dev: device object of a device doing DMA
   * @dma_xfer: DMA transfer and mapping descriptor
   *
- * Unmap buffer and cleanup DMA transfer descriptor
+ * Unmap buffer and cleanup DMA transfer descriptor.
   */
  void i3c_master_dma_unmap_single(struct device *dev, struct i3c_dma 
*dma_xfer)
  {




More information about the linux-i3c mailing list