Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp238483imm; Wed, 3 Oct 2018 15:16:06 -0700 (PDT) X-Google-Smtp-Source: ACcGV60lI9VHSDNrR1vgBVKXY8iK88ondZD+fGdKIrPvf10xMwOKQD51jBmu+i283llJQyyEb51G X-Received: by 2002:a63:b25e:: with SMTP id t30-v6mr3094783pgo.401.1538604966333; Wed, 03 Oct 2018 15:16:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538604966; cv=none; d=google.com; s=arc-20160816; b=wnW0fL1upjySyoeP5Xz3lGTfk1R2/aB829u4kVlx8KxzEAYi/hPNwxet4hM2KnXew+ V5NpHic59Tw1huI2zUha+rY3KtSMNHF3iJPnYFFa26Nl7SgaV1CQIO4yRPPZbG4jfr+p 0STRso2qZCPcX1QP11D7hajAAU5Ya/A/SMgIepBnKKaS0TFkqR7reo28JOtqtOh3X+ez y2qOfIFf1ee75JqfCJe/8N0G3gBatgoBmxYtwVYR6/L+sBS/FZ2YESfeXETLSph3MbfZ HdR0qM5ixjck8UF1k2qMPfRPO7ob5E4PunAfGlojVcrZXG2wO8QVlB199s9gBq3fmKh/ QbVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=lMOc5vEA0y2JKAGOn6na8CJeb2z02wImAHGoVNl5nBE=; b=wv/N3GMxajXXASCFM9fg4Mky+29PDjYsGTnKZY7PsQPcJbBoCUUSQZ9GYU7GLCCvEe 7GeQeeq8ZMlLIzrv8U25Pcp3KvhKgqs4TzzpYpdkYe0aJwignEO7ytXnbLMreaiklQXO TcvUgdyAI5YIzsLYVB33stonNm0pb/RZqahUY0h7VISFc4bgI9Gz88fLFkbMThqwU/Ok mrFivQy8GhZT9QBsIjIkwhBZ5fY0xdIBIGr5FtCoiOL6qJ636sEBrtGY657m7QBXJ+qC 0Wp84oL2RmeI/y3Wo5BTEGf3UJhyCfe6fHEZ3XXc9v934ws35OJkw47ppyx42STRmTyW Lw0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v13-v6si2772728pgq.26.2018.10.03.15.15.50; Wed, 03 Oct 2018 15:16:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726449AbeJDFEf (ORCPT + 99 others); Thu, 4 Oct 2018 01:04:35 -0400 Received: from mga04.intel.com ([192.55.52.120]:34231 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725799AbeJDFEe (ORCPT ); Thu, 4 Oct 2018 01:04:34 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Oct 2018 15:14:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,337,1534834800"; d="scan'208";a="75205430" Received: from kogorman-mobl.ger.corp.intel.com (HELO kekkonen.fi.intel.com) ([10.252.6.232]) by fmsmga007.fm.intel.com with ESMTP; 03 Oct 2018 15:14:16 -0700 Received: by kekkonen.fi.intel.com (Postfix, from userid 1000) id 09AF021D03; Thu, 4 Oct 2018 01:14:15 +0300 (EEST) Date: Thu, 4 Oct 2018 01:14:15 +0300 From: Sakari Ailus To: Ricardo Ribalda Delgado Cc: Hans Verkuil , Laurent Pinchart , Mauro Carvalho Chehab , LKML , linux-media , jacopo@jmondi.org Subject: Re: [PATCH v5 2/2] [media] imx214: Add imx214 camera sensor driver Message-ID: <20181003221415.jgpeea5ligm7oyr6@kekkonen.localdomain> References: <20181003130951.19140-1-ricardo.ribalda@gmail.com> <20181003194658.zj6jkfmpbrkmnlen@kekkonen.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 03, 2018 at 10:24:17PM +0200, Ricardo Ribalda Delgado wrote: ... > > > +static int imx214_enum_frame_size(struct v4l2_subdev *subdev, > > > + struct v4l2_subdev_pad_config *cfg, > > > + struct v4l2_subdev_frame_size_enum *fse) > > > +{ > > > + if (fse->code != IMX214_MBUS_CODE) > > > + return -EINVAL; > > > + > > > + if (fse->index >= ARRAY_SIZE(imx214_modes)) > > > > array_index_nospec() ?? I find it scary that you'd need that in drivers. > > :-o Uh... not needed. The value is just sent back to the user as such so this is fine AFAICT. > > > > > + return -EINVAL; > > > + > > > + fse->min_width = fse->max_width = imx214_modes[fse->index].width; > > > + fse->min_height = fse->max_height = imx214_modes[fse->index].height; > > > + > > > + return 0; > > > +} ... > > > + /* > > > + * WARNING! > > > + * Values obtained reverse engineering blobs and/or devices. > > > + * Ranges and functionality might be wrong. > > > + * > > > + * Sony, please release some register set documentation for the > > > + * device. > > > + * > > > + * Yours sincerely, Ricardo. > > > + */ > > > + imx214->exposure = v4l2_ctrl_new_std(&imx214->ctrls, &imx214_ctrl_ops, > > > + V4L2_CID_EXPOSURE, > > > + 0, 0xffff, 1, 0x0c70); > > > > The exposure is in lines so it can't exceed frame height + blanking. > > There's a marginal, too. I don't know what it might be for this sensor > > though. Usually it's small, such as 8 or 16. The image will almost > > certainly be garbled if you exceed the allowed value. > >Seems that this sensor > > On this sensor what I am experiencing instead of garbage is that the > fps gets reduced. So I believe it is fine to > set it up this way. That's rather confusing as well. The user should explicitly need to change fps first, rather than it happening as a side effect of a seemingly unrelated control. -- Regards, Sakari Ailus sakari.ailus@linux.intel.com