Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp537906rdh; Thu, 26 Oct 2023 08:50:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFje4R0Y1ctcMwCvKGacm/tQF4Q16TA5X3ud8RcoCqAyTMDB+Z4cA5Cj4xXswNmR+ShxBaD X-Received: by 2002:a25:7654:0:b0:da0:cea9:2b3c with SMTP id r81-20020a257654000000b00da0cea92b3cmr299051ybc.59.1698335458008; Thu, 26 Oct 2023 08:50:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698335457; cv=none; d=google.com; s=arc-20160816; b=Xp2tAAx6stsXVgteJgrH3xWVqxX2aoQylWpVnU1Rb/D83vbDBooQnb+vh6u70xxgHE ofn+l4pjSEd+cgYa6n9VdMzXJ11CmlaCGfiMMQwlRqI+8m+3B4WsnMznkBMeWDGsWDCA NgDGicboVwBO3DZWBl2Xouc1CflX0PgbxsAzDimz8rIVM3uFroGtF5+XWv1fJomAwKGT 6p8wFsGNS5AaEIaEmLoXWiErZV5CCKkAqBASP+fYtK0QLN98PIe4Ibsrfh+fwwYHCUAZ ZGa+vnOJ0lj6mi/F8plHnsY5NpQGrc87D+hLPE4zcMHJJFCoYV7kH9JpfaxxFI08WErl PItQ== 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:dkim-signature; bh=lSmLSLc0O5qJoQEWMuotYo96+8Yt2HHCvZl015/TvAc=; fh=EDIpuMICZLR0WVxMad9x0w3NcC1c7tvexkVv5l4gf40=; b=1J0obM4saJN7JqiHTsOf/TjAZdpSbTShF/u0gMfxlQzX1EUXx0ef8vcDHLf6tgDK8P zp86EK8C4+iJqvovbpFfVSj0AR2NWVNc1tfxgFr+kt1v224ai5bzmB05cVWVVVWt6HSP i6HleTuo0pYxgUiENzuUUoEvp+881gcIPYO726sYUmUqo/KrdsENlJD1aP1k5dcM9Ygs 54GFGgfX7rQj75M2jR7GpLCigYIBX4DFKCyCQKZLCelSECpEIfmxHq5cTsTH8KKL0OLG ejoEodqrM3bMOHlugB0NTuUO5qFW3kIlo704aA8pU5vTfCPcw0OuKAZDpub/oXPY4ZbO JEGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uBrNyJMh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id e195-20020a25e7cc000000b00da0cdea9b69si294082ybh.44.2023.10.26.08.50.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 08:50:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uBrNyJMh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A1D6B8217EF6; Thu, 26 Oct 2023 08:50:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345495AbjJZPux (ORCPT + 99 others); Thu, 26 Oct 2023 11:50:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230105AbjJZPuu (ORCPT ); Thu, 26 Oct 2023 11:50:50 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91BB51A6 for ; Thu, 26 Oct 2023 08:50:47 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2c515527310so14832061fa.2 for ; Thu, 26 Oct 2023 08:50:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698335446; x=1698940246; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=lSmLSLc0O5qJoQEWMuotYo96+8Yt2HHCvZl015/TvAc=; b=uBrNyJMhmnINkVfyU/5ikbl+vS/4VWt9jOtsQmM4pKjRXne/hodkk65wAWkKqsz5VO 91mwupiBlmhqnkpGKUDhW9udDUmyZDtVFpNWmYfXRmBANhlUkKCQl/7j+660f186d/T2 S2gjKm8eZkMU9yLV/E9PRDKKOT5bB9NPFCwKsPW9CpfXSlvbqpGRru/AeihwxBIm5N8r 8DRKvrms7EEgWZ4wEM7IpcHLXEIDIPOgzqf2X6AYI7YlZ9BlsNvYs7x6qSX5cqp/bw2e unmVAgIj25qcE04JBVVk1yxsNtTfQ2C9MB2jX4DDRnuYI6ajjL/+eFPmUuwQ5XGfVGoj RDaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698335446; x=1698940246; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lSmLSLc0O5qJoQEWMuotYo96+8Yt2HHCvZl015/TvAc=; b=beQiPXbsAg24aP6KTqacKBvOCHl1A0c+CLPJsxAAyj+WBn4rdcSdKFHkQnXnHLsP+p vOcUrmvJBJ25FlCC9ZVBc8gMHkXFzAoy20qc5yDhF88LWPHuFwGBuXcANOAh91uwUNQK klALGd6Yr9dUQ1o/Hwe7/lDPVeHLfprvgQrtHXeItyLp40CVaL4AYGR6DGKfh/OnvbxD hpFlbhQWxuLknot8d2a+y4OlkVjiDRlor8zmGesAflyKO47KDEnkc9Mc9kA1YfKRHZ91 DijnxjY5PpsuIoXglEptqXpEDpuc62PufPogsAyELXCmHkghtwfbaua/lF/e7wepFCEq fSxw== X-Gm-Message-State: AOJu0Yw+zbrgtbA0fwnEXoa5WLClQq8yssUq4rVNJu2NYYSXw71wVfW6 SqyYabjMEXHBecpSygAeTowm1w== X-Received: by 2002:a2e:3204:0:b0:2bc:b557:cee9 with SMTP id y4-20020a2e3204000000b002bcb557cee9mr12943284ljy.43.1698335445678; Thu, 26 Oct 2023 08:50:45 -0700 (PDT) Received: from sagittarius-a.nxsw.local ([37.228.218.3]) by smtp.gmail.com with ESMTPSA id m28-20020a05600c3b1c00b003feae747ff2sm2938289wms.35.2023.10.26.08.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 08:50:45 -0700 (PDT) From: Bryan O'Donoghue To: hverkuil-cisco@xs4all.nl, laurent.pinchart@ideasonboard.com, rfoss@kernel.org, todor.too@gmail.com, andersson@kernel.org, konrad.dybcio@linaro.org, mchehab@kernel.org Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, bryan.odonoghue@linaro.org Subject: [PATCH v2 0/5] media: qcom: camss: Introduce support for named power-domains Date: Thu, 26 Oct 2023 16:50:37 +0100 Message-ID: <20231026155042.551731-1-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 26 Oct 2023 08:50:56 -0700 (PDT) V2: - Incorporates Konrad's suggestion re: removing 'id' - Adds RB - Konrad - Adds in a flag to indicate if a VFE has a power domain. As I rebased this series I realised we had some magic indexing for VFE v VFE Lite, which isn't the root cause of my bug bear in this series but is the same sin - inferring functionality from indexing. Once we transition fully to named pds we won't need a 'has_pd' to flag which VFEs need power-domain attachment and which don't. That transition will require populating all upstream dtsi with pd-names and then deprecating the old way. has_pd is a far better choice than inferring from indexes so, I've added. Link: https://git.codelinaro.org/bryan.odonoghue/kernel/-/commits/aa45a2b58aa1e187a2698a65164d694251f08fa1 V1: At the moment the Qcom CAMSS driver relies on the declaration order of power-domains within the dtsi to determine which power-domain relates to a VFE and which power-domain relates to the top-level (top) CAMSS power-domain. VFE power-domains must be declared prior to the top power-domain. The top power-domain must be declared last. Early SoCs have just one top power-domain with later SoCs introducing VFE specific power-domains. Differentiating between the number of power-domains results in lots of code which is brittle and which we can mostly get rid of with named power-domains. The reliance on declaration ordering is in-effect magic number indexing. This series introduces named power-domains for CAMSS and refactors some of the code in CAMSS to support the new named power-domains. We continue to support the legacy indexing model with an intention to remove after a reasonable transition period. New SoC additions should use named power-domains from now on. Tested on x13s, rb5, db410c Link: https://git.codelinaro.org/bryan.odonoghue/kernel/-/tree/linux-next-23-10-23-camss-named-power-domains Bryan O'Donoghue (5): media: qcom: camss: Flag which VFEs require a power-domain media: qcom: camss: Convert to per-VFE pointer for power-domain linkages media: qcom: camss: Use common VFE pm_domain_on/pm_domain_off where applicable media: qcom: camss: Move VFE power-domain specifics into vfe.c media: qcom: camss: Add support for named power-domains .../media/platform/qcom/camss/camss-vfe-170.c | 36 -------- .../media/platform/qcom/camss/camss-vfe-4-1.c | 8 +- .../media/platform/qcom/camss/camss-vfe-4-7.c | 36 -------- .../media/platform/qcom/camss/camss-vfe-4-8.c | 31 ------- .../media/platform/qcom/camss/camss-vfe-480.c | 36 -------- drivers/media/platform/qcom/camss/camss-vfe.c | 77 ++++++++++++++++ drivers/media/platform/qcom/camss/camss-vfe.h | 16 ++++ drivers/media/platform/qcom/camss/camss.c | 87 ++++++++++++------- drivers/media/platform/qcom/camss/camss.h | 7 +- 9 files changed, 156 insertions(+), 178 deletions(-) -- 2.42.0