linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Florian Echtler <floe@butterbrot.org>,
	linux-input@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: [PATCH] add raw video support for Samsung SUR40 touchscreen
Date: Wed, 04 Feb 2015 15:51:39 +0200	[thread overview]
Message-ID: <6748039.PVCT6ajhMk@avalon> (raw)
In-Reply-To: <54D204F2.3040006@xs4all.nl>

Hi Hans,

On Wednesday 04 February 2015 12:39:30 Hans Verkuil wrote:
> On 02/04/15 12:34, Laurent Pinchart wrote:
> > On Wednesday 04 February 2015 11:56:58 Florian Echtler wrote:
> >> On 04.02.2015 11:22, Hans Verkuil wrote:
> >>> On 02/04/15 11:08, Florian Echtler wrote:
> >>>> On 04.02.2015 09:08, Hans Verkuil wrote:
> >>>>> You can also make a version with vmalloc and I'll merge that, and then
> >>>>> you can look more into the DMA issues. That way the driver is merged,
> >>>>> even if it is perhaps not yet optimal, and you can address that part
> >>>>> later.
> >>>> 
> >>>> OK, that sounds sensible, I will try that route. When using
> >>>> videobuf2-vmalloc, what do I pass back for alloc_ctxs in queue_setup?
> >>> 
> >>> vmalloc doesn't need those, so you can just drop any alloc_ctx related
> >>> code.
> >> 
> >> That's what I assumed, however, I'm running into the same problem as
> >> with dma-sg when I switch to vmalloc...?
> > 
> > I don't expect vmalloc to work, as you can't DMA to vmalloc memory
> > directly without any IOMMU in the general case (the allocated memory being
> > physically fragmented).
> > 
> > dma-sg should work though, but you won't be able to use usb_bulk_msg().
> > You need to create the URBs manually, set their sg and num_sgs fields and
> > submit them.
> 
> So it works for other usb media drivers because they allocate memory
> using kmalloc (and presumably the usb core can DMA to that), and then memcpy
> it to the vmalloc-ed buffers?

Correct. In the uvcvideo case that's unavoidable as headers need to be removed 
from the packets.

> Anyway Florian, based on Laurent's explanation I think trying to make
> dma-sg work seems to be the best solution. And I've learned something
> new :-)

-- 
Regards,

Laurent Pinchart


      parent reply	other threads:[~2015-02-04 13:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-07 10:35 [PATCH] add raw video support for Samsung SUR40 touchscreen Florian Echtler
2015-01-19 10:38 ` Hans Verkuil
2015-01-20  9:24   ` Florian Echtler
2015-01-20  9:30     ` Hans Verkuil
2015-01-20 12:59       ` Laurent Pinchart
2015-01-20 13:03         ` Hans Verkuil
2015-01-20 13:06           ` Laurent Pinchart
2015-01-21 13:28             ` Florian Echtler
2015-01-21 13:29               ` Hans Verkuil
2015-01-29 21:35                 ` Florian Echtler
2015-02-03 20:45                   ` Florian Echtler
2015-02-04  8:08                     ` Hans Verkuil
2015-02-04 10:08                       ` Florian Echtler
2015-02-04 10:22                         ` Hans Verkuil
2015-02-04 10:56                           ` Florian Echtler
2015-02-04 11:34                             ` Laurent Pinchart
2015-02-04 11:39                               ` Hans Verkuil
2015-02-04 13:21                                 ` Florian Echtler
2015-02-04 14:06                                   ` Laurent Pinchart
2015-02-04 13:51                                 ` Laurent Pinchart [this message]

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=6748039.PVCT6ajhMk@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=floe@butterbrot.org \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    /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 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).