From: Shuah Khan <shuah.kh@samsung.com>
To: gregkh@linuxfoundation.org, m.chehab@samsung.com,
olebowle@gmx.com, ttmesterr@gmail.com,
dheitmueller@kernellabs.com, cb.xiong@samsung.com,
yongjun_wei@trendmicro.com.cn, hans.verkuil@cisco.com,
prabhakar.csengg@gmail.com, laurent.pinchart@ideasonboard.com,
sakari.ailus@linux.intel.com, crope@iki.fi,
wade_farnsworth@mentor.com, ricardo.ribalda@gmail.com
Cc: Shuah Khan <shuah.kh@samsung.com>, linux-media@vger.kernel.org
Subject: [PATCH 0/4] media: tuner large grain locking
Date: Tue, 24 Jun 2014 17:57:27 -0600 [thread overview]
Message-ID: <cover.1403652043.git.shuah.kh@samsung.com> (raw)
Add a managed token resource that can be created at device level
which can be used as a large grain lock by diverse group of drivers
such as the media drivers that share a resource.
Token resource manages a unique named string resource which is
derived from common bus_name, and hardware address fields from
the struct device.
au0828 is changed to use token devres as a large locking
for exclusive access to tuner function. A new tuner_tkn
field is added to struct au0828_dev. Tuner token is created
from au0828 probe() and destroyed from disconnect().
Two new routines au0828_create_token_resources() and
au0828_destroy_token_resources() create and destroy the
tuner token.
au0828-dvb exports the tuner token to dvb-frontend when
it registers the digital frontend using the tuner_tkn
field in struct dvb_frontend.
au0828-video exports the tuner token to v4l2-core when
it registers the analog function using tuner_tkn field
in struct video_device.
Before this change:
- digital tv app disrupts an active analog app when it
tries to use the tuner
e.g: tvtime analog video stream stops when kaffeine starts
- analog tv app disrupts another analog app when it tries to
use the tuner
e.g: tvtime audio glitches when xawtv starts and vice versa.
- analog tv app disrupts an active digital app when it tries
to use the tuner
e.g: kaffeine digital stream stops when tvtime starts
- digital tv app disrupts another digital tv app when it tries
to use the tuner
e.g: kaffeine digital stream stops when vlc starts and vice
versa
After this change:
- digital tv app detects tuner is busy without disrupting
the active app.
- analog tv app detects tuner is busy without disrupting
the active analog app.
- analog tv app detects tuner is busy without disrupting
the active digital app.
- digital tv app detects tuner is busy without disrupting
the active digital app.
Requesting feedback on any use-cases I missed and overall
approach to solving the contention between media functions.
Shuah Khan (4):
drivers/base: add managed token dev resource
media: dvb-fe changes to use tuner token
media: v4l2-core changes to use tuner token
media: au0828 changes to use token devres for tuner access
drivers/base/Makefile | 2 +-
drivers/base/token_devres.c | 134 +++++++++++++++++++++++++++++++
drivers/media/dvb-core/dvb_frontend.c | 21 +++++
drivers/media/dvb-core/dvb_frontend.h | 1 +
drivers/media/usb/au0828/au0828-core.c | 42 ++++++++++
drivers/media/usb/au0828/au0828-dvb.c | 1 +
drivers/media/usb/au0828/au0828-video.c | 4 +
drivers/media/usb/au0828/au0828.h | 4 +
drivers/media/v4l2-core/v4l2-dev.c | 23 +++++-
include/linux/token_devres.h | 19 +++++
include/media/v4l2-dev.h | 1 +
11 files changed, 250 insertions(+), 2 deletions(-)
create mode 100644 drivers/base/token_devres.c
create mode 100644 include/linux/token_devres.h
--
1.7.10.4
next reply other threads:[~2014-06-24 23:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-24 23:57 Shuah Khan [this message]
2014-06-24 23:57 ` [PATCH 1/4] drivers/base: add managed token dev resource Shuah Khan
2014-06-27 13:55 ` Hans Verkuil
2014-06-24 23:57 ` [PATCH 2/4] media: dvb-fe changes to use tuner token Shuah Khan
2014-06-24 23:57 ` [PATCH 3/4] media: v4l2-core " Shuah Khan
2014-06-27 13:34 ` Hans Verkuil
2014-06-24 23:57 ` [PATCH 4/4] media: au0828 changes to use token devres for tuner access Shuah Khan
2014-06-27 13:52 ` Hans Verkuil
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=cover.1403652043.git.shuah.kh@samsung.com \
--to=shuah.kh@samsung.com \
--cc=cb.xiong@samsung.com \
--cc=crope@iki.fi \
--cc=dheitmueller@kernellabs.com \
--cc=gregkh@linuxfoundation.org \
--cc=hans.verkuil@cisco.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=m.chehab@samsung.com \
--cc=olebowle@gmx.com \
--cc=prabhakar.csengg@gmail.com \
--cc=ricardo.ribalda@gmail.com \
--cc=sakari.ailus@linux.intel.com \
--cc=ttmesterr@gmail.com \
--cc=wade_farnsworth@mentor.com \
--cc=yongjun_wei@trendmicro.com.cn \
/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.