Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp432515lqp; Wed, 22 May 2024 08:42:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW3+MAzLA73Cin9tNmv7BMFBZd0SONXpsDoNUxpLi1UetLTofRZtcfVSyuS9XmU0Xu7EkAdliTKv4GVrez0SXiRQ4CAgrvp8lurRjV3Gg== X-Google-Smtp-Source: AGHT+IH5atxjUaG0rjnCugURCQRedZ4hkAJ0zF0qJXrasOyv75r3mk8VMuwZuj4D8s8/aIze/8s4 X-Received: by 2002:a05:620a:458c:b0:790:a960:28f4 with SMTP id af79cd13be357-79470f0c0e7mr2261351585a.25.1716392546499; Wed, 22 May 2024 08:42:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716392546; cv=pass; d=google.com; s=arc-20160816; b=WOBiB2e1UB/vljeqqHUwTvs9EsEPWHA8Izdz5nATlP/NZg9YoLa7fm+JtfXQ0yHRFP 1qvlCg3DW+phvhecZVOv0+ZDt5WNteMlEhza2MbEaJHV/dPQUKORqytRgGaRnMXA4BRJ oMhaCFwIEYG87iTlTUlWVqRGDfSFXCa3wNey5IiiiKaxAKZ8nzJK/mPaNDCJ7WUllBXK r/meJ/hHHsceUdTB9IOT/QViOJO6i/wR0a2zsTgPjHPViRATU4VX5mowjGZvbwS2slSc XHSVyTqwKBwx9vcFhVmLKQANTbjvD5vJOtXB4/HV+nj5PBsnXFHtoKmk8XhQoKAgYcHD w4Tw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=KBDtk6TIBungIOkHXA0vyva7OyFhlYloboYY4DgWmyE=; fh=IGmTu6MlF2PIwbeznWCZUNoLhN8eR573/AdV+S96jJA=; b=iIOWn1CGnmH5aP6difF12h4QvnQ7p5/gIe45gGwhefbGT3v6syDYsqMO1Nx1gMKwja b8CLD4Mm5J3sLS8HVSGx58LOfCKk605DSNvJINrnQcAKu/+xAkxgNYCU47W01tL1Ul4z DZDZ7vzQD0Qiv3gnhwo3aJXy1XbfcShA7uo3Kw8lIk9nOOfbXJvQ3wR7LOSRBGsjwXh0 z28SaFHBFlB3QYuXx6HHF0Id1PMX2pptWqoOZp13AK+35jwT3k0pFyzgExDzbDFTwTco 77zvZjaY5oaC1Rb2cmY2q10lRVWZ9xmQlHogxWGcA/RaXEUfNn57SU9De9BbM3WQseVc M/pQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UucpckXE; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-186187-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186187-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-792bf33b2d4si1279685a.403.2024.05.22.08.42.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 08:42:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186187-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UucpckXE; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-186187-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186187-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 22F231C21F0A for ; Wed, 22 May 2024 12:04:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 35FAA13D60E; Wed, 22 May 2024 12:04:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="UucpckXE" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (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 EE2CB2E419; Wed, 22 May 2024 12:04:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716379456; cv=none; b=b+vIseNORUMq39heqU6WCO6XEnuzJcbY780/ce1WL/5+0nrY7J+qwubADi2Gf2wo3vawFrcU06ts7hZ9ptke4x7R3Ie5TZPXNCC0BcuGrcHF9oM29XkTvom+4AsvOsAA+K2IPljcBeY5XgITjfEvX6ZMBVuFOyOEvJRaU0z3MEo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716379456; c=relaxed/simple; bh=aYyVv3xyc7WpUrD4DYcfbWhn6/SYDmpkIQ+qEZAfycI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mazstfnk0DMxJ/0l5423P81LnwFLvVoyVuZE83BF3ra3+BkYgP6eVaqPUg7ZxYgGOEFb5koJkTf8+3urAin91CfUYh/Kjwtq9gBXIxV2x1tzNNqC5pZtIq3ADz/9pf0sdKTOYdg2orcL490vVeAbJ9LIqQD1K+wWsNQgyDvkV6g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=UucpckXE; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716379455; x=1747915455; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=aYyVv3xyc7WpUrD4DYcfbWhn6/SYDmpkIQ+qEZAfycI=; b=UucpckXEdk7xrW7Skg/ZeNn2IN/OAqtAPfIgDk6bKwYeEmHCmQ7A6Cd+ KmnPDeHt+MBtinRtQDwvexZHpBl29otuBEyTdu/UKglmlUyfm/lG5Xd75 ztPwTFA77npW3FjK1xUCyulkFR+vIjBckRu3eCM7WvU77oAuaiZHQA0F6 boZnVyCTCgdwMWu72ns8I3T1+of7Bj8S0k/yTo9y0qdinsg5hF5un+7Rq RZVJ/bRcXA02ocwtADskvHU6coT0/fdDyAOo7uZ3JN2KalkregCTNBx14 /LPHkAuUesST9MrzjX+FIPWpfygpTcLud45vC1/IYAAb5/ykbdOxWBmya A==; X-CSE-ConnectionGUID: iqplMzPbQJ6Y+q3LQgXEvg== X-CSE-MsgGUID: 5JevbbASRGOgAKB85+n6ww== X-IronPort-AV: E=McAfee;i="6600,9927,11079"; a="38008330" X-IronPort-AV: E=Sophos;i="6.08,179,1712646000"; d="scan'208";a="38008330" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2024 05:03:42 -0700 X-CSE-ConnectionGUID: AoWu/YYFRCSNZq9VnTjePw== X-CSE-MsgGUID: RJJl0RkXRxemNU4yKjFDNA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,179,1712646000"; d="scan'208";a="64490169" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2024 05:03:40 -0700 Received: from kekkonen.localdomain (localhost [127.0.0.1]) by kekkonen.fi.intel.com (Postfix) with SMTP id 020C011F82A; Wed, 22 May 2024 15:03:37 +0300 (EEST) Date: Wed, 22 May 2024 12:03:37 +0000 From: Sakari Ailus To: Hans de Goede Cc: Andy Shevchenko , Dan Carpenter , Bingbu Cao , Mauro Carvalho Chehab , Daniel Scally , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH v2] media: ipu-bridge: fix error code in ipu_bridge_init() Message-ID: 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=us-ascii Content-Disposition: inline In-Reply-To: Hi Hans, On Tue, May 14, 2024 at 05:38:45PM +0200, Hans de Goede wrote: > Hi, > > On 5/14/24 5:21 PM, Andy Shevchenko wrote: > > On Tue, May 14, 2024 at 02:33:31PM +0000, Sakari Ailus wrote: > >> On Fri, May 10, 2024 at 06:43:31PM +0300, Dan Carpenter wrote: > > > > ... > > > >> Neither IPU3-CIO2 or IPU6 ISYS drivers should be of any functional use > >> without sensors. But the power states of the devices could be affected by > >> this: the drivers should power off these devices but without drivers they > >> maybe left powered on. I haven't made any measurements though. > > > > FWIW, Hans mentioned AtomISPv2 case with somewhat 7W consumption on top of > > the idling machine. That's why we have a stub driver in PDx86 exactly for > > the purpose of turning it off when not used. > > I'm not sure if I ever mentioned the 7W, that seems a lot. But in > the atomisp case the SoC will never reach S0i3 when the ISP is not > properly turned off. And in this case the ISP is special and just letting > PCI / ACPI put it in D3 is not enough it needs some special writes on > the IO-Sideband-Fabric to be turned off. > > I don't know if something similar applies to the IPU3 / IPU6, but > the bridge code is used by the atomisp code now too. So at a minimum > if an error gets returned when there are no sensors then this must be unique > enough that the atomisp code can check for it. Maybe -ENODEV ? -ENODEV is also used for a number of different conditions. Different error codes are also returned by functions the ipu bridge calls and they seem to be passed onwards as-is mostly. Maybe add an argument to ipu_bridge_init() to tell whether to fail if there are no sensors? -- Regards, Sakari Ailus