From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from pandora.armlinux.org.uk ([78.32.30.218]:53986 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750873AbdBAXpe (ORCPT ); Wed, 1 Feb 2017 18:45:34 -0500 Date: Wed, 1 Feb 2017 23:44:38 +0000 From: Russell King - ARM Linux To: Steve Longerbeam Cc: robh+dt@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, kernel@pengutronix.de, fabio.estevam@nxp.com, mchehab@kernel.org, hverkuil@xs4all.nl, nick@shmanahar.org, markus.heiser@darmarIT.de, p.zabel@pengutronix.de, laurent.pinchart+renesas@ideasonboard.com, bparrot@ti.com, geert@linux-m68k.org, arnd@arndb.de, sudipm.mukherjee@gmail.com, minghsiu.tsai@mediatek.com, tiffany.lin@mediatek.com, jean-christophe.trotin@st.com, horms+renesas@verge.net.au, niklas.soderlund+renesas@ragnatech.se, robert.jarzmik@free.fr, songjun.wu@microchip.com, andrew-ct.chen@mediatek.com, gregkh@linuxfoundation.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, devel@driverdev.osuosl.org, Steve Longerbeam Subject: Re: [PATCH v3 21/24] media: imx: Add MIPI CSI-2 Receiver subdev driver Message-ID: <20170201234438.GS27312@n2100.armlinux.org.uk> References: <1483755102-24785-1-git-send-email-steve_longerbeam@mentor.com> <1483755102-24785-22-git-send-email-steve_longerbeam@mentor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1483755102-24785-22-git-send-email-steve_longerbeam@mentor.com> Sender: linux-media-owner@vger.kernel.org List-ID: On Fri, Jan 06, 2017 at 06:11:39PM -0800, Steve Longerbeam wrote: > +static int imxcsi2_get_fmt(struct v4l2_subdev *sd, > + struct v4l2_subdev_pad_config *cfg, > + struct v4l2_subdev_format *sdformat) > +{ > + struct imxcsi2_dev *csi2 = sd_to_dev(sd); > + > + sdformat->format = csi2->format_mbus; > + > + return 0; > +} Hi Steve, This isn't correct, and I suspect the other get_fmt implementations are the same - I've just checked imx-csi.c, and that also appears to have the same issue. When get_fmt() is called with sdformat->which == V4L2_SUBDEV_FORMAT_TRY, you need to return the try format rather than the current format. See the second paragraph of Documentation/media/uapi/v4l/dev-subdev.rst's "Format Negotiation" section, where it talks about using V4L2_SUBDEV_FORMAT_TRY with both VIDIOC_SUBDEV_G_FMT and VIDIOC_SUBDEV_S_FMT. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.