Re: PCIe sg dma device used as dma-contig

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

 



On Mon, Jan 11, 2016 at 12:32 PM, Hans Verkuil <hverkuil@xxxxxxxxx> wrote:
> On 12/27/2015 04:31 PM, Ran Shalit wrote:
>> Hello,
>>
>> The following question is not totally in the scope of v4l2, but more
>> about your advise concering dma alternatives for non-expreciened v4l2
>> device writer.
>> We intend to use the fpga for concurrent 3xHD and 3xSD.
>>
>> We have some dillema regadring the fpga to choose from:
>> ALTERA fpga which use contiguous dma memory, or Xilinx fpga which is
>> using scatter-gather architecture.
>>
>> With xilinx, it seems that the sg architecture can also be used as
>> contiguous according to the following:
>> "... While these descriptors are not required to be contiguous, they
>> should be contained within an 8 megabyte region which corresponds to
>> the width of the AXI_PCIe_SG port"
>
> I think they are talking about the memory containing the descriptors
> themselves. I.e. the scatter-gather list should be in contiguous memory
> that is no more than 8 megabytes long.
>
> This is normally not a problem.
>
> I don't think they are talking about the DMA itself, that should be
> pretty much unlimited.

Hi,
I've made simple kernel testing on my x86_64 platform, with using
    dma_alloc_coherent(NULL, (1024*1024*4), &dma_addr, GFP_KERNEL);
I can allocate easily 6 contiguous 4MB with the above.
As you said, there is probably no problem with 4MB  for video capture,
(16 bit representation of 1920x1080 gives: 1920x1080x2 <4MB),
I probably don't need to use CMA too.

Thank you,
Ran




>
> Regards,
>
>         Hans
>
>> it seems according to the above description that sg-list can be used
>> as single contiguous descriptor (with dma-cotig), though the 8MBytes
>> seems like a problematic constrain. This constrain make it difficult
>> to be used with dma-contig solution in v4l2.
>>
>> Our current direction is try to imeplement it as simple as possible.
>> Therefore we prefer the dma contiguous solution (I think that together
>> with CMA and a strong cpu like 64-bit i7 it can handle contigious
>> memory for 3xHD and 3xSD allocation).
>>
>> Any feedback is appreciated,
>> Ran
>> --
>> 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
>>
>
--
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