linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Scott Jiang <scott.jiang.linux@gmail.com>
To: Mauro Carvalho Chehab <mchehab@redhat.com>,
	<linux-media@vger.kernel.org>,
	<uclinux-dist-devel@blackfin.uclinux.org>
Cc: Scott Jiang <scott.jiang.linux@gmail.com>
Subject: [PATCH 2/2] [media] bfin_capture: add query_dv_timings/enum_dv_timings support
Date: Fri, 12 Apr 2013 19:52:59 -0400	[thread overview]
Message-ID: <1365810779-24335-3-git-send-email-scott.jiang.linux@gmail.com> (raw)
In-Reply-To: <1365810779-24335-1-git-send-email-scott.jiang.linux@gmail.com>

More dv_timings ioctl ops are introduced in video core.
Add query_dv_timings/enum_dv_timings accordingly.

Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
---
 drivers/media/platform/blackfin/bfin_capture.c |   28 ++++++++++++++++++------
 1 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/drivers/media/platform/blackfin/bfin_capture.c b/drivers/media/platform/blackfin/bfin_capture.c
index 5f209d5..1d58846 100644
--- a/drivers/media/platform/blackfin/bfin_capture.c
+++ b/drivers/media/platform/blackfin/bfin_capture.c
@@ -649,18 +649,30 @@ static int bcap_s_std(struct file *file, void *priv, v4l2_std_id *std)
 	return 0;
 }
 
-static int bcap_g_dv_timings(struct file *file, void *priv,
+static int bcap_enum_dv_timings(struct file *file, void *priv,
+				struct v4l2_enum_dv_timings *timings)
+{
+	struct bcap_device *bcap_dev = video_drvdata(file);
+
+	return v4l2_subdev_call(bcap_dev->sd, video,
+			enum_dv_timings, timings);
+}
+
+static int bcap_query_dv_timings(struct file *file, void *priv,
 				struct v4l2_dv_timings *timings)
 {
 	struct bcap_device *bcap_dev = video_drvdata(file);
-	int ret;
 
-	ret = v4l2_subdev_call(bcap_dev->sd, video,
-				g_dv_timings, timings);
-	if (ret < 0)
-		return ret;
+	return v4l2_subdev_call(bcap_dev->sd, video,
+				query_dv_timings, timings);
+}
 
-	bcap_dev->dv_timings = *timings;
+static int bcap_g_dv_timings(struct file *file, void *priv,
+				struct v4l2_dv_timings *timings)
+{
+	struct bcap_device *bcap_dev = video_drvdata(file);
+
+	*timings = bcap_dev->dv_timings;
 	return 0;
 }
 
@@ -921,6 +933,8 @@ static const struct v4l2_ioctl_ops bcap_ioctl_ops = {
 	.vidioc_g_std            = bcap_g_std,
 	.vidioc_s_dv_timings     = bcap_s_dv_timings,
 	.vidioc_g_dv_timings     = bcap_g_dv_timings,
+	.vidioc_query_dv_timings = bcap_query_dv_timings,
+	.vidioc_enum_dv_timings  = bcap_enum_dv_timings,
 	.vidioc_reqbufs          = bcap_reqbufs,
 	.vidioc_querybuf         = bcap_querybuf,
 	.vidioc_qbuf             = bcap_qbuf,
-- 
1.7.0.4



      parent reply	other threads:[~2013-04-12 10:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-12 23:52 [PATCH 1/2] [media] blackfin: add display support in ppi driver Scott Jiang
2013-04-12 11:32 ` Hans Verkuil
2013-04-15  2:59   ` Scott Jiang
2013-04-12 23:52 ` [PATCH RFC] [media] blackfin: add video display driver Scott Jiang
2013-04-12 22:28   ` Sylwester Nawrocki
2013-04-17  6:57     ` Scott Jiang
2013-04-18 21:22       ` Sylwester Nawrocki
2013-04-24  9:26     ` Scott Jiang
2013-04-25 20:37       ` Sylwester Nawrocki
2013-04-15 15:03   ` Hans Verkuil
2013-04-16 10:41     ` Scott Jiang
2013-04-12 23:52 ` Scott Jiang [this message]

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=1365810779-24335-3-git-send-email-scott.jiang.linux@gmail.com \
    --to=scott.jiang.linux@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=uclinux-dist-devel@blackfin.uclinux.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).