From: Hans Verkuil <hansverk@cisco.com>
To: Jose Abreu <Jose.Abreu@synopsys.com>,
Hans Verkuil <hverkuil@xs4all.nl>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Carlos Palminha <CARLOS.PALMINHA@synopsys.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hans.verkuil@cisco.com>,
Sylwester Nawrocki <snawrocki@kernel.org>
Subject: Re: [PATCH v5 2/4] [media] platform: Add Synopsys Designware HDMI RX Controller Driver
Date: Tue, 4 Jul 2017 15:02:16 +0200 [thread overview]
Message-ID: <ccb46d54-df40-91ef-b5fc-05b9b1f08da7@cisco.com> (raw)
In-Reply-To: <93a7aa80-52c5-86c4-c264-37849b467dd3@synopsys.com>
On 07/04/17 14:33, Jose Abreu wrote:
>
>
> On 04-07-2017 10:39, Hans Verkuil wrote:
>>
>>>>>>> +static const struct v4l2_subdev_video_ops
>>>>>>> dw_hdmi_sd_video_ops = {
>>>>>>> + .s_routing = dw_hdmi_s_routing,
>>>>>>> + .g_input_status = dw_hdmi_g_input_status,
>>>>>>> + .g_parm = dw_hdmi_g_parm,
>>>>>>> + .g_dv_timings = dw_hdmi_g_dv_timings,
>>>>>>> + .query_dv_timings = dw_hdmi_query_dv_timings,
>>>>>> No s_dv_timings???
>>>>> Hmm, yeah, I didn't implement it because the callchain and the
>>>>> player I use just use {get/set}_fmt. s_dv_timings can just
>>>>> populate the fields and replace them with the detected dv_timings
>>>>> ? Just like set_fmt does? Because the controller has no scaler.
>>>> No, s_dv_timings is the function that actually sets
>>>> dw_dev->timings.
>>>> After you check that it is valid of course (call
>>>> v4l2_valid_dv_timings).
>>>>
>>>> set_fmt calls get_fmt which returns the information from
>>>> dw_dev->timings.
>>>>
>>>> But it is s_dv_timings that has to set dw_dev->timings.
>>>>
>>>> With the current code you can only capture 640x480 (the default
>>>> timings).
>>>> Have you ever tested this with any other timings? I don't quite
>>>> understand
>>>> how you test.
>>> I use mpv to test with a wrapper driver that just calls the
>>> subdev ops and sets up a video dma.
>>>
>>> Ah, I see now. I failed to port the correct callbacks and in the
>>> upstream version I'm using I only tested with 640x480 ...
>>>
>>> But apart from that this is a capture device without scaling so I
>>> can not set timings, I can only return them so that applications
>>> know which format I'm receiving, right? So my s_dv_timings will
>>> return the same as query_dv_timings ...
>> Well, to be precise: s_dv_timings just accepts what the application
>> gives it (as long as it is within the dv_timings capabilities). But
>> those timings come in practice from a query_dv_timings call from the
>> application.
>>
>> The core rule is that receivers cannot randomly change timings since
>> timings are related to buffer sizes. You do not want the application
>> to allocate buffers for 640x480 and when the source changes to 1920x1080
>> have those buffers suddenly overflow.
>>
>> Instead the app queries the timings, allocates the buffers, start
>> streaming and when the timings change it will get an event so it can
>> stop streaming, reallocate buffers, and start the process again.
>>
>> In other words, the application is in control here.
>>
>
> ... But this is not true for mpv/mplayer. They first try to set a
> default format (by using s_fmt) and then query the format again
> (by using g_fmt) ... So dv_timings are never used. Are these apps
> broken? Im only using them because of performance, do you
> recommend others?
I don't believe those have ever been adapted to the DV_TIMINGS API. Only
SDTV (G/S/QUERYSTD). I believe gstreamer can handle this, though. But I
don't have any experience with gstreamer.
qv4l2 works fine, though. If you can build that on your system, then that's
by far the easiest utility to use.
The reason why so few applications have been adapted to the DV_TIMINGS API
is that it is so hard to get hardware with working HDMI input. There are
PCIe cards, but since the datasheets for the used HDMI receivers are closed
we can't make a driver. And there are no cheap SoC devkits that have HDMI input.
Output, yes. Input, no.
So there is no easy way to add support for this to applications.
Regards,
Hans
next prev parent reply other threads:[~2017-07-04 13:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-29 10:46 [PATCH v5 0/4] Synopsys Designware HDMI Video Capture Controller + PHY Jose Abreu
2017-06-29 10:46 ` [PATCH v5 1/4] [media] platform: Add Synopsys Designware HDMI RX PHY e405 Driver Jose Abreu
2017-06-29 10:46 ` [PATCH v5 2/4] [media] platform: Add Synopsys Designware HDMI RX Controller Driver Jose Abreu
2017-07-03 9:27 ` Hans Verkuil
2017-07-03 9:53 ` Jose Abreu
2017-07-03 10:33 ` Hans Verkuil
2017-07-04 9:28 ` Jose Abreu
2017-07-04 9:39 ` Hans Verkuil
2017-07-04 12:33 ` Jose Abreu
2017-07-04 13:02 ` Hans Verkuil [this message]
2017-07-04 13:50 ` Jose Abreu
2017-07-04 14:04 ` Hans Verkuil
2017-06-29 10:46 ` [PATCH v5 3/4] MAINTAINERS: Add entry for Synopsys Designware HDMI drivers Jose Abreu
2017-06-29 10:46 ` [PATCH v5 4/4] dt-bindings: media: Document Synopsys Designware HDMI RX Jose Abreu
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=ccb46d54-df40-91ef-b5fc-05b9b1f08da7@cisco.com \
--to=hansverk@cisco.com \
--cc=CARLOS.PALMINHA@synopsys.com \
--cc=Jose.Abreu@synopsys.com \
--cc=hans.verkuil@cisco.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=snawrocki@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
all inboxes | Powered by JetHome®