Re: [PATCH v2] drm/prime: fix extracting of the DMA addresses from a scatterlist

2020-04-05 Thread Greg KH
On Sun, Apr 05, 2020 at 10:47:49AM -0400, Alex Deucher wrote: > On Fri, Mar 27, 2020 at 12:23 PM Marek Szyprowski > wrote: > > > > Scatterlist elements contains both pages and DMA addresses, but one > > should not assume 1:1 relation between them. The sg->length is the size > > of the physical mem

Re: [PATCH v2] drm/prime: fix extracting of the DMA addresses from a scatterlist

2020-04-05 Thread Alex Deucher
On Fri, Mar 27, 2020 at 12:23 PM Marek Szyprowski wrote: > > Scatterlist elements contains both pages and DMA addresses, but one > should not assume 1:1 relation between them. The sg->length is the size > of the physical memory chunk described by the sg->page, while > sg_dma_len(sg) is the size of

RE: [PATCH v2] drm/prime: fix extracting of the DMA addresses from a scatterlist

2020-03-30 Thread Ruhl, Michael J
; David Airlie >; Shane Francis ; >sta...@vger.kernel.org; Thomas Zimmermann ; >Alex Deucher >Subject: Re: [PATCH v2] drm/prime: fix extracting of the DMA addresses from >a scatterlist > >Hi Michael, > >> Is there an example of what the scatterlist would look like in t

Re: [PATCH v2] drm/prime: fix extracting of the DMA addresses from a scatterlist

2020-03-30 Thread Robin Murphy
Cc: Marek Szyprowski ; sta...@vger.kernel.org; Bartlomiej Zolnierkiewicz ; Maarten Lankhorst ; Maxime Ripard ; Thomas Zimmermann ; David Airlie ; Daniel Vetter ; Alex Deucher ; Shane Francis ; Ruhl, Michael J Subject: [PATCH v2] drm/prime: fix extracting of the DMA addresses from a scatterlist

Re: [PATCH v2] drm/prime: fix extracting of the DMA addresses from a scatterlist

2020-03-29 Thread Marek Szyprowski
t;> Cc: Marek Szyprowski ; >> sta...@vger.kernel.org; Bartlomiej Zolnierkiewicz >> ; Maarten Lankhorst >> ; Maxime Ripard >> ; Thomas Zimmermann ; >> David Airlie ; Daniel Vetter ; Alex >> Deucher >> ; Shane Francis ; >> Ruhl, Michael J >>

Re: [PATCH v2] drm/prime: fix extracting of the DMA addresses from a scatterlist

2020-03-28 Thread Shane Francis
On Fri, Mar 27, 2020 at 6:31 PM Ruhl, Michael J wrote: > Is there an example of what the scatterlist would look like in this case? > > Does each SG entry always have the page and dma info? or could you have > entries that have page information only, and entries that have dma info only? > > If the

Re: [PATCH v2] drm/prime: fix extracting of the DMA addresses from a scatterlist

2020-03-28 Thread Greg KH
On Fri, Mar 27, 2020 at 05:21:26PM +0100, Marek Szyprowski wrote: > Scatterlist elements contains both pages and DMA addresses, but one > should not assume 1:1 relation between them. The sg->length is the size > of the physical memory chunk described by the sg->page, while > sg_dma_len(sg) is the s

RE: [PATCH v2] drm/prime: fix extracting of the DMA addresses from a scatterlist

2020-03-27 Thread Ruhl, Michael J
>; Maarten Lankhorst >; Maxime Ripard >; Thomas Zimmermann ; >David Airlie ; Daniel Vetter ; Alex Deucher >; Shane Francis ; >Ruhl, Michael J >Subject: [PATCH v2] drm/prime: fix extracting of the DMA addresses from a >scatterlist > >Scatterlist elements contains both page

[PATCH v2] drm/prime: fix extracting of the DMA addresses from a scatterlist

2020-03-27 Thread Marek Szyprowski
Scatterlist elements contains both pages and DMA addresses, but one should not assume 1:1 relation between them. The sg->length is the size of the physical memory chunk described by the sg->page, while sg_dma_len(sg) is the size of the DMA (IO virtual) chunk described by the sg_dma_address(sg). Th