From: Hans Verkuil <hverkuil@xs4all.nl>
To: Devin Heitmueller <dheitmueller@kernellabs.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [REVIEW] au0828-video.c
Date: Fri, 12 Dec 2014 17:32:04 +0100 [thread overview]
Message-ID: <548B1884.6090005@xs4all.nl> (raw)
In-Reply-To: <CAGoCfiw1pdJGGfG5Gs-3Jf2e48buzwEA1O3+j-E+2Pjj657eEQ@mail.gmail.com>
On 12/12/2014 04:52 PM, Devin Heitmueller wrote:
>> No, tvtime no longer hangs if no frames arrive, so there is no need for
>> this timeout handling. I'd strip it out, which can be done in a separate
>> patch.
>
> Did you actually try it?
Mauro tried it, not me. I'm not sure if he looked at whether the user
interface is blocked when waiting for a frame.
> Do you have some patches to tvtime which
> aren't upstream?
>
> I wrote the comment in question (and added the associated code). The
> issue is that tvtime does *everything* in a single thread (except the
> recent ALSA audio work), that includes servicing the video/vbi devices
> as well as the user interface. That thread blocks on a DQBUF ioctl
> until data arrives, and thus if frames are not being delivered it will
> hang the entire tvtime user interface.
>
> Now you can certainly argue that is a bad design decision, but it's
> been that way for 15+ years, so we can't break it now. Hence why I
> generate dummy frames on a timeout if the decoder isn't delivering
> video. Unfortunately the au8522 doesn't have a free running mode
> (i.e. blue screen if no video), which is why most of the other devices
> work fine (decoders by Conexant, NXP, Trident, etc all have such
> functionality).
>
> Don't get me wrong - I *hate* that I had to put that timer crap in the
> driver, but it was necessary to be compatible with one of the most
> popular applications out there.
>
> In short, that code cannot be removed.
Sure it can. I just tried tvtime and you are right, it blocks the GUI.
But the fix is very easy as well. So now I've updated tvtime so that
it timeouts and gives the GUI time to update itself.
No more need for such an ugly hack in au0828. The au0828 isn't the only
driver that can block, others do as well. Admittedly, they aren't very
common, but they do exist. So it is much better to fix the application
than adding application workarounds in the kernel.
Regards,
Hans
next prev parent reply other threads:[~2014-12-12 16:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-12 10:16 [REVIEW] au0828-video.c Hans Verkuil
2014-12-12 12:49 ` Mauro Carvalho Chehab
2014-12-12 12:55 ` Hans Verkuil
2014-12-12 13:14 ` Mauro Carvalho Chehab
2014-12-12 15:26 ` Shuah Khan
2014-12-12 15:28 ` Hans Verkuil
2014-12-12 15:30 ` Shuah Khan
2014-12-12 15:52 ` Devin Heitmueller
2014-12-12 16:32 ` Hans Verkuil [this message]
2014-12-12 16:46 ` Devin Heitmueller
2014-12-12 17:36 ` Mauro Carvalho Chehab
2014-12-12 17:46 ` Devin Heitmueller
2014-12-12 15:23 ` Shuah Khan
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=548B1884.6090005@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=dheitmueller@kernellabs.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=shuahkh@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.