From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=213.167.242.64 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796017553; b=SY79ScH9ypsMVZLaZI7oebnslhzvTEgIBE71Xx7nNtUKq6eujQpextMGOsNTMLuohEmx sj7Uxc26/pRVxbkT3dQiVT0cvpXMxSfYL+qKuTLeeVfJlVquKPga0V2YcUphg44mosMid MZr4wBpuexKPezM95eapoWNolIDfITA3mvvIgYth6UxBHKnR1G1WAgJv82YeX+SsM/n4p rVrIuTnDVQy+KQMioGgQ8fkOFwywd3dZkS6UKDEuBT8HHwS2gjXwd09bTWYc7GpHfWQDD FnRCcae7bgdY6BuTOX9g207xjjocyDUaA4YrvyuyjumMv1v4DLJo/3m9Wkh5UECSWpQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796017553; h=DMARC-Filter:Received:DKIM-Signature:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=1QqJl/4ePJlv2Pgsp3Qyx2ajfwB640Eq88bvaMxO4vs=; b=FjkQvuPRSLi6aCHoR+KJT9it0mzmTZFgjyTD4c3u6VQHZdgfUowaiOv+I+1A8wrl/+bY mpsfxyJSTNurEv3sG7MvOsmLO91XE8hFISOlgTDjAJh+Uhd0roo9RgZRHnbc493GkU/Lk kANXkP/HVQzWH1/svpCnZVJjZeViO+NyhVi+Q5zxn9a0hrzeoTNoRfp004uj7bkGqvRy+ cVcePtP2UEU36wueHpFrn2fpXNP2tXMU2Ign/BQzEm2wzAgACxvS0P7VncBE/jmM0VqvP 3ZOsQUk2qhmfXA0YjtQwldNnoHNFwY+7zfPSAZ9r0tyBoDFjyN0DCWQfnfmSvvdqLUQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass header.d=ideasonboard.com header.i=@ideasonboard.com header.a=rsa-sha256 header.s=mail header.b=QQhQxC8h; arc=none smtp.remote-ip=213.167.242.64 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4295E606A31C; Mon, 30 Nov 2026 05:45:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4295E606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.a=rsa-sha256 header.s=mail header.b=QQhQxC8h Received: from killaraus.ideasonboard.com (unknown [IPv6:2400:2411:160:2f00:6854:c2c9:122:442c]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5CFE34B0; Mon, 30 Nov 2026 06:43:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1796017394; bh=SGYm32mbwMhxcR2ojabnXmTg/KuvxIaOHEQ0Mrv61To=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QQhQxC8h4K1EPQxLEQziN6cJLRLqfS5aDoXu7FjuWULS6+Dg+2688TGxrGVeZWhuL inEvMKMM7deOAPnud2GUmLzPa/tS0GaG8qCz9Qk1T9EVaJPJ1TLdtU0IShhRwuwsor 2E5Ilkj8gZHOq+7lPd3PbHZcDdjw2aokrYgy3DW0= Date: Mon, 30 Nov 2026 14:45:47 +0900 From: Laurent Pinchart To: Dave Stevenson Cc: Sakari Ailus , Jai Luthra , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alexander Shiyan , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Krzysztof Kozlowski Subject: Re: [PATCH v7 00/18] Update imx678 to act as a common Sony Starvis 2 driver. Message-ID: <20261130054547.GH4286@killaraus.ideasonboard.com> References: <20261029-media-starvis2-v7-0-b33a1332fdfc@raspberrypi.com> X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20261029-media-starvis2-v7-0-b33a1332fdfc@raspberrypi.com> Hi Dave, Overall the series seems fine. I've replied to some patch with miscellaneous small comments. Would you send follow-up patches to address them ? I can also help if needed. The only part I dislike is extending the sensor type identification to all models. I'm fine with the feature, but it needs to be approved in the DT bindings first. On Thu, Oct 29, 2026 at 02:18:21PM +0000, Dave Stevenson wrote: > The IMX678 (8MPix) driver has already been accepted into the > kernel. > > Whilst preparing a patchset for IMX662 (1080p), I observed such > commonality between the two that it seemed sensible to attempt > a common driver rather than submitting a separate IMX662 series > again. > > On checking my box of sensors, I found I had an IMX675 (5MPix) as > well, so that has been incorporated. Subsequently I was able to > add IMX585 (8MPix) and IMX832 (1080p). > > The Sony datasheets are rather lacking on the limits for HMAX. > They list HMAX (and VMAX) values for nice round framerates at > a number of the supported link frequencies. > These limits have been adopted for IMX662 and IMX832, but for > IMX675 and IMX585 they have been determined empirically by > observing values of HMAX that start to introduce image issues. > > Now cleaned up over the RFC V1. > > Signed-off-by: Dave Stevenson > --- > Changes in v7: > - Made imx676_variant_def static (Sashiko and Patchwork) > - Added description of imx676 to the list of supported sensors > at the top of the driver > - Replace "generic" in patch 1 with "common" as there is a > requirement for customisation per sensor (Sakari). > - Link to v6: https://lore.kernel.org/r/20261022-media-starvis2-v6-0-374343f55fd3@raspberrypi.com > > Changes in v6: > Addressing Sakari's comments: > - Updated CAMERA SENSOR DRIVERS in MAINTAINERS > - Used tabs instead of spaces in register defines > - Added myself to MODULE_AUTHOR > - Added Raspberry Pi Ltd to Copyright header > - Reworded dtbinding description to avoid needing a paragraph > - Removed unneeded parentheses and assignment to ret in link freq > patch. > Sashiko: > - pm_runtime accounting error. > - REG_INTERFACE_SEL and the mono ID register have moved for IMX585. > Now parameterised. > Jai: > - Added IMX676 support. Copied from https://lore.kernel.org/linux-media/20261022105623.4179467-2-jai.luthra@ideasonboard.com/ > with minor fixups due to the above changes. > - Link to v5: https://lore.kernel.org/r/20261019-media-starvis2-v5-0-eef935347ce9@raspberrypi.com > > Changes in v5: > Fix Sashiko issues that were present in V3 but it didn't report. > - v4l2_ctrl_new_int_menu failing for LINK_FREQ could avoid > printing an error. > - Make setting common_regs_written conditional on all cci_write > calls having succeeded. > - Please note that the checkpatch failure on the first patch is > a false positive. starvis2_of_match does have the sentinel, but > it's not shown in this patch as it's being renamed from > imx678_of_match. I'll report the false positive. > - Link to v4: https://lore.kernel.org/r/20261015-media-starvis2-v4-0-75fcdb4163f3@raspberrypi.com > > Changes in v4: > - Added Krzysztof's tag > - Made the variant_def structs static (sparse) > - Put the sensor back into standby after identify in case PM is > disabled (sashiko) > - New patch to enable pm_runtime_autosuspend. > - Not fixed a Sashiko report of potential use-after-free with > v4l2_subdev_cleanup vs v4l2-ctrl_handler_free. It is a > pre-existing issue in imx678, and many others are sharing the > same pattern. There is no immediately obvious solution as the > active state is sharing the control handler lock, so the > suggested inversion of operations will use a destroyed mutex. > https://sashiko.dev/#/message/sashiko-outbox-171674%40kernel.org > - Checkpatch error "missing sentinel in ID array" is a false > positive, confused by the comment in the middle of the array. > That comment was pre-existing in imx678. > - Link to v3: https://lore.kernel.org/r/20261014-media-starvis2-v3-0-c958362b5d06@raspberrypi.com > > Changes in v3: > - Sorted compatibles list (Krzysztof) > - Corrected exposure limits for imx585 via parameterization (Jai) > Issues identified by Sashiko-bot > - Fixed the Kconfig for VIDEO_IMX678 still depending on GPIOLIB > - Removed the remnant build rule for imx678.o > - Fixed sending the common registers if CONFIG_PM is disabled. > - Fixed potential NULL deref and lockdep in link freq handling. > - Fixed the duplicated active_area definition for imx585 > - Link to v2: https://lore.kernel.org/r/20261013-media-starvis2-v2-0-3670722d250a@raspberrypi.com > > Changes in v2: > - Switched from an RFC to a patch set. > - Add the dtbinding changes. > - Added IMX832 and IMX585. Tested and fully working on all 5 modules. > - Updated 2 lane handling so that the higher link frequencies achieve > the maximum frame rates. > - Adds a patch that corrects the minimum exposure time. > - Allow userspace selection of all link frequencies specified via DT > (makes testing all the link frequency options far easier). > - Link to v1: https://lore.kernel.org/r/20260805-media-starvis2-v1-0-91e8e4eae44f@raspberrypi.com > > --- > Dave Stevenson (17): > media: imx678: Rework into a common Starvis 2 sensor driver. > media: sony-starvis2: Reorder link frequencies to remove lookup > media: sony-starvis2: Always program the sensor in window mode > media: sony-starvis2: Parameterise the configuration to allow for other models > media: sony-starvis2: Rework 2 lane support for higher link freqs > media: sony-starvis2: Allow runtime control of link frequency > media: sony-starvis2: Correct the exposure range > media: sony-starvis2: Put module into standby after identify > media: sony-starvis2: Use pm_runtime_autosuspend > media: dt-bindings: sony,imx678: Add other Starvis 2 family members > media: sony-starvis2: Add support for IMX662 > media: sony-starvis2: Add support for IMX675 > media: sony-starvis2: Add support for IMX832 > media: sony-starvis2: Only update bits for window mode > media: sony-starvis2: Parameterise exposure min and step > media: sony-starvis2: Parameterise the mono ID register > media: sony-starvis2: Add support for IMX585 > > Jai Luthra (1): > media: sony-starvis2: Add support for IMX676 > > .../devicetree/bindings/media/i2c/sony,imx678.yaml | 44 +- > MAINTAINERS | 15 +- > drivers/media/i2c/Kconfig | 19 +- > drivers/media/i2c/Makefile | 2 +- > drivers/media/i2c/imx678.c | 1447 ----------- > drivers/media/i2c/sony-starvis2.c | 2568 ++++++++++++++++++++ > 6 files changed, 2628 insertions(+), 1467 deletions(-) > --- > base-commit: 27285b099fbc5cb2ae3aef20f3bbd7b3c88b3005 > change-id: 20260804-media-starvis2-65a5bc405b74 -- Regards, Laurent Pinchart