From patchwork Mon Feb 13 11:40:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Zabel X-Patchwork-Id: 9569409 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 603026045D for ; Mon, 13 Feb 2017 11:40:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F82227FAC for ; Mon, 13 Feb 2017 11:40:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 344B227FB1; Mon, 13 Feb 2017 11:40:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE65527FAC for ; Mon, 13 Feb 2017 11:40:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751712AbdBMLky (ORCPT ); Mon, 13 Feb 2017 06:40:54 -0500 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:48651 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751588AbdBMLkv (ORCPT ); Mon, 13 Feb 2017 06:40:51 -0500 Received: from lupine.hi.4.pengutronix.de ([10.1.0.115] helo=lupine.pengutronix.de.) by metis.ext.pengutronix.de with esmtp (Exim 4.84_2) (envelope-from ) id 1cdEzx-0003n9-VZ; Mon, 13 Feb 2017 12:40:49 +0100 From: Philipp Zabel To: linux-media@vger.kernel.org Cc: Laurent Pinchart , Hans Verkuil , Steve Longerbeam , Sakari Ailus , Philipp Zabel Subject: [PATCH v3 3/4] media-ctl: propagate frame interval Date: Mon, 13 Feb 2017 12:40:46 +0100 Message-Id: <1486986047-18128-3-git-send-email-p.zabel@pengutronix.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1486986047-18128-1-git-send-email-p.zabel@pengutronix.de> References: <1486986047-18128-1-git-send-email-p.zabel@pengutronix.de> X-SA-Exim-Connect-IP: 10.1.0.115 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-media@vger.kernel.org Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Same as the media bus format, the frame interval should be propagated from output pads to connected entities' input pads. Signed-off-by: Philipp Zabel Acked-by: Sakari Ailus --- utils/media-ctl/libv4l2subdev.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/utils/media-ctl/libv4l2subdev.c b/utils/media-ctl/libv4l2subdev.c index 2f2ac8e..7f9ef48 100644 --- a/utils/media-ctl/libv4l2subdev.c +++ b/utils/media-ctl/libv4l2subdev.c @@ -694,8 +694,8 @@ static int v4l2_subdev_parse_setup_format(struct media_device *media, return ret; - /* If the pad is an output pad, automatically set the same format on - * the remote subdev input pads, if any. + /* If the pad is an output pad, automatically set the same format and + * frame interval on the remote subdev input pads, if any. */ if (pad->flags & MEDIA_PAD_FL_SOURCE) { for (i = 0; i < pad->entity->num_links; ++i) { @@ -709,6 +709,10 @@ static int v4l2_subdev_parse_setup_format(struct media_device *media, link->sink->entity->info.type == MEDIA_ENT_T_V4L2_SUBDEV) { remote_format = format; set_format(link->sink, &remote_format); + + ret = set_frame_interval(link->sink, &interval); + if (ret < 0) + return ret; } } }