Re: [PATCH] drm/vmwgfx: Fix scatterlist unmapping

2018-04-30 Thread Robin Murphy
On 27/04/18 18:39, Thomas Hellstrom wrote: On 04/27/2018 06:56 PM, Robin Murphy wrote: Hi Thomas, On 25/04/18 14:21, Thomas Hellstrom wrote: Hi, Robin, Thanks for the patch. It was some time since I put together that code, but I remember hitting something similar to

Re: [PATCH] drm/vmwgfx: Fix scatterlist unmapping

2018-04-30 Thread Robin Murphy
On 27/04/18 18:39, Thomas Hellstrom wrote: On 04/27/2018 06:56 PM, Robin Murphy wrote: Hi Thomas, On 25/04/18 14:21, Thomas Hellstrom wrote: Hi, Robin, Thanks for the patch. It was some time since I put together that code, but I remember hitting something similar to

Re: [PATCH] drm/vmwgfx: Fix scatterlist unmapping

2018-04-27 Thread Thomas Hellstrom
On 04/27/2018 06:56 PM, Robin Murphy wrote: Hi Thomas, On 25/04/18 14:21, Thomas Hellstrom wrote: Hi, Robin, Thanks for the patch. It was some time since I put together that code, but I remember hitting something similar to

Re: [PATCH] drm/vmwgfx: Fix scatterlist unmapping

2018-04-27 Thread Thomas Hellstrom
On 04/27/2018 06:56 PM, Robin Murphy wrote: Hi Thomas, On 25/04/18 14:21, Thomas Hellstrom wrote: Hi, Robin, Thanks for the patch. It was some time since I put together that code, but I remember hitting something similar to

Re: [PATCH] drm/vmwgfx: Fix scatterlist unmapping

2018-04-27 Thread Robin Murphy
Hi Thomas, On 25/04/18 14:21, Thomas Hellstrom wrote: Hi, Robin, Thanks for the patch. It was some time since I put together that code, but I remember hitting something similar to https://www.linuxquestions.org/questions/linux-kernel-70/%27nents%27-argument-of-dma_unmap_sg-4175621964/

Re: [PATCH] drm/vmwgfx: Fix scatterlist unmapping

2018-04-27 Thread Robin Murphy
Hi Thomas, On 25/04/18 14:21, Thomas Hellstrom wrote: Hi, Robin, Thanks for the patch. It was some time since I put together that code, but I remember hitting something similar to https://www.linuxquestions.org/questions/linux-kernel-70/%27nents%27-argument-of-dma_unmap_sg-4175621964/

Re: [PATCH] drm/vmwgfx: Fix scatterlist unmapping

2018-04-25 Thread Thomas Hellstrom
Hi, Robin, Thanks for the patch. It was some time since I put together that code, but I remember hitting something similar to https://www.linuxquestions.org/questions/linux-kernel-70/%27nents%27-argument-of-dma_unmap_sg-4175621964/ Even if it's clear from the documentation that orig_nents

Re: [PATCH] drm/vmwgfx: Fix scatterlist unmapping

2018-04-25 Thread Thomas Hellstrom
Hi, Robin, Thanks for the patch. It was some time since I put together that code, but I remember hitting something similar to https://www.linuxquestions.org/questions/linux-kernel-70/%27nents%27-argument-of-dma_unmap_sg-4175621964/ Even if it's clear from the documentation that orig_nents

[PATCH] drm/vmwgfx: Fix scatterlist unmapping

2018-04-13 Thread Robin Murphy
dma_unmap_sg() should be called with the same number of entries originally passed to dma_map_sg(), not the number it returned, which may be fewer. Admittedly this driver probably never runs on non-coherent architectures where getting that wrong could lead to data loss, but it's always good to be

[PATCH] drm/vmwgfx: Fix scatterlist unmapping

2018-04-13 Thread Robin Murphy
dma_unmap_sg() should be called with the same number of entries originally passed to dma_map_sg(), not the number it returned, which may be fewer. Admittedly this driver probably never runs on non-coherent architectures where getting that wrong could lead to data loss, but it's always good to be