Re: [PATCH v2 -resend#1 1/1] V4L: videobuf, don't use dma addr as physical

2011-03-21 Thread Mauro Carvalho Chehab
Em 28-02-2011 15:20, Mauro Carvalho Chehab escreveu: Em 28-02-2011 12:47, Jiri Slaby escreveu: On 02/28/2011 03:53 PM, Konrad Rzeszutek Wilk wrote: On Mon, Feb 28, 2011 at 10:37:02AM +0100, Jiri Slaby wrote: mem-dma_handle is a dma address obtained by dma_alloc_coherent which needn't be a

Re: [PATCH v2 -resend#1 1/1] V4L: videobuf, don't use dma addr as physical

2011-03-21 Thread Jiri Slaby
On 03/21/2011 11:43 PM, Mauro Carvalho Chehab wrote: As I got no return, and the patch looked sane, I've reviewed the comment myself, Aha, I forgot to send it. Sorry. It looks OK. Author: Jiri Slaby jsl...@suse.cz Date: Mon Feb 28 06:37:02 2011 -0300 [media] V4L: videobuf, don't

[PATCH v2 -resend#1 1/1] V4L: videobuf, don't use dma addr as physical

2011-02-28 Thread Jiri Slaby
mem-dma_handle is a dma address obtained by dma_alloc_coherent which needn't be a physical address in presence of IOMMU. So ensure we are remapping (remap_pfn_range) the right page in __videobuf_mmap_mapper by using virt_to_phys(mem-vaddr) and not mem-dma_handle. While at it, use PFN_DOWN instead

Re: [PATCH v2 -resend#1 1/1] V4L: videobuf, don't use dma addr as physical

2011-02-28 Thread Laurent Pinchart
Hi Jiri, On Monday 28 February 2011 10:37:02 Jiri Slaby wrote: mem-dma_handle is a dma address obtained by dma_alloc_coherent which needn't be a physical address in presence of IOMMU. So ensure we are remapping (remap_pfn_range) the right page in __videobuf_mmap_mapper by using

Re: [PATCH v2 -resend#1 1/1] V4L: videobuf, don't use dma addr as physical

2011-02-28 Thread Jiri Slaby
On 02/28/2011 11:53 AM, Laurent Pinchart wrote: On Monday 28 February 2011 10:37:02 Jiri Slaby wrote: mem-dma_handle is a dma address obtained by dma_alloc_coherent which needn't be a physical address in presence of IOMMU. So ensure we are remapping (remap_pfn_range) the right page in

Re: [PATCH v2 -resend#1 1/1] V4L: videobuf, don't use dma addr as physical

2011-02-28 Thread Laurent Pinchart
Hi Jiri, On Monday 28 February 2011 16:07:43 Jiri Slaby wrote: On 02/28/2011 11:53 AM, Laurent Pinchart wrote: On Monday 28 February 2011 10:37:02 Jiri Slaby wrote: mem-dma_handle is a dma address obtained by dma_alloc_coherent which needn't be a physical address in presence of IOMMU. So

Re: [PATCH v2 -resend#1 1/1] V4L: videobuf, don't use dma addr as physical

2011-02-28 Thread Konrad Rzeszutek Wilk
On Mon, Feb 28, 2011 at 10:37:02AM +0100, Jiri Slaby wrote: mem-dma_handle is a dma address obtained by dma_alloc_coherent which needn't be a physical address in presence of IOMMU. So ensure we are Can you add a comment why you are fixing it? Is there a bug report for this? Under what

Re: [PATCH v2 -resend#1 1/1] V4L: videobuf, don't use dma addr as physical

2011-02-28 Thread Jiri Slaby
On 02/28/2011 04:14 PM, Laurent Pinchart wrote: Hi Jiri, On Monday 28 February 2011 16:07:43 Jiri Slaby wrote: On 02/28/2011 11:53 AM, Laurent Pinchart wrote: On Monday 28 February 2011 10:37:02 Jiri Slaby wrote: mem-dma_handle is a dma address obtained by dma_alloc_coherent which needn't

Re: [PATCH v2 -resend#1 1/1] V4L: videobuf, don't use dma addr as physical

2011-02-28 Thread Jiri Slaby
On 02/28/2011 03:53 PM, Konrad Rzeszutek Wilk wrote: On Mon, Feb 28, 2011 at 10:37:02AM +0100, Jiri Slaby wrote: mem-dma_handle is a dma address obtained by dma_alloc_coherent which needn't be a physical address in presence of IOMMU. So ensure we are Can you add a comment why you are fixing

Re: [PATCH v2 -resend#1 1/1] V4L: videobuf, don't use dma addr as physical

2011-02-28 Thread Mauro Carvalho Chehab
Em 28-02-2011 12:47, Jiri Slaby escreveu: On 02/28/2011 03:53 PM, Konrad Rzeszutek Wilk wrote: On Mon, Feb 28, 2011 at 10:37:02AM +0100, Jiri Slaby wrote: mem-dma_handle is a dma address obtained by dma_alloc_coherent which needn't be a physical address in presence of IOMMU. So ensure we are