Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp702865lqp; Wed, 12 Jun 2024 13:41:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCViSYXkF9RWevqxDFsjNznbqwYc0rHcfw3UKu+JE5o0lsmrtJ7/NK2canRA1XMjyqNRKgXs7daWcaxbmCai/l3mFMEnvBzLX84LNz1Qzw== X-Google-Smtp-Source: AGHT+IEMd9iUcy1rKmyKW4j3WM8JOXV0taHX/xpHT/K5wCTqI2vGVnKeu4GGyzWgMexZVJb/WiL3 X-Received: by 2002:a50:9f86:0:b0:57c:5f2b:b5a with SMTP id 4fb4d7f45d1cf-57ca9749915mr1919946a12.2.1718224911835; Wed, 12 Jun 2024 13:41:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718224911; cv=pass; d=google.com; s=arc-20160816; b=LtSpGUQPdfJ+o8LO89PY8FNoQ3Nv9qdQaI3+lW8R5ouuZRBEN+PSIX3BA2LZcPtW+g RRQBoVfSTwK3qRQMJ8SSa+zjUqqWSgAZB4kIRIMrAJv+3UAlwt+CmSu8W77pHSgDr2JU gg6RgaAJDB/1y5UUwkqbKtKjVf8VfO6CMszWMQKo+4TPjbJ8zJfppImQNnUreAGNM2Nf qe9JLNfHfF7g/RnxtQMeGwLaDUAE5dJTVrqYXBCjIsqKrbhxsvpv1cfewP1EZRrS4Cr5 TQmRpgZn/74ITDcymXi0sIHL3fejO4vXlHrTa2uzZrYhvkbPNZqLuWjxFJjj3fphsEq+ GvsQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=cL1sHsEX/fDrt8IXcmf5zXq4LUok1kmlNvATbOZ54Xc=; fh=VyEiD8tzgp4u0qeCViD2Nz6N757Wonf4kB5AX64E4Mg=; b=KHXLR8MIWKR2Y/g17/Hc2iQjwpEHjL55BKO3s6lZfT6sPPUuUhqCBPyrsrxtaZhXjo 2aWHIMnHtJ5USJVBSvkth7hfzkjXp0ow5hJfZdek3jTfipyg4z1LD/+LHC/tQ84NF9zT 9HmPCbrUl6WaGsDyZF7djoM/38Q5OcNZurmwJsjcMS26dbw4eoFzBu5XdGa0uI7gQTlY AaBiKzfUHB0FuCHjai88OarBqN8WAoDS3yMaP1GQ3pGLsbq9G37NNPrcgn0QEoJz9fCA OLHBxnSkU05u1zOrbRWInFIMFGDgTCqMREdtxHOizW7ulGmTqkAgoTLfU9nToyTrP+st 5sKg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=JtnpjQOV; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-212231-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212231-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 4fb4d7f45d1cf-57c74edafdasi4268870a12.205.2024.06.12.13.41.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 13:41:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212231-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=JtnpjQOV; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-212231-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212231-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 613BD1F21FA8 for ; Wed, 12 Jun 2024 20:41:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 920AA84FCC; Wed, 12 Jun 2024 20:41:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="JtnpjQOV" 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 1807684D39; Wed, 12 Jun 2024 20:41:35 +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=1718224897; cv=none; b=FD+jRkfWN9312zPND5YrFbXo3u+ZCIJ3kQn+EzzhoYLROcV85xxkMWikv1QMDPmi9gHH9a6opesIzQ9IjekrS2TKhXkgbwB+bDue6NJsCU1Fl6ZUHVaDL0e2AlZHfGss5DLv+E6GyGSD6PAs6xB+/By8DKC7y3EZfAXhNsK5Yws= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718224897; c=relaxed/simple; bh=iksz8x0J+16o1rcdeXT1mVm0qNREjzh30WqMubfeTgI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DRBhXGv/Ni7ESboRFcq42ha4mZnBmqN3mxd+oxCdbNRhwzhHA7xbanAI0d5tlqPC3ynm11fmuV84mY5PIWgyGmTAUotlKZbqwV+opIgShe/c6KEkaNAjCViTV0qZL20ruCIqKn4BHTpYygIpR7Tt8VyZcB27Fqs+HbmsFQGRBsQ= 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=JtnpjQOV; 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 (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DB78A12E4; Wed, 12 Jun 2024 22:41:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1718224881; bh=iksz8x0J+16o1rcdeXT1mVm0qNREjzh30WqMubfeTgI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JtnpjQOVy2sLoaifEsK4xCzR24o0w82Tw4QpdFx7X5Z6WDWPm5piRH8BitafAQyoK YeQ0NrkbMmSoltft8qcVxQzpKXUNLvv5Mbturel1XhUKux1YacEWxMJPTQEd1CnXmC qDREB10+CTLfSv+fEt+Vxu9kZbg67c/g0fpCeVgY= Date: Wed, 12 Jun 2024 23:41:14 +0300 From: Laurent Pinchart To: "Rafael J. Wysocki" Cc: Sakari Ailus , Hans de Goede , Genes Lists , linux-kernel@vger.kernel.org, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, wentong.wu@intel.com, linux-media@vger.kernel.org, linux-acpi@vger.kernel.org, "regressions@lists.linux.dev" Subject: Re: [PATCH 1/1] ACPI: scan: Ignore Dell XPS 9320 camera graph port nodes Message-ID: <20240612204114.GV28989@pendragon.ideasonboard.com> References: <20240612200012.GP28989@pendragon.ideasonboard.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Jun 12, 2024 at 10:31:06PM +0200, Rafael J. Wysocki wrote: > On Wed, Jun 12, 2024 at 10:00 PM Laurent Pinchart > wrote: > > > > On Wed, Jun 12, 2024 at 08:50:57PM +0200, Rafael J. Wysocki wrote: > > > On Wed, Jun 12, 2024 at 8:41 PM Sakari Ailus wrote: > > > > On Wed, Jun 12, 2024 at 08:29:21PM +0200, Rafael J. Wysocki wrote: > > > > > On Wed, Jun 12, 2024 at 8:21 PM Sakari Ailus wrote: > > > > > > On Wed, Jun 12, 2024 at 03:06:53PM +0200, Rafael J. Wysocki wrote: > > > > > > > On Wed, Jun 12, 2024 at 2:47 PM Sakari Ailus wrote: > > > > > > > > On Wed, Jun 12, 2024 at 02:32:26PM +0200, Rafael J. Wysocki wrote: > > > > > > > > > > > > > I just hit the same problem on another Dell laptop. It seems that > > > > > > > > > > > > > all Dell laptops with IPU6 camera from the Tiger Lake, Alder Lake > > > > > > > > > > > > > and Raptor Lake generations suffer from this problem. > > > > > > > > > > > > > > > > > > > > > > > > > > So instead of playing whack a mole with DMI matches we should > > > > > > > > > > > > > simply disable ACPI MIPI DISCO support on all Dell laptops > > > > > > > > > > > > > with those CPUs. I'm preparing a fix for this to replace > > > > > > > > > > > > > the DMI matching now. > > > > > > > > > > > > > > > > > > > > > > > > DisCo for Imaging support shouldn't be dropped on these systems, and this > > > > > > > > > > > > isn't what your patch does either. Instead the ACPI graph port nodes (as > > > > > > > > > > > > per Linux specific definitions) are simply dropped, i.e. this isn't related > > > > > > > > > > > > to DisCo for Imaging at all. > > > > > > > > > > > > > > > > > > > > > > So it looks like the changelog of that patch could be improved, right? > > > > > > > > > > > > > > > > > > > > Well, yes. The reason the function is in the file is that nearly all camera > > > > > > > > > > related parsing is located there, not that it would be related to DisCo for > > > > > > > > > > Imaging as such. > > > > > > > > > > > > > > > > > > So IIUC the camera graph port nodes are created by default with the > > > > > > > > > help of the firmware-supplied information, but if that is defective a > > > > > > > > > quirk can be added to skip the creation of those ports in which case > > > > > > > > > they will be created elsewhere. > > > > > > > > > > > > > > > > > > Is this correct? > > > > > > > > > > > > > > > > Yes. > > > > > > > > > > > > > > So it would be good to add a comment to this effect to > > > > > > > acpi_nondev_subnode_extract() where acpi_graph_ignore_port() is > > > > > > > called. > > > > > > > > > > > > > > And there is a somewhat tangential question that occurred to me: If > > > > > > > the nodes are created elsewhere when acpi_graph_ignore_port() is true, > > > > > > > why is it necessary to consult the platform firmware for the > > > > > > > information on them at all? Wouldn't it be better to simply always > > > > > > > create them elsewhere? > > > > > > > > > > > > Simple answer: for the same reason why in general system specific > > > > > > information comes from ACPI and not from platform data compiled into the > > > > > > kernel. > > > > > > > > > > > > Of course this is technically possible but it does not scale. > > > > > > > > > > While I agree in general, in this particular case the platform data > > > > > compiled into the kernel needs to be present anyway, at least > > > > > apparently, in case the data coming from the platform firmware is > > > > > invalid. > > > > > > > > > > So we need to do 3 things: compile in the platform data into the > > > > > kernel and expect the platform firmware to provide the necessary > > > > > information, and add quirks for the systems where it is known invalid. > > > > > > > > > > Isn't this a bit too much? > > > > > > > > Isn't this pretty much how ACPI works currently? > > > > > > No, we don't need to put platform data into the kernel for every bit > > > of information that can be retrieved from the platform firmware via > > > ACPI. > > > > > > The vast majority of information in the ACPI tables is actually > > > correct and if quirks are needed, they usually are limited in scope. > > > > > > Where it breaks is when the ACPI tables are not sufficiently validated > > > by OEMs which mostly happens when the data in question are not needed > > > to pass some sort of certification or admission tests. > > > > We have to be careful here. Part of the job of the ACPI methods for > > camera objects is to control the camera sensor PMIC and set up the right > > voltages (many PMICs have programmable output levels). In many cases > > we've seen with the IPU3, broken ACPI support means the methods will try > > to do something completely bogus, like accessing a PMIC at an incorrect > > I2C address. That's mostly fine, it will result in the camera not being > > detected. We could however have broken ACPI implementation that would > > program the PMIC to output voltages that would damage the sensor. Users > > won't be happy. > > My point is basically that if that data were also used by Windows, > then chances are that breakage of this sort would be caught during > Windows validation before shipping the machines and so it wouldn't > affect Linux as well. > > However, if OEMs have no vehicle to validate their systems against, > bad things can happen indeed. > > Also, if an OEM has no incentive to carry out the requisite checks, > the result is likely to be invalid data in the platform firmware. We're exactly on the same page. The only solution [*] I can see for this problem is to get the Windows drivers to use the same ACPI data as the Linux drivers. * Another solution would be for OEMs to stop caring about Windows and testing their machines with Linux only, essentially reversing the current situation. Chances of this happening however seem even tinier :-) -- Regards, Laurent Pinchart