Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1035179rwo; Wed, 2 Aug 2023 07:52:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlE4zMqde+HS3Lj7ZrxS9k3WAghRPcjPpJcJ0MmtnoNisbAqYAePCy7PxvuAFCShb0bD8cOq X-Received: by 2002:a17:90b:4f81:b0:268:17aa:8b78 with SMTP id qe1-20020a17090b4f8100b0026817aa8b78mr13836380pjb.20.1690987920579; Wed, 02 Aug 2023 07:52:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690987920; cv=none; d=google.com; s=arc-20160816; b=H6rTBleQm9D/8mlYhhNcoEwRfd7oLyi5fAC+7eR+afeOx1Tc487Llgbgo99slHf7N/ ioapgKZi6nmY1fsznMPfQKfdtDu/bZi7YkT+a8EidVk1Dl8PIxM4qJyWGHNHq0HBqFFG PLRrDZZThWyGRnbSWHrCe2O4WyI0+5mj2kX+CwfM/XrrLvXbRadbizfJlnanHnQDnz+v eMgB4XROT4KVTz9XxXPd9uVlFsDwGoJu0ZtQ6DS8mLNGRYkCg2vAHmSzGxXHHVLjZh6w qoLBGXVEsVzjP5kps4A9oWV5fQRYBE/UJIFzk+sTerQONi4VaETM9lHT1wYi2PNdY6uN rJRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Z+HgXwaoIgZOGNe/pwL1iXSmvIqWMYWG+mceboRoR4w=; fh=V9KSscryA1hSDftm8Ce5OqfyF+jkzOkl21lBUjhEhSM=; b=xn/I1hg4o46HHkejDEy79SuKjitgPJBjrNtL2DnfyyXbPiPwMgId4PaAmKF5VuzqlO BJSnEEzT1YixGIIQKS9J5MaWTv0d9gxXU8JkXIHR4KQLpQrTlKbYfxmQRLcnZX+nXiKJ SSOujkujxdZhLk2RK07hMOARJr/4qzmBhBwFiQZTqSg+i+WZNDF+uLHAlO75HNapKtIZ 6HEr6wcKDKEP4Cx6D9JCSHHr9IRvS7y9AIbmMemgSYAHB1u56P0N2SIlyXWvMajWzSeY EKKjPPTvBVsW3w9TS5LIbNjXrcMr/mDePyKNuMrUyvXh7tIkxeQ+T0hZMZSU1SkDNt5Z Cq+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dyMhi2UD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ml22-20020a17090b361600b0026577f28dbcsi1210753pjb.45.2023.08.02.07.51.48; Wed, 02 Aug 2023 07:52:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dyMhi2UD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233957AbjHBLOu (ORCPT + 99 others); Wed, 2 Aug 2023 07:14:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232692AbjHBLOs (ORCPT ); Wed, 2 Aug 2023 07:14:48 -0400 Received: from mgamail.intel.com (unknown [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 136A32D4E; Wed, 2 Aug 2023 04:14:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690974871; x=1722510871; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=h/cs+jJte6HO7usFj7kMbMOyqZ6ySurFpnQ9adQ5vBQ=; b=dyMhi2UDruns4JEJefzPSUnQUtHPcwFchcdIup3lrTNcNlYOrxXmnwhZ o3Ex0oKDs9Fg19r43gvnEDKhZYXJghqDHJro8k0DNuzgpklEFI/WCOT5P 0Qc2Z1a43xp2zyKe5GpwxI9GdDLLQmLwiLznox08Jzv9ZNwspoHkfEYjW Vf0CDRWS5xo//f/zPN5hs0eHsGX+9lVzq/ufdU1HIPHcF4ZGKUzcThEDs LEPqMhpP+tOBsUuQJij2L8B6guoUBdAKc09IETKpORI2ETNndgcpkCuVQ fnvQR2CbO3SJu9HVC59fJbw3YLAdTFS2kXOzrS8bg5Rn173pd/ET7A9gl A==; X-IronPort-AV: E=McAfee;i="6600,9927,10789"; a="349155844" X-IronPort-AV: E=Sophos;i="6.01,249,1684825200"; d="scan'208";a="349155844" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Aug 2023 04:14:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10789"; a="722825000" X-IronPort-AV: E=Sophos;i="6.01,249,1684825200"; d="scan'208";a="722825000" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Aug 2023 04:14:12 -0700 Received: from kekkonen.localdomain (localhost [127.0.0.1]) by kekkonen.fi.intel.com (Postfix) with SMTP id 43A0811FBE7; Wed, 2 Aug 2023 14:14:10 +0300 (EEST) Date: Wed, 2 Aug 2023 11:14:10 +0000 From: Sakari Ailus To: Tomi Valkeinen Cc: Jai Luthra , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Laurent Pinchart , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mauro Carvalho Chehab , Maxime Ripard , niklas.soderlund+renesas@ragnatech.se, Benoit Parrot , Vaishnav Achath , Vignesh Raghavendra , nm@ti.com, devarsht@ti.com Subject: Re: [PATCH v8 16/16] media: ti: Add CSI2RX support for J721E Message-ID: References: <20230731-upstream_csi-v8-0-fb7d3661c2c9@ti.com> <20230731-upstream_csi-v8-16-fb7d3661c2c9@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Moi, On Wed, Aug 02, 2023 at 02:04:57PM +0300, Tomi Valkeinen wrote: > > +static int ti_csi2rx_enum_fmt_vid_cap(struct file *file, void *priv, > > + struct v4l2_fmtdesc *f) > > +{ > > + const struct ti_csi2rx_fmt *fmt = NULL; > > + > > + if (f->mbus_code) { > > + if (f->index > 0) > > + return -EINVAL; > > This fails to enumerate the formats if mbus_code is set, doesn't it? This is intentional: if the mbus_code field is set, you're supposed to get only format(s) corresponding to that mbus code. > > > + > > + fmt = find_format_by_code(f->mbus_code); > > + } else { > > + if (f->index >= num_formats) > > + return -EINVAL; > > + > > + fmt = &formats[f->index]; > > + } > > + > > + if (!fmt) > > + return -EINVAL; > > + > > + f->pixelformat = fmt->fourcc; > > + memset(f->reserved, 0, sizeof(f->reserved)); > > + f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; > > + > > + return 0; > > +} -- Sakari Ailus