From: Hans Verkuil <hverkuil@xs4all.nl>
To: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
Cc: Linux Media <linux-media@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kernel-mentors@selenic.com" <kernel-mentors@selenic.com>,
devel@driverdev.osuosl.org,
kernel-janitors <kernel-janitors@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andrey Utkin <andrey.od.utkin@gmail.com>
Subject: Re: [RFC PATCH v0] Add tw5864 driver
Date: Mon, 08 Feb 2016 10:29:14 +0000 [thread overview]
Message-ID: <56B86DFA.6090600@xs4all.nl> (raw)
In-Reply-To: <CAM_ZknVjRo0vo2_SLmZSW7R_8LpNkmj-c3q1uBahEa_bSBK0hQ@mail.gmail.com>
On 02/08/2016 11:23 AM, Andrey Utkin wrote:
> On Mon, Feb 8, 2016 at 11:58 AM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
>> Hi Andrey,
>>
>> Hmm, it looks like I forgot to reply. Sorry about that.
>
> Thank you very much anyway.
>
>> I wouldn't change the memcpy: in my experience it is very useful to get a
>> well-formed compressed stream out of the hardware. And the overhead of
>> having to do a memcpy is a small price to pay and on modern CPUs should
>> be barely noticeable for SDTV inputs.
>
> So there's no usecase for scatter-gather approach, right?
The only advantage scatter-gather would bring is more efficient memory usage:
dma-contig requires physically contiguous memory, dma-sg doesn't. If you need
a lot of contiguous memory you can run into out-of-memory situations. The
alternative is to build a kernel with CMA enabled and reserve memory that way.
dma-sg doesn't have these problems, so that can be a good alternative, but it
comes at the price of higher complexity.
>
>> I don't believe that the lockups you see are related to the memcpy as
>> such. The trace says that a cpu is stuck for 22s, no way that is related
>> to something like that. It looks more like a deadlock somewhere.
>
> There was a locking issue (lack of _irqsave) and was fixed since then.
>
>> Regarding the compliance tests: don't pass VB2_USERPTR (doesn't work well
>> with videobuf2-dma-contig). Also add vidioc_expbuf = vb2_ioctl_expbuf for
>> the DMABUF support. That should clear up some of the errors you see.
>
> Thank you!
>
Regards,
Hans
WARNING: multiple messages have this Message-ID (diff)
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
Cc: Linux Media <linux-media@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kernel-mentors@selenic.com" <kernel-mentors@selenic.com>,
devel@driverdev.osuosl.org,
kernel-janitors <kernel-janitors@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andrey Utkin <andrey.od.utkin@gmail.com>
Subject: Re: [RFC PATCH v0] Add tw5864 driver
Date: Mon, 8 Feb 2016 11:29:14 +0100 [thread overview]
Message-ID: <56B86DFA.6090600@xs4all.nl> (raw)
In-Reply-To: <CAM_ZknVjRo0vo2_SLmZSW7R_8LpNkmj-c3q1uBahEa_bSBK0hQ@mail.gmail.com>
On 02/08/2016 11:23 AM, Andrey Utkin wrote:
> On Mon, Feb 8, 2016 at 11:58 AM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
>> Hi Andrey,
>>
>> Hmm, it looks like I forgot to reply. Sorry about that.
>
> Thank you very much anyway.
>
>> I wouldn't change the memcpy: in my experience it is very useful to get a
>> well-formed compressed stream out of the hardware. And the overhead of
>> having to do a memcpy is a small price to pay and on modern CPUs should
>> be barely noticeable for SDTV inputs.
>
> So there's no usecase for scatter-gather approach, right?
The only advantage scatter-gather would bring is more efficient memory usage:
dma-contig requires physically contiguous memory, dma-sg doesn't. If you need
a lot of contiguous memory you can run into out-of-memory situations. The
alternative is to build a kernel with CMA enabled and reserve memory that way.
dma-sg doesn't have these problems, so that can be a good alternative, but it
comes at the price of higher complexity.
>
>> I don't believe that the lockups you see are related to the memcpy as
>> such. The trace says that a cpu is stuck for 22s, no way that is related
>> to something like that. It looks more like a deadlock somewhere.
>
> There was a locking issue (lack of _irqsave) and was fixed since then.
>
>> Regarding the compliance tests: don't pass VB2_USERPTR (doesn't work well
>> with videobuf2-dma-contig). Also add vidioc_expbuf = vb2_ioctl_expbuf for
>> the DMABUF support. That should clear up some of the errors you see.
>
> Thank you!
>
Regards,
Hans
next prev parent reply other threads:[~2016-02-08 10:29 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-03 1:41 [RFC PATCH v0] Add tw5864 driver Andrey Utkin
2016-01-03 3:47 ` Joe Perches
2016-01-03 3:47 ` Joe Perches
2016-01-03 13:34 ` Andrey Utkin
2016-01-03 13:34 ` Andrey Utkin
2016-01-03 5:38 ` Leon Romanovsky
2016-01-03 5:38 ` Leon Romanovsky
2016-01-11 10:52 ` Hans Verkuil
2016-01-11 10:52 ` Hans Verkuil
2016-01-15 2:13 ` Andrey Utkin
2016-01-15 2:13 ` Andrey Utkin
2016-02-08 9:58 ` Hans Verkuil
2016-02-08 9:58 ` Hans Verkuil
2016-02-08 10:23 ` Andrey Utkin
2016-02-08 10:23 ` Andrey Utkin
2016-02-08 10:29 ` Hans Verkuil [this message]
2016-02-08 10:29 ` Hans Verkuil
2016-03-09 14:29 ` Andrey Utkin
2016-03-09 14:29 ` Andrey Utkin
2016-03-11 8:00 ` Hans Verkuil
2016-03-11 8:00 ` Hans Verkuil
2016-03-11 8:40 ` Andrey Utkin
2016-03-11 8:40 ` Andrey Utkin
2016-03-11 9:59 ` Hans Verkuil
2016-03-11 9:59 ` Hans Verkuil
2016-03-11 13:23 ` Andrey Utkin
2016-03-11 13:23 ` Andrey Utkin
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=56B86DFA.6090600@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=andrey.od.utkin@gmail.com \
--cc=andrey.utkin@corp.bluecherry.net \
--cc=devel@driverdev.osuosl.org \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=kernel-mentors@selenic.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.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.