Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp747420lqe; Sun, 7 Apr 2024 01:52:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXbREiQ9Z8Pp9K5Wk3yx+9K/XAHIHNfk6bjHGxX3m15OHJGQZe8hMLfSxmp93nH/jhEOwMmXLpyQjkcS6pW5ys0PMaC/ttJOxWgEfr7ww== X-Google-Smtp-Source: AGHT+IFSo4ls6O4elkiUSCqo95J4Q8uS/w4mnw4X8qDAEyR0imp8+2lr/De1dlSkdfvV/Qe8hiQ+ X-Received: by 2002:a17:906:883:b0:a47:11c1:92d7 with SMTP id n3-20020a170906088300b00a4711c192d7mr4041149eje.69.1712479941752; Sun, 07 Apr 2024 01:52:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712479941; cv=pass; d=google.com; s=arc-20160816; b=p8x5g/XUVPzjkqzisC7Eb4QVuiyEW08xQjYrVoYtpXy7WOH/TQmYOrtUkh5bYpEx0M GHhcgtCMQZKTkw/IofrgbbE0kbarGyHDwLaXXUpbHgI/cOZ1wbwuCqNuv2WY50Tc/Fj/ O61axQxDU2+/lLtg85CHKXw6ao4D/V8AQQqaddcrUmQJ054kcpSIey4rse+N7BEwF9hp XTXbJogDim5hqX9l6MLGTyYOszFFzinHxt9ES/sZFDyItLAMvXTaK5umnPMFV6pVcPwa OFSKOyJda4YWO9uJl3ciRZPH2GCmSXEKnOawzQTT90eACfMFFI9HxO9tRuR3bQMm1UGN uyFA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:message-id:date:to:cc:from:subject:references :in-reply-to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=Dw5ycQrDuf69if5+rSZ5gXGucMhVN98h7vwjt6LgZag=; fh=VJ+XDqjQGRkDdCTjifp4kT6iT11YBrEZC5G7zji9sCo=; b=ZGn3o4ruLs1MgbtAVrkO4NQ+bdA931BrUv4J/zwg1hBq52BXW45RP+yL/LiCTx8H7y ikK5KK+3VSuUfYfF2la/PG61tpxz/iolFVkow/nLVUqdZrz30St1CGhvIIjq8ZmV4Yjj DKMEA0Qgp27+gwJpAErNUI0JLHE6ufRWS2GmMCw5zurAIUe/MWAkxbOEHt1GR3Opnn0e iSPKOW7o1xQDLD5BJkGO1CUN+C8gIoKRQX1B5GF+ywKIozDTypb842ZtKvsj0pVtA82l 6LLmgsLL4WzH1lHhvJSITN1lS5zhpvcBkDf1ksBpbs6oYW3EcNK+7UXE/XR8aqMSED6H 4Sfg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=cKvqVD4f; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-134265-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134265-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id r24-20020a1709067fd800b00a4e1aa04567si2479393ejs.772.2024.04.07.01.52.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Apr 2024 01:52:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-134265-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=cKvqVD4f; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-134265-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134265-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 388001F209A5 for ; Sun, 7 Apr 2024 08:52:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3633412B7D; Sun, 7 Apr 2024 08:52:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="cKvqVD4f" 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 E8BAE107B3; Sun, 7 Apr 2024 08:52:05 +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=1712479927; cv=none; b=LGPOnuTZvcsttPClF3qSfe9CHbX2+rS9mh8ZNaDznJ07/W4ZiaLiTOEkOs9aBXi9mj/pTMu/LQUWHatmzoEZQHFSlpdheoPsOLwXY4EBUHYUh+kyDelDRdqS1CIsCu+pOj0oj59Grtr0F52cxbqZrgZ9H1zGA2jnmfJ7jTJ61To= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712479927; c=relaxed/simple; bh=r7Qjy3TPkvWrgNpaqwL72EEpzX38+OfnnzqNs/akTiI=; h=Content-Type:MIME-Version:In-Reply-To:References:Subject:From:Cc: To:Date:Message-ID; b=MNOxBta7VAIsw7RxWWIaVxRyyfRkKoZJobsTACkPzld9Ho14KRjrXoCmT3MJ501xjQ4DEPRhs8kW3SElj9WEMJDDTIewAiQ2hNu1DM6sD7dF96mH6tHAHkV5eI/kV1s/pJjx6prAkPjxBxdUDa1mQGTtjClKbCr4qLa7u7857Xc= 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=cKvqVD4f; 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 pendragon.ideasonboard.com (aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net [82.37.23.78]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id AD23F667; Sun, 7 Apr 2024 10:51:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1712479877; bh=r7Qjy3TPkvWrgNpaqwL72EEpzX38+OfnnzqNs/akTiI=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=cKvqVD4fP55q72BRHq73KArX6IoaIGtlakDzokDVlDNmdXEA/g0No7pvDzmnkBTXT gII3jKfmZQlwvbwuy0uAS0Q89j6l2qiHdAfr2kRzrRSBhORCgiAZWLhNZjmpO+7RmH ZRbt2rl1oera26jQbpR2dpxI5fx6gMnHl9Y9Gsjg= Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <803b0bd3-e615-41c1-888e-69b6ecca0b8a@luigi311.com> References: <20240403150355.189229-1-git@luigi311.com> <20240403150355.189229-10-git@luigi311.com> <803b0bd3-e615-41c1-888e-69b6ecca0b8a@luigi311.com> Subject: Re: [PATCH v3 09/25] media: i2c: imx258: Add support for running on 2 CSI data lanes From: Kieran Bingham Cc: linux-media@vger.kernel.org, dave.stevenson@raspberrypi.com, jacopo.mondi@ideasonboard.com, mchehab@kernel.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, sakari.ailus@linux.intel.com, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org To: Luis Garcia , Pavel Machek Date: Sun, 07 Apr 2024 09:51:54 +0100 Message-ID: <171247991454.2374960.14379287208228554950@ping.linuxembedded.co.uk> User-Agent: alot/0.10 Quoting Luis Garcia (2024-04-06 06:25:41) > On 4/3/24 12:45, Pavel Machek wrote: > > Hi! > >=20 > >> +/* > >> + * 4208x3120 @ 30 fps needs 1267Mbps/lane, 4 lanes. > >> + * To avoid further computation of clock settings, adopt the same per > >> + * lane data rate when using 2 lanes, thus allowing a maximum of 15fp= s. > >> + */ > >> +static const struct imx258_reg mipi_1267mbps_19_2mhz_2l[] =3D { > >> + { 0x0136, 0x13 }, > >> + { 0x0137, 0x33 }, > >> + { 0x0301, 0x0A }, > >> + { 0x0303, 0x02 }, > >> + { 0x0305, 0x03 }, > >> + { 0x0306, 0x00 }, > >> + { 0x0307, 0xC6 }, > >> + { 0x0309, 0x0A }, > >> + { 0x030B, 0x01 }, > >> + { 0x030D, 0x02 }, > >> + { 0x030E, 0x00 }, > >> + { 0x030F, 0xD8 }, > >> + { 0x0310, 0x00 }, > >> + > >> + { 0x0114, 0x01 }, > >> + { 0x0820, 0x09 }, > >> + { 0x0821, 0xa6 }, > >> + { 0x0822, 0x66 }, > >> + { 0x0823, 0x66 }, > >> +}; > >> + > >> +static const struct imx258_reg mipi_1267mbps_19_2mhz_4l[] =3D { > >> { 0x0136, 0x13 }, > >> { 0x0137, 0x33 }, > >> { 0x0301, 0x05 }, > >=20 > > I wish we did not have to copy all the magic values like this. > >=20 > > Best regards, > > Pavel > > =20 >=20 > no kidding, magic values everywhere.... it makes it annoying > for me to move things around because they all start to look > similar. Down the line we added in more defined names so its > not as bad but still its bad lol. This series converts the defines to names, which is great. It would have been nicer if the series converted first, but I know the history here means you have done the register naming on top of existing patches - so I don't think there's a requirement to change the ordering now. But I see new drivers coming in with register tables. I hope we can start to apply more pressure to driver submitters to use higher quality named register sets in the future, now that we have a greater precendent of sensor drivers 'doing the right thing'. Sets of tables like we have are basically a binary blob stored as ascii and make maintainance far more difficult IMO. Maybe I should hit send on my comments on the latest GalaxyCore driver coming in that I hesitated on ... -- Kieran