Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp1075603rdb; Fri, 20 Oct 2023 07:51:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFs9nYIP1hszRwSbSo51gM3SshkEilMeE7OBScW2hz4NqdQHU8jfJ19HJX8QDiyzjIMnpRW X-Received: by 2002:a17:902:d053:b0:1c9:c6f4:e0c3 with SMTP id l19-20020a170902d05300b001c9c6f4e0c3mr1815620pll.62.1697813460649; Fri, 20 Oct 2023 07:51:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697813460; cv=none; d=google.com; s=arc-20160816; b=b5jT7xmsjEPpV8rOVTKvvsZSDogprrtJgFHeFEaSkPFYVs0emDx8RRK/UVBjEfaRDr v3rMM5XTAuGzV5GbCq6Kpb2PAq9iIbtWfMq3BNvkF4FBkeLeud1j2FXYxB9wJGNhMqJC UbgSBGvIhNBoCHCICYe8InAjy4sDZDgOgKB0HeLvqqV6yxHTSSW4dNjCytShsFkctVKM yVIGLvusFl0STelBf6pl/WRDf6mIyTeApRgXrX1UbSopuItaKDsQWtHPNReu/ylTqkWl Sw7LelF39UtLeFCdbXuTfIUbvGexkjaILcUGKQNfvinN9xUxeMNGei4B3vayP7jz7Ilw yh3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Q6l4f3OM08x/XGlqxRI/cSdCQ2J6UlNht2wFwXCVBUs=; fh=WaqwKbNI6ggyvaUQ85iAclRCevgklJhqArlb3px6pNU=; b=oPCsDXmklsV9j2IBz8cMyercqzTbbihgAQ/hTqhwbf108ZzOLFib69rcVrXuStm+dM HmPKpBjjQGb98pFLFZJBqCCEMVQPge79ETTA0EwHXjsPmq9Ko/FFlekurjS0Heu/A/ie oAzpZve4L9tULJB/+upWrnnopkaYeMjpQBwZRHwI1t9SZ2jN0BO/E0YeRO4q/IJUPVaP ZFQoUTfAxrLsa7JHcA1BLSR5ecQ7SSffaLt0BFiE61/DiIMLuctjDYwRFE4lR768JSFJ ourirIOPo4v1R4hEMA875XFOv9KuznVX0l627c19qhlKzIbshwGO69oHcFWT0BnHS9KR ibAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id l12-20020a170903244c00b001bdd35033efsi2152295pls.374.2023.10.20.07.51.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 07:51:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 0F71780A1363; Fri, 20 Oct 2023 07:50:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377634AbjJTOuJ (ORCPT + 99 others); Fri, 20 Oct 2023 10:50:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377603AbjJTOt4 (ORCPT ); Fri, 20 Oct 2023 10:49:56 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 551A0D5F; Fri, 20 Oct 2023 07:49:54 -0700 (PDT) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.2.0) id 36c620263d67cc07; Fri, 20 Oct 2023 16:49:52 +0200 Received: from kreacher.localnet (unknown [195.136.19.94]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cloudserver094114.home.pl (Postfix) with ESMTPSA id 58FFB667008; Fri, 20 Oct 2023 16:49:52 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI , Sakari Ailus Cc: LKML Subject: [PATCH v2 0/6] ACPI: scan: MIPI DiSco for Imaging support Date: Fri, 20 Oct 2023 16:33:56 +0200 Message-ID: <2187487.irdbgypaU6@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrjeekgdektdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpeffieeutdeikeevkeelieeigeehhfevgeetgefhffdvudeufedugeekueekffffvdenucffohhmrghinhepkhgvrhhnvghlrdhorhhgpdhuvghfihdrohhrghdpmhhiphhirdhorhhgnecukfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepfedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehsrghkrghrihdrrghilhhusheslhhinhhugidrihhnthgvlhdrtghomhdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhr gh X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 20 Oct 2023 07:50:29 -0700 (PDT) Hi Folks, This is a new revision of https://lore.kernel.org/linux-acpi/13276375.uLZWGnKmhe@kreacher/ which was reported to have issues and it took time to revisit it. > The main points from the original cover letter are still valid: > > The general idea is the same - CSI-2 resource descriptors, introduced in > ACPI 6.4 and defined by > > https://uefi.org/specs/ACPI/6.5/06_Device_Configuration.html#camera-serial-i > nterface-csi-2-connection-resource-descriptor > > are found and used for creating a set of software nodes that represent the > CSI-2 connection graph. > > These software nodes need to be available before any scan handlers or ACPI > drivers are bound to any struct acpi_device objects, so all of that is done > at the early stage of ACPI device enumeration, but unnecessary ACPI > namespace walks are avoided. > > The CSI-2 software nodes are populated with data extracted from the CSI-2 > resource descriptors themselves and from device properties defined by the > MIPI DiSco for Imaging specification (see > https://www.mipi.org/specifications/mipi-disco-imaging). > > Patches [4,6/6] come from the original series directly, but the other > patches have been changes substantially, so I've decided to re-start patch > series versioning from scratch. The v2 addresses at least 3 issues found in the v1 by code inspection: * A port_count field incrementation was missing in acpi_mipi_scan_crs_csi2(), so its value for all of the devices having CSI2 resources in _CRS was always 1 (and it should be equal to the number of valid CSI2 connection resources). * Some acpi_mipi_crs_csi2_list members could be freed prematurely, so they were inaccessible when extract_crs_csi2_conn_info() attempted to access them. * A check of remote_swnodes() against NULL was missing, which could result in a crash in a case when the swnodes memory could not be allocated for some acpi_mipi_crs_csi2_list entries. Apart from that, it rearranges the code somewhat to make it easier to follow and to avoid premature freeing of memory in it in general and the new file added by it is now called mipi-di.c (instead of mipi-disco-imaging.c) for compactness. The series is based on current linux-next. Thanks!