From: Mauro Carvalho Chehab <mchehab@infradead.org>
To: jon.dufresne@infinitevideocorporation.com
Cc: video4linux-list@redhat.com
Subject: Re: Writing first v4l2 driver
Date: Fri, 6 Jun 2008 12:30:16 -0300 [thread overview]
Message-ID: <20080606123016.681e24e8@gaivota> (raw)
In-Reply-To: <1212762592.16563.54.camel@localhost.localdomain>
On Fri, 06 Jun 2008 10:29:52 -0400
Jon Dufresne <jon.dufresne@infinitevideocorporation.com> wrote:
>
> On Thu, 2008-06-05 at 18:07 -0300, Mauro Carvalho Chehab wrote:
> > Does your device support DMA scatter/gather mode (e.g. instead of a continuous
> > DMA memory, you would be using a range of non-continuous memory areas)? If not,
> > then you'll need to write a different video-buf driver.
>
> I am writing code for both sides, the DSP on the PCI board and the
> driver in the linux kernel. The dsp has functionality to write data over
> the PCI bus, and I could certainly code this to work in discontinuous
> chunks. So I believe it could use sg lists.
This is the better solution, if you can work on both sides. Continuous stream
buffer for video is generally very large, and may lead into some troubles if
the memory is too fragmented before you allocate such memory (the drivers that
work with non sg DMA returns -ENOMEM if you don't have a continuous block with
enough size to allocate the buffer).
> > The simplest driver is vivi.c. Yet, it uses videobuf-vmalloc, which is a little
> > bit different. However, since this is a fake device, it helps to understand how
> > videobuf works. If you get into vivi.c previous versions, at mercurial repo,
> > you'll find even a vivi example using the video-buf-dma-sg. Most of stuff
> > will be similar.
> >
> > The other two examples for PCI devices are saa7134-video and cx88-video. bttv
> > also uses it, but bttv driver is more complex to understand, since its code is
> > bigger.
>
> Thanks for pointing these devices out. I will study these and see how
> things turn out.
Anytime.
Cheers,
Mauro
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
next prev parent reply other threads:[~2008-06-06 15:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-05 14:26 Writing first v4l2 driver Jon Dufresne
2008-06-05 21:07 ` Mauro Carvalho Chehab
2008-06-06 14:29 ` Jon Dufresne
2008-06-06 15:30 ` Mauro Carvalho Chehab [this message]
2008-06-19 13:51 ` Jon Dufresne
[not found] <20080605160010.BB443619D1A@hormel.redhat.com>
2008-06-05 22:49 ` Fritz Katz
-- strict thread matches above, loose matches on Subject: below --
2008-06-09 9:00 Ramatou sori
2008-06-09 16:20 Ramatou sori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080606123016.681e24e8@gaivota \
--to=mchehab@infradead.org \
--cc=jon.dufresne@infinitevideocorporation.com \
--cc=video4linux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.