From patchwork Tue Jun 16 09:30:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prashant Laddha X-Patchwork-Id: 6616301 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C8015C0433 for ; Tue, 16 Jun 2015 09:38:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 034822015A for ; Tue, 16 Jun 2015 09:38:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D9DB4204AD for ; Tue, 16 Jun 2015 09:38:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757245AbbFPJhw (ORCPT ); Tue, 16 Jun 2015 05:37:52 -0400 Received: from bgl-iport-1.cisco.com ([72.163.197.25]:61074 "EHLO bgl-iport-1.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756696AbbFPJho (ORCPT ); Tue, 16 Jun 2015 05:37:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2818; q=dns/txt; s=iport; t=1434447464; x=1435657064; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=4kGBQJRRFbjD8EuLb9RT466bJyvcMSyX965OymstjdQ=; b=BeQ4msH4OUOe7unY1E5NTmRh05e+UQJLY/h7boBNgWaMO++eYxulP868 TWqJoZAaq04mqymolgm10BuMan5G6+sbqjvTcKp2HbS62JARbtjD19Vjd UFTkw49m7rDbiEM8cc0QuiiIAFV3j06hSR3vsdHaGNoE13/C5CqzHyoM3 s=; X-IronPort-AV: E=Sophos;i="5.13,625,1427760000"; d="scan'208";a="52827077" Received: from vla196-nat.cisco.com (HELO bgl-core-2.cisco.com) ([72.163.197.24]) by bgl-iport-1.cisco.com with ESMTP; 16 Jun 2015 09:30:30 +0000 Received: from pla-VB.cisco.com ([10.142.61.237]) by bgl-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id t5G9UTvB014878; Tue, 16 Jun 2015 09:30:30 GMT From: Prashant Laddha To: linux-media@vger.kernel.org Cc: Hans Verkuil , Prashant Laddha Subject: [RFC PATCH 2/2] v4l2-utils: extend set-dv-timing options for RB version Date: Tue, 16 Jun 2015 15:00:31 +0530 Message-Id: <1434447031-21434-3-git-send-email-prladdha@cisco.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1434447031-21434-1-git-send-email-prladdha@cisco.com> References: <1434447031-21434-1-git-send-email-prladdha@cisco.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-15.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY, USER_IN_DEF_DKIM_WL autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP To support the timings calculations for reduced blanking version 2 (RB v2), extended the command line options to include flag indicating whether to use RB V2 or not. Updated the command usage for the same. Cc: Hans Verkuil Signed-off-by: Prashant Laddha --- utils/v4l2-ctl/v4l2-ctl-stds.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/utils/v4l2-ctl/v4l2-ctl-stds.cpp b/utils/v4l2-ctl/v4l2-ctl-stds.cpp index c0e919b..9734c80 100644 --- a/utils/v4l2-ctl/v4l2-ctl-stds.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-stds.cpp @@ -41,7 +41,10 @@ void stds_usage(void) " index=: use the index as provided by --list-dv-timings\n" " or specify timings using cvt/gtf options as follows:\n" " cvt/gtf,width=,height=,fps=\n" - " interlaced=<0/1>,reduced-blanking=<0/1>\n" + " interlaced=<0/1>,reduced-blanking=<0/1>,use-rb-v2=<0/1>\n" + " use-rb-v2 indicates whether to use reduced blanking version 2\n" + " or not. This flag is relevant only for cvt timings and has\n" + " effect only if reduced-blanking=1\n" " or give a fully specified timings:\n" " width=,height=,interlaced=<0/1>,\n" " polarities=,pixelclock=,\n" @@ -148,6 +151,7 @@ enum timing_opts { GTF, FPS, REDUCED_BLANK, + USE_RB_V2, }; static int parse_timing_subopt(char **subopt_str, int *value) @@ -175,6 +179,7 @@ static int parse_timing_subopt(char **subopt_str, int *value) "gtf", "fps", "reduced-blanking", + "use-rb-v2", NULL }; @@ -205,6 +210,7 @@ static void get_cvt_gtf_timings(char *subopt, int standard, int fps = 0; int r_blank = 0; int interlaced = 0; + int use_rb_v2 = 0; bool timings_valid = false; @@ -231,6 +237,8 @@ static void get_cvt_gtf_timings(char *subopt, int standard, case INTERLACED: interlaced = opt_val; break; + case USE_RB_V2: + use_rb_v2 = opt_val; default: break; } @@ -240,7 +248,8 @@ static void get_cvt_gtf_timings(char *subopt, int standard, timings_valid = calc_cvt_modeline(width, height, fps, r_blank == 1 ? true : false, interlaced == 1 ? true : false, - false, bt); + use_rb_v2 == 1 ? true : false, + bt); } else { timings_valid = calc_gtf_modeline(width, height, fps, r_blank == 1 ? true : false,