From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
To: Kamil Debski <k.debski@samsung.com>,
'Kiran AVND' <avnd.kiran@samsung.com>,
linux-media@vger.kernel.org
Cc: wuchengli@chromium.org, posciak@chromium.org, arun.m@samsung.com,
ihf@chromium.org, prathyush.k@samsung.com, arun.kk@samsung.com,
kiran@chromium.org, Andrzej Hajda <a.hajda@samsung.com>
Subject: Re: [PATCH v2 14/14] [media] s5p-mfc: Don't change the image size to smaller than the request.
Date: Wed, 08 Oct 2014 10:34:53 -0400 [thread overview]
Message-ID: <54354B8D.8050208@collabora.com> (raw)
In-Reply-To: <11f301cfe2e2$0cacc810$26065830$%debski@samsung.com>
Le 2014-10-08 06:24, Kamil Debski a écrit :
> Hi,
>
> This patch seems complicated and I do not understand your motives.
>
> Could you explain what is the problem with the current aligning of the
> values?
> Is this a hardware problem? Which MFC version does it affect?
> Is it a software problem? If so, maybe the user space application should
> take extra care on what value it passes/receives to try_fmt?
This looks like something I wanted to bring here as an RFC but never
manage to get the time. In an Odroid Integration we have started using
the following simple patch to work around this:
https://github.com/dsd/linux-odroid/commit/c76b38c1d682b9870ea3b00093ad6500a9c5f5f6
The context is that right now we have decided that alignment in s_fmt
shall be done with a closest rounding. So the format returned may be
bigger, or smaller, that's basically random. I've been digging through a
lot, and so far I have found no rational that explains this choice other
that this felt right.
In real life, whenever the resulting format is smaller then request,
there is little we can do other then fail or try again blindly other
sizes. But with bigger raw buffers, we can use zero-copy cropping
techniques to keep going. Here's a example:
image_generator -> hw_converter -> display
As hw_converter is a V4L2 M2M, an ideal use case here would be for
image_generator to use buffers from the hw_converter. For the scenario,
it is likely that a fixed video size is wanted, but this size is also
likely not to match HW requirement. If hw_converter decide to give back
something smaller, there is nothing image_generator can do. It would
have to try again with random size to find out that best match. It's a
bit silly to force that on application, as the hw_converter know the
closest best match, which is simply the next valid bigger size if that
exist.
hope that helps,
Nicolas
next prev parent reply other threads:[~2014-10-08 14:34 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-26 4:52 [PATCH v2 00/14] Fixes from Chrome OS tree for MFC driver Kiran AVND
2014-09-26 4:52 ` [PATCH v2 01/14] [media] s5p-mfc: support MIN_BUFFERS query for encoder Kiran AVND
2014-09-26 4:52 ` [PATCH v2 02/14] [media] s5p-mfc: Fix REQBUFS(0) " Kiran AVND
2014-09-26 4:52 ` [PATCH v2 03/14] [media] s5p-mfc: clear 'enter_suspend' flag if suspend fails Kiran AVND
2014-09-26 4:52 ` [PATCH v2 04/14] [media] s5p-mfc: Only set timestamp/timecode for new frames Kiran AVND
2014-09-26 4:52 ` [PATCH v2 05/14] [media] s5p-mfc: keep RISC ON during reset for V7/V8 Kiran AVND
2014-09-26 4:52 ` [PATCH v2 06/14] [media] s5p-mfc: check mfc bus ctrl before reset Kiran AVND
2014-09-26 4:52 ` [PATCH v2 07/14] [media] s5p-mfc: Don't crash the kernel if the watchdog kicks in Kiran AVND
2014-10-08 10:26 ` Kamil Debski
2014-10-21 8:50 ` Arun Kumar K
2014-09-26 4:52 ` [PATCH v2 08/14] [media] s5p-mfc: modify mfc wakeup sequence for V8 Kiran AVND
2014-09-26 4:52 ` [PATCH v2 09/14] [media] s5p-mfc: De-init MFC when watchdog kicks in Kiran AVND
2014-09-26 4:52 ` [PATCH v2 10/14] [media] s5p-mfc: flush dpbs when resolution changes Kiran AVND
2014-09-26 4:52 ` [PATCH v2 11/14] [media] s5p-mfc: Remove unused alloc field from private buffer struct Kiran AVND
2014-09-26 4:52 ` [PATCH v2 12/14] [media] s5p-mfc: fix V4L2_CID_MIN_BUFFERS_FOR_CAPTURE on resolution change Kiran AVND
2014-09-26 4:52 ` [PATCH v2 13/14] [media] s5p-mfc: fix a race in interrupt flags handling Kiran AVND
2014-10-08 10:29 ` Kamil Debski
2014-09-26 4:52 ` [PATCH v2 14/14] [media] s5p-mfc: Don't change the image size to smaller than the request Kiran AVND
2014-10-08 10:24 ` Kamil Debski
2014-10-08 14:34 ` Nicolas Dufresne [this message]
2014-10-09 10:06 ` Kamil Debski
2014-10-09 12:57 ` Nicolas Dufresne
2014-10-21 11:34 ` Hans Verkuil
2014-10-21 12:43 ` Nicolas Dufresne
2014-10-21 12:48 ` Kamil Debski
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=54354B8D.8050208@collabora.com \
--to=nicolas.dufresne@collabora.com \
--cc=a.hajda@samsung.com \
--cc=arun.kk@samsung.com \
--cc=arun.m@samsung.com \
--cc=avnd.kiran@samsung.com \
--cc=ihf@chromium.org \
--cc=k.debski@samsung.com \
--cc=kiran@chromium.org \
--cc=linux-media@vger.kernel.org \
--cc=posciak@chromium.org \
--cc=prathyush.k@samsung.com \
--cc=wuchengli@chromium.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).