Re: [Intel-gfx] [PATCH 01/19] dma-buf-map: Add read/write helpers

2022-01-27 Thread Lucas De Marchi
On Thu, Jan 27, 2022 at 03:26:43PM +0100, Thomas Zimmermann wrote: Hi Am 26.01.22 um 21:36 schrieb Lucas De Marchi: In certain situations it's useful to be able to read or write to an offset that is calculated by having the memory layout given by a struct declaration. Usually we are going to

Re: [Intel-gfx] [PATCH 01/19] dma-buf-map: Add read/write helpers

2022-01-27 Thread Thomas Zimmermann
Hi Am 26.01.22 um 21:36 schrieb Lucas De Marchi: In certain situations it's useful to be able to read or write to an offset that is calculated by having the memory layout given by a struct declaration. Usually we are going to read/write a u8, u16, u32 or u64. Add a pair of macros

Re: [Intel-gfx] [PATCH 01/19] dma-buf-map: Add read/write helpers

2022-01-27 Thread Daniel Vetter
On Thu, Jan 27, 2022 at 08:59:36AM +0100, Christian König wrote: > Am 27.01.22 um 08:36 schrieb Matthew Brost: > > [SNIP] > > > >/** > > > > * dma_buf_map_memcpy_to - Memcpy into dma-buf mapping > > > > * @dst: The dma-buf mapping structure > > > > @@ -263,4 +304,44 @@ static

Re: [Intel-gfx] [PATCH 01/19] dma-buf-map: Add read/write helpers

2022-01-26 Thread Matthew Brost
On Thu, Jan 27, 2022 at 08:24:04AM +0100, Christian König wrote: > Am 26.01.22 um 21:36 schrieb Lucas De Marchi: > > In certain situations it's useful to be able to read or write to an > > offset that is calculated by having the memory layout given by a struct > > declaration. Usually we are going

[Intel-gfx] [PATCH 01/19] dma-buf-map: Add read/write helpers

2022-01-26 Thread Lucas De Marchi
In certain situations it's useful to be able to read or write to an offset that is calculated by having the memory layout given by a struct declaration. Usually we are going to read/write a u8, u16, u32 or u64. Add a pair of macros dma_buf_map_read_field()/dma_buf_map_write_field() to calculate