Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp772024imm; Thu, 4 Oct 2018 03:07:50 -0700 (PDT) X-Google-Smtp-Source: ACcGV61B/9u1JZUpMTF1A9vBBokQBwc5sRsO3x3paPTfIXEb4FczTEyrbC6ygD0HdTH/krEENW15 X-Received: by 2002:a62:13cb:: with SMTP id 72-v6mr5926828pft.34.1538647670210; Thu, 04 Oct 2018 03:07:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538647670; cv=none; d=google.com; s=arc-20160816; b=F5oGZ9mqe3XrSdNz8LQx4pHdhNCEm6scJE+EknZO+zV69OM1aJ9RBFhSuh/GuxwyUR L9We1IV2kxB8HlRcE5eIaf+bXX+mA2sIuS/woLhIfWwawo7EGpUas88ov27O2GV0mrnt ml2ChLJcJc3wRVwJs7NuuklzEzZ1+EdOBwAv5xfjBs6YK3ds7EDhW+DpWUQDUisBOEef ECZOWA9Nk+o/8NrMWdkOfREAxI6hK2vlYh4QZtY/y2QmChmW+X0z+YKFs3MWGgcYHQvj 27pvyDpZODKSBgcf/vHaCfWrAKvHjVw5TLS99je8h17QKTD7StRYuA9EOXYlbFtDoxJd 10Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=1LMwMIpNo9BoxjsZCyB38K6u5kj58SlDOP+no+C7Q0I=; b=jefW6aq/aP5/0/eCwsQfrMR4+guXdn1WyW9wECj6KqWF5FfT6pZOd9Mt7+vjlHaV+f Xst837S9duOiyXXbZi0B/TtIpWShG43K8TSNtgC05UUeM+B1dM/9ZxnpteLa7mrlecvV 04j1V4gkAL7hUe+W2qvxEjM/eXErGIOnt72fpPC9O2yGXGuoRw8K25RE/lV1kkx8YyQE ArafHObFs2+g0Qq6MZhixUHS16faxs2aMbRQTMMa38wqNVXV9bpXDGl14KIIdw9kSwqJ 15q0tJPY0jfHBNDlIsvKZTwaIjCZHVux6WnQENq+rfpAe7tu5x1Txd/pUdnV8rVjyAuU hS5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kxtKfn0Z; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m16-v6si3694177pgl.462.2018.10.04.03.07.33; Thu, 04 Oct 2018 03:07:50 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kxtKfn0Z; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727523AbeJDQ7r (ORCPT + 99 others); Thu, 4 Oct 2018 12:59:47 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:34832 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727279AbeJDQ7r (ORCPT ); Thu, 4 Oct 2018 12:59:47 -0400 Received: by mail-lj1-f194.google.com with SMTP id o14-v6so7845708ljj.2; Thu, 04 Oct 2018 03:07:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1LMwMIpNo9BoxjsZCyB38K6u5kj58SlDOP+no+C7Q0I=; b=kxtKfn0ZI7NKXRfdG4X+wE39J8SHLbwCcGicwEjFB5VHzw0gcf8coA6ChJyFAlak6u 2w+BqLy69jcDtgE/WDjlGKIeRU4KocxKN2QP7DAqWHfOHYilZ3jwyORJnbGBghb3gDGL Tm/oE1mw1NaPFSFeH7gyd6cm6KPFg7bTLTcej8fggt/h9ETuJ4Vm3hOe4cs2+gFGqUtJ mKCxSj7iojDwC0G48ANGWPNcO/7EvHHQDI0sfd+9wEVKzMWusiGjdrDo8UM5z1WNjflV lWkLq2HLpZJwUQc2774Yz3ei1n7OXOSz2xGy5lhbfyDGfK3n3XMLT+w2XYtH17CayDEk s7NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1LMwMIpNo9BoxjsZCyB38K6u5kj58SlDOP+no+C7Q0I=; b=h5Hf440pVmT6zgkO2B08sJVbk7Hvk0XTELHWaovXcMnnaHNMTLGU57cXJSXJgX7tY2 tIrFDcxjKOJuJ3UElYfGz2DY1PIN5l0eSNXzhtgtIHKsKAGMLcAJY68gUXOTX1mSgPMY nJubRE201bb9e39t1dtn3RUHTRGScUaHp7tZKFv+9gjFuCQ9g5aq8n33nJ0ZxCqREPhq 1hLgFwKr+LkwoT+NdIGpfGKbOtWuyYmZux2M137dpEKrsmAslmF59772JTeFukKPq7nS WbgPAdu1RnCM+rGZeQuXCVrWuikHQoXEKY+oFStqV7FdUJ/gd6/QzD85nnRBd6XFgMPt 7E0Q== X-Gm-Message-State: ABuFfojDgHujlYDJHntf/RJiuTeH2qND4feRUiS6rIEBdIOtrlNjZj/F RYqdKrgKo52fuiT6L0N/qlZOnaBT3ECGc1Tb7qhEGg== X-Received: by 2002:a2e:974a:: with SMTP id f10-v6mr3735176ljj.30.1538647633054; Thu, 04 Oct 2018 03:07:13 -0700 (PDT) MIME-Version: 1.0 References: <20181003130951.19140-1-ricardo.ribalda@gmail.com> <20181003194658.zj6jkfmpbrkmnlen@kekkonen.localdomain> <20181003221415.jgpeea5ligm7oyr6@kekkonen.localdomain> In-Reply-To: <20181003221415.jgpeea5ligm7oyr6@kekkonen.localdomain> From: Ricardo Ribalda Delgado Date: Thu, 4 Oct 2018 12:06:56 +0200 Message-ID: Subject: Re: [PATCH v5 2/2] [media] imx214: Add imx214 camera sensor driver To: Sakari Ailus Cc: Hans Verkuil , Laurent Pinchart , Mauro Carvalho Chehab , LKML , linux-media , jacopo@jmondi.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sakari On Thu, Oct 4, 2018 at 12:14 AM Sakari Ailus wrote: > > 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. > I'd rather maintain this behaviour until we get access to better documentation. Currently I cannot change the fps on demand, just changing the exposure time, so I have no proper way of set/get fps > -- > Regards, > > Sakari Ailus > sakari.ailus@linux.intel.com -- Ricardo Ribalda