Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp859526lqt; Tue, 19 Mar 2024 06:15:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWicDj/yr7nFjc+pe6dy+Ax8xqv9mwjSKi9bz+C+zRWc+eWiGsLNmjEljbzI9xhACYlR3yzvWrKUEX7ylIl0GTtWno7C+JDMqHiFg1Odg== X-Google-Smtp-Source: AGHT+IGlttqXmFfmP8XIA7mSctaLUxmUDlualBHX8/tiPwU7ef+0QmOovdYSxY/gMwqzikqGPBI7 X-Received: by 2002:a05:6a20:491e:b0:1a3:48c8:6855 with SMTP id ft30-20020a056a20491e00b001a348c86855mr11681709pzb.26.1710854101785; Tue, 19 Mar 2024 06:15:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710854101; cv=pass; d=google.com; s=arc-20160816; b=HYErGBAdLNl68THPddM+wffBKsjrzQkGvKLQxtUzksL2ZX3IdiyyZNh5AEghR11Q9a 2hsvInch70RL9iMGskEPUFPyFddlLmePFiDuHEcaBZGzPJcS585ZoEBxD2Mgf6eM4PI2 pWGJxlup59cMHWsmh6XPksr2cBQgLRJ/lDyOx8UFN5gdG0uB8AHXXqokvpKvCsYphsci QhFvjZ5zxE8FwNJd3r9KUDASOBK1fKmX9ueYff9bENOQurH0u5SFjHC060QRJIZovP7E pnVF6rNzSBhe6v5URynBrrKXL74RrSKLqKmOUBolmPpsJ4qUu16oafTzEEIMl/bz7MAl 0B5g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=oeTKzSE2/03A8N0Q4td+fxRH+eyGSPC3c1rn+MxkFAU=; fh=r8U6o99DqjETCN5PoP5pyMOzab+q2No/39kprw9oBWg=; b=bUsrg3ZaoTKBmfc/wKrKQx3+cV82qfXkyr1J9cqkXShIrrC6eESf+9fQl+lxqlkclB 2k4zVoRX6odTkCKELw3hmoUxAff7timz2vKSl424gyMahrGC3AeXatUcPjaGX62K+pVb M5p4tmtr8vaJpzcBP8tPZlKjA7G2ulUoX9rL05o5IWEi3QJ4yeupA6bqCuAKICMTcJYD YhXGRPinWzqo2J703kY5WUgSAvMzzYqfHmLtSjQA7DD3fsIGGwhHOZozhB9xTKjWpF0m Kag8QJjARPQlCgBBtkodGp+6KGc7hvss4y1J4QJ9qrTivSLQaKwgU7J716+3MsUNakbk p/ig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=OQUTd8Iv; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-107577-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107577-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k14-20020a635a4e000000b005cf94b8d9ddsi10243907pgm.869.2024.03.19.06.15.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 06:15:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-107577-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=OQUTd8Iv; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-107577-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107577-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5CF092852B7 for ; Tue, 19 Mar 2024 13:15:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1F0D283CD3; Tue, 19 Mar 2024 13:10:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="OQUTd8Iv" Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 56BA183CAE; Tue, 19 Mar 2024 13:10:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710853820; cv=none; b=XzGRX+r/wUZwV7HfQhFiMPnwwjPPrbPq5w+Q/aT2dyR2eyu1jCIxckI+qdp0wfJ9UimVKuEWwmHVAahD3i/WHPJ3v5BCb3g6wLCltmgztFMXP3QDFTHgIHRn5lswLIhXWRmhImdr6Hsg416TDpY1X0cDkcjVirx+N/9YomsjFN4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710853820; c=relaxed/simple; bh=SpyapOi+YNjXiDlh3WYtvbhPHkpVL36i0qOTdjclph0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KY5rSWrqv23AMwo+fKWDY/S1jtfV2TZ5VnbubpQOCgvT1U1OZDn5g9dUo/+L5dHAyLFtYDp4dUXosObMvm/g8QCQO+m3tBWiFyalpMFMWmdmadgfVeBIuhgYanFhdDeLcJlAPNBHBfKGyR8pnqzLtmKdVw0Vskl+oSwjG6avw4s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=OQUTd8Iv; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Received: from [192.168.1.105] (unknown [103.86.18.138]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1F756C80; Tue, 19 Mar 2024 14:09:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1710853788; bh=SpyapOi+YNjXiDlh3WYtvbhPHkpVL36i0qOTdjclph0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=OQUTd8IvUiJQefhyc0KfsTRBDB2wMr4qpIRGCnB2T8ZQ+ZRzuKmi91XN77DNfsT7V CUoF8VZ9lWbnJHErxDD/O/swhh3/jXwuIPoyH9J3vzU38J1Z0kHsz4sF17YYEUjOZQ 7V7XT1mcQUyE/q8ylxXtXoEEl3AIfX6Kks+4EEvk= Message-ID: <4bb01eb0-bf53-43f2-a488-7959aadacc3b@ideasonboard.com> Date: Tue, 19 Mar 2024 18:40:06 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 0/2] media: i2c: Add imx283 camera sensor driver Content-Language: en-US To: linux-media@vger.kernel.org Cc: Kieran Bingham , Laurent Pinchart , willl will , Sakari Ailus , tomi.valkeinen@ideasonboard.com, Mauro Carvalho Chehab , Hans Verkuil , open list References: <20240313070705.91140-1-umang.jain@ideasonboard.com> From: Umang Jain In-Reply-To: <20240313070705.91140-1-umang.jain@ideasonboard.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello, Ping for review and also the streams API streams_mask issue mentioned below. Is anyone interested in looking at this particular issue? On 13/03/24 12:36 pm, Umang Jain wrote: > Add a v4l2 subdevice driver for the Sony IMX283 image sensor. > > The IMX283 is a 20MP Diagonal 15.86 mm (Type 1) CMOS Image Sensor with > Square Pixel for Color Cameras. > > The following features are supported: > - Manual exposure an gain control support > - vblank/hblank/link freq control support > - Test pattern support control > - Arbitrary horizontal and vertical cropping > - Supported resolution: > - 5472x3648 @ 20fps (SRGGB12) > - 5472x3648 @ 25fps (SRGGB10) > - 2736x1824 @ 50fps (SRGGB12) > > The driver is tested on mainline branch v6.8-rc2 on IMX8MP Debix-SOM-A. > Additional testing has been done on RPi5 with the downstream BSP. > > Changes in v3: > - fix headers includes > - Improve #define(s) readability > - Drop __func__ from error logs > - Use HZ_PER_MHZ instead of MEGA > - mdsel* variables should be u8 > - Use container_of_const() instead of container_of() > - Use clamp() used of clamp_t variant > - Use streams API imx283_{enable|disable}_streams (**NOTE**) > - Properly fix PM runtime handling > (pm_ptr(), DEFINE_RUNTIME_DEV_PM_OPS, > imx283_runtime_suspend, imx283_runtime_resume) > - Fix format modifiers, signed-ness at various places > > > **NOTE** > There is streams mask issue, as no routes are defined with 1 pad: > For testing, I have the following applied locally: > ``` > diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c > index 4c6198c48dd6..38545d779620 100644 > --- a/drivers/media/v4l2-core/v4l2-subdev.c > +++ b/drivers/media/v4l2-core/v4l2-subdev.c > @@ -2115,8 +2115,10 @@ int v4l2_subdev_enable_streams(struct v4l2_subdev *sd, u32 pad, > if (pad >= sd->entity.num_pads) > return -EINVAL; > > - if (!streams_mask) > - return 0; > + if (!streams_mask) { > + dev_err(sd->dev, "no streams mask, returning ....\n"); > + //return 0; > + } > > /* Fallback on .s_stream() if .enable_streams() isn't available. */ > if (!sd->ops->pad || !sd->ops->pad->enable_streams) > ``` > > changes in v2 (summary): > - Use u32 wherever possible > - Use MEGA macro instead of self defined MHZ() macro > - Properly refine regs using CCI > - Drop tracking of current mode. Shifted to infer from active state directly. > (Laurent's review) > - Cont. from above: Pass the struct imx283_mode to functions whereever required. > - Remove unused comments > - Remove custom mutex. Use control handler one instead. > - Drop imx283_reset_colorspace() and inline > - Set colorspace field properly (drop _DEFAULTS) > - Use __maybe_unused for imx283_power_on() and imx283_power_off() > - Store controls v4l2_ctrl handles for those required, not all. > - Drop imx283_free_controls(). Use v4l2_ctrl_handler_free > - fix reset-gpios handling and add it to DT schema > - fix data-lanes property in DT schema > - fix IMX283 Kconfig > - Remove unused macros > - Alphabetical case consistency > > Kieran Bingham (1): > media: i2c: Add imx283 camera sensor driver > > Umang Jain (1): > media: dt-bindings: media: Add bindings for IMX283 > > .../bindings/media/i2c/sony,imx283.yaml | 107 ++ > MAINTAINERS | 9 + > drivers/media/i2c/Kconfig | 10 + > drivers/media/i2c/Makefile | 1 + > drivers/media/i2c/imx283.c | 1596 +++++++++++++++++ > 5 files changed, 1723 insertions(+) > create mode 100644 Documentation/devicetree/bindings/media/i2c/sony,imx283.yaml > create mode 100644 drivers/media/i2c/imx283.c >