linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PCIe sg dma device used as dma-contig
@ 2015-12-27 15:31 Ran Shalit
  2016-01-11 10:32 ` Hans Verkuil
  0 siblings, 1 reply; 3+ messages in thread
From: Ran Shalit @ 2015-12-27 15:31 UTC (permalink / raw)
  To: linux-media

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"
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PCIe sg dma device used as dma-contig
  2015-12-27 15:31 PCIe sg dma device used as dma-contig Ran Shalit
@ 2016-01-11 10:32 ` Hans Verkuil
  2016-01-11 11:09   ` Ran Shalit
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Verkuil @ 2016-01-11 10:32 UTC (permalink / raw)
  To: Ran Shalit, linux-media

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.

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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PCIe sg dma device used as dma-contig
  2016-01-11 10:32 ` Hans Verkuil
@ 2016-01-11 11:09   ` Ran Shalit
  0 siblings, 0 replies; 3+ messages in thread
From: Ran Shalit @ 2016-01-11 11:09 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: linux-media

On Mon, Jan 11, 2016 at 12:32 PM, Hans Verkuil <hverkuil@xs4all.nl> 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@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-11 11:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-27 15:31 PCIe sg dma device used as dma-contig Ran Shalit
2016-01-11 10:32 ` Hans Verkuil
2016-01-11 11:09   ` Ran Shalit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).