Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp683432lqp; Wed, 12 Jun 2024 13:00:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXmxRb98R086lh9C4A5/rvawElLt1lCjay93rSxAmBdK5YG7N7QOlLQo3ruA0i/z0UJSPgAkf1Lyz0yxwqkbsMtb67WlUayZE1dCXRmzg== X-Google-Smtp-Source: AGHT+IF5cXvGP3UzswhZpf2wJf2ix9Lr4Q3js4eUawcEqGmzg/CZmDtUTHCryAWy5JOqG8imAlYl X-Received: by 2002:a05:6808:1404:b0:3d2:1b0b:e88f with SMTP id 5614622812f47-3d23e040411mr3357298b6e.30.1718222449829; Wed, 12 Jun 2024 13:00:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718222449; cv=pass; d=google.com; s=arc-20160816; b=MJfL4cWKqx4Zc9PHNFVt7T5UQQyb8ElHum87SLraLoKzGPxPqJ9FzufXyRMGimoXQI qbBIYf9kSAo6Ga7uywOxuLX2NyesigyOzBaKejOm1EaAvDyKZ6CJmsw8MsJMYHZ3BcYT JhxT3s4Ue2pLKp7O3j5gms+YYwOsfNkt9U4Z3kYA1snRmlRlMKtEe04BJykb8GmN+UbZ I6BdIU6sagxzVEbi/C+YQsHuYrGEq9KoR7mqa2J2XBI4M7i/ea4GqpjBkvdwrEDxNlVY KpnC3V7w8yMVl3PHUSUZzUouC1P4RSuhYb7LDiahLjaQ5k6UhC5Qe2lRKEbOLdt5R3W5 fmAg== 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=//OryvwkhC6jaymvWEgaj3I71K7ky6ubspTXT280LP0=; fh=VyEiD8tzgp4u0qeCViD2Nz6N757Wonf4kB5AX64E4Mg=; b=ndRAo/HPuchZuoxOaFVHKNA2/ypdjBF1jw5STGz7jEu8hUFVL5Z9dymYTNEf0friwG 5QZuExSu4dSyMqve+NQvTQg+AWRFcmwLXPps7anayt+kp8D+wzandqp+nmYUs91YLIy5 FFcZ0SrkHydtRj2KKunw8ifVesOwqoxMM/sFnmAw27Mj2Y8ZHTNvLEPMWVpbY6itVCrn Ms8HM3fDF7cAvsr6JLUIEjNRndA98vDmNkRlvyEQQpFWlwE4QD6QbNxP/2QEMneXcUAz kB84qbIaRqksh4TB1vivPNdh31RIWINcatBRrRf0lnsBBMvducLZ0K7lw1NoYhFGcvLm 66XA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=MRYSh+uT; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-212183-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212183-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-44159098909si24822231cf.674.2024.06.12.13.00.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 13:00:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212183-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=MRYSh+uT; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-212183-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212183-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7A1341C226DC for ; Wed, 12 Jun 2024 20:00:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9379D84A4B; Wed, 12 Jun 2024 20:00:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="MRYSh+uT" 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 D0E68282F7; Wed, 12 Jun 2024 20:00: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=1718222437; cv=none; b=l3ftX4kx1rTHqFcU3b7k6fZcrJFcDJj7y6ZC6v0IZrxnwq4dwkQP2N+4v+h25RPIkjQwayC6+BhOSQOFQG8dgMAP/FYmer02lUixXz43RuRB1JPWUufhu27K/mn7ssv1uFfLG7VPx3sdNXUkiD+culzUMZJLIaA9x6dID3Mj2no= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718222437; c=relaxed/simple; bh=r6UKj1YTs/BxhHFO//uwGY1rsOihH/uBihwuOdyGH/U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QkvLEVweytqON9xiERJ+eVR6waMKICFOWmeuUVDN2FTDa9f5IOjUOACttXJjvGAujmLeNWB3SP3Kxzo8Dtf8prbA95sxSyOlza1yJ8FyPwFy7jkgLIbc8JZdyfCkoT2d7cnk3JaLGdZW1IasI9C4HihaZzH23ekp25U41BHT3c8= 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=MRYSh+uT; 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 54309230; Wed, 12 Jun 2024 22:00:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1718222420; bh=r6UKj1YTs/BxhHFO//uwGY1rsOihH/uBihwuOdyGH/U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MRYSh+uT1ng2i6Y82++s/bC6+d+Zssg77Js1G8bZ90OxtbAVOPfWyNfmpVy8M5gIM Bj72uuvAXPqavtwGwzUOMfaU9yIJDhLQUSCmbvSKlMH90fnKjUtqJK0l8FxB0iboAn L+cqt8YeAHmjFguN1Kpx1O8+tfBZL8yi5YTr1c24= Date: Wed, 12 Jun 2024 23:00:12 +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: <20240612200012.GP28989@pendragon.ideasonboard.com> References: 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 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. And now that I wrote that, maybe that's what we should hope for, a major recall of machines from Dell or Lenovo, whose financial cost would give an incentive to fixing this mess in the future... *sigh* > Which unfortunately is related to whether or not Windows uses those data. > > > We can support systems that contain correct DSDT description of cameras > > without platform data. I was, until recently, only aware of Dell XPS 9315 > > that has incorrect camera description and that based on recent findings > > seems to extend to other Dell systems with IPU6 (Hans's patches have the > > details). > > > > Still this is not a reason to break systems that have correct camera > > description and expect the users to report them so they can be listed as > > such. > > Well, what do you mean by "break". I thought that platform data > needed to support them were built into the kernel, weren't they? > > > > > On laptops shipped with Windows some additional information is also available > > > > from ACPI via custom objects but a lot of information is just hard coded into > > > > the IPU bridge as well as the INT3472 driver. > > > > > > Well, that's how it goes. > > > > Yes, but is it desirable? > > No, it is not desirable, but the way to address it is to convince the > Windows people to stop doing this and use standard-defined data from > the ACPI tables instead. It cannot be addressed by Linux unilaterally > trying to do the right thing, because there are OEMs who don't care > about Linux. -- Regards, Laurent Pinchart