Re: Using MMAP calls on a video capture device having underlying NOMMU arch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
> Now, I see that the requested videobuffers are correctly allocated via 'vb2_dma_contig_alloc'
> call (see [3] for reference). But the MMAP call fails in 'vb2_dma_contig_alloc' function
> in mm/nommu.c (see [4] for reference) when it tries to make the following check:
>
>         if (addr != (pfn << PAGE_SHIFT))
>                 return -EINVAL;
>
> I address Scott also, as I see that he has worked on the Blackfin v4l2 capture driver using
> DMA contiguous method and may have seen this issue (on a NOMMU system) with a v4l2 application
> performing a MMAP operation.
>
> Any comments on what I could be doing wrong here?
>

int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr,
                unsigned long pfn, unsigned long size, pgprot_t prot)
{
        if ((addr & PAGE_MASK) != (pfn << PAGE_SHIFT))
                return -EINVAL;

        vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP;
        return 0;
}

This patch seems not in current kernel. Hope it can resolve your problem.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux