Re: [RESEND PATCH] media: vb2: Fix vb2_dc_prepare do not correct sync data to device

2015-09-23 Thread Sakari Ailus
Hi Hans, On Wed, Sep 23, 2015 at 10:40:56AM +0200, Hans Verkuil wrote: > Resent, hopefully without html this time. > > On September 22, 2015 11:10:15 PM GMT+02:00, Sakari Ailus > wrote: > >Hi Tiffany, > > > >(Robin and Hans cc'd.) > > > >On Mon, Sep 21, 2015 at 08:26:11PM +0800, Tiffany Lin wro

Re: [RESEND PATCH] media: vb2: Fix vb2_dc_prepare do not correct sync data to device

2015-09-23 Thread Hans Verkuil
Resent, hopefully without html this time. On September 22, 2015 11:10:15 PM GMT+02:00, Sakari Ailus wrote: >Hi Tiffany, > >(Robin and Hans cc'd.) > >On Mon, Sep 21, 2015 at 08:26:11PM +0800, Tiffany Lin wrote: >> vb2_dc_prepare use the number of SG entries dma_map_sg_attrs return. >> But in dma_

Re: [RESEND PATCH] media: vb2: Fix vb2_dc_prepare do not correct sync data to device

2015-09-22 Thread Daniel Kurtz
Hi Sakari, On Wed, Sep 23, 2015 at 4:37 AM, Sakari Ailus wrote: > Hi Robin, > > On Tue, Sep 22, 2015 at 04:37:17PM +0100, Robin Murphy wrote: >> Hi Hans, >> >> On 21/09/15 14:13, Hans Verkuil wrote: >> >Hi Tiffany! >> > >> >On 21-09-15 14:26, Tiffany Lin wrote: >> >>vb2_dc_prepare use the number

Re: [RESEND PATCH] media: vb2: Fix vb2_dc_prepare do not correct sync data to device

2015-09-22 Thread Sakari Ailus
Hi Tiffany, (Robin and Hans cc'd.) On Mon, Sep 21, 2015 at 08:26:11PM +0800, Tiffany Lin wrote: > vb2_dc_prepare use the number of SG entries dma_map_sg_attrs return. > But in dma_sync_sg_for_device, it use lengths of each SG entries > before dma_map_sg_attrs. dma_map_sg_attrs will concatenate >

Re: [RESEND PATCH] media: vb2: Fix vb2_dc_prepare do not correct sync data to device

2015-09-22 Thread Sakari Ailus
Hi Robin, On Tue, Sep 22, 2015 at 04:37:17PM +0100, Robin Murphy wrote: > Hi Hans, > > On 21/09/15 14:13, Hans Verkuil wrote: > >Hi Tiffany! > > > >On 21-09-15 14:26, Tiffany Lin wrote: > >>vb2_dc_prepare use the number of SG entries dma_map_sg_attrs return. > >>But in dma_sync_sg_for_device, it

Re: [RESEND PATCH] media: vb2: Fix vb2_dc_prepare do not correct sync data to device

2015-09-22 Thread Robin Murphy
Hi Hans, On 21/09/15 14:13, Hans Verkuil wrote: Hi Tiffany! On 21-09-15 14:26, Tiffany Lin wrote: vb2_dc_prepare use the number of SG entries dma_map_sg_attrs return. But in dma_sync_sg_for_device, it use lengths of each SG entries before dma_map_sg_attrs. dma_map_sg_attrs will concatenate SGs

Re: [RESEND PATCH] media: vb2: Fix vb2_dc_prepare do not correct sync data to device

2015-09-22 Thread tiffany lin
Hi Sakari, On Tue, 2015-09-22 at 15:07 +0300, Sakari Ailus wrote: > Hi Tiffany, > > On Tue, Sep 22, 2015 at 06:19:25PM +0800, tiffany lin wrote: > > Hi Hans, > > > > On Mon, 2015-09-21 at 15:13 +0200, Hans Verkuil wrote: > > > Hi Tiffany! > > > > > > On 21-09-15 14:26, Tiffany Lin wrote: > > >

Re: [RESEND PATCH] media: vb2: Fix vb2_dc_prepare do not correct sync data to device

2015-09-22 Thread Sakari Ailus
Hi Tiffany, On Tue, Sep 22, 2015 at 06:19:25PM +0800, tiffany lin wrote: > Hi Hans, > > On Mon, 2015-09-21 at 15:13 +0200, Hans Verkuil wrote: > > Hi Tiffany! > > > > On 21-09-15 14:26, Tiffany Lin wrote: > > > vb2_dc_prepare use the number of SG entries dma_map_sg_attrs return. > > > But in dma

Re: [RESEND PATCH] media: vb2: Fix vb2_dc_prepare do not correct sync data to device

2015-09-22 Thread tiffany lin
Hi Hans, On Mon, 2015-09-21 at 15:13 +0200, Hans Verkuil wrote: > Hi Tiffany! > > On 21-09-15 14:26, Tiffany Lin wrote: > > vb2_dc_prepare use the number of SG entries dma_map_sg_attrs return. > > But in dma_sync_sg_for_device, it use lengths of each SG entries > > before dma_map_sg_attrs. dma_ma

Re: [RESEND PATCH] media: vb2: Fix vb2_dc_prepare do not correct sync data to device

2015-09-21 Thread Hans Verkuil
Hi Tiffany! On 21-09-15 14:26, Tiffany Lin wrote: > vb2_dc_prepare use the number of SG entries dma_map_sg_attrs return. > But in dma_sync_sg_for_device, it use lengths of each SG entries > before dma_map_sg_attrs. dma_map_sg_attrs will concatenate > SGs until dma length > dma seg bundary. sgt->ne

[RESEND PATCH] media: vb2: Fix vb2_dc_prepare do not correct sync data to device

2015-09-21 Thread Tiffany Lin
vb2_dc_prepare use the number of SG entries dma_map_sg_attrs return. But in dma_sync_sg_for_device, it use lengths of each SG entries before dma_map_sg_attrs. dma_map_sg_attrs will concatenate SGs until dma length > dma seg bundary. sgt->nents will less than sgt->orig_nents. Using SG entries after