Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5540126ybv; Tue, 11 Feb 2020 18:10:07 -0800 (PST) X-Google-Smtp-Source: APXvYqzFjG8X4lrPw5KL/3/K3hkcT2vVyU1Lv2ZOmfXn8LP1IhSj9RLa4Dm2hAP5g3q07N8Fyw/K X-Received: by 2002:a05:6808:9ba:: with SMTP id e26mr4835198oig.81.1581473407112; Tue, 11 Feb 2020 18:10:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581473407; cv=none; d=google.com; s=arc-20160816; b=ACtIGXzfSvfMZJ/fs+7bZS+U1ht0Xm+SKUcpRfjTfzMreKUCd35YMd5hbjI3gdduX7 7vgHjPBgSp0NRsH8Iyedxr7TIv/s+vGHbL64/eHAvvUXPkHJ7YGiZw+1TEnLpLwKtmlT xTsITFDzeVshtNMI9dXaUjmx1p2/uozZHj/UBT1FbnhzN5Y95Ergu8XVrHfqa78UH6JW OruL9sSS7ufw9MaF6j5QwV+6EYmPgEpDNtzfpQsLTcezftvjwKVSJ1oSay8PY/QiuoiB av0d2AVQlVDZcR1ylT+Rw5hBMI3PriF3ErbYATPUFbLi0NKtmNFLchuW6opSZDX3M83Z DRSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=aO1UKgSaz5CktVcc4Y8RcygWfgexx86iGtyjlHVU3kc=; b=kqLJJSMKFrduT0ozGW5zqycvEDkioHgyZUotPdROA6Y6fz/8tz2RfAIN8p3o2Pqa/b ZWsqE5RjtSQlFTfhjFPS3/jDA8Hca4L8FrQrjccZr4rlnHg80v+S1e5CADG/FJ9SsJai bsTuu3ezI/xQjPHKVdjiSpGKycZGG5YIcU1AKnfadK9rxg4iAwbNtxdoYTQt+T5HDP7d vM1GH9o6Jt6jW1whZq2XSL7Wlh4otzbQboqS58MILYf/wXlCvap+gI1cBnSIVR0mHBvg 7ZaYBB3soDzMWEfETu3zJre3Fki+VNyFlM8ps4q1OEgLBx+oT68//gHUglVn6yQS13vU AFVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Ra4CJUVR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g25si2887114otj.198.2020.02.11.18.09.54; Tue, 11 Feb 2020 18:10:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Ra4CJUVR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727653AbgBLCIk (ORCPT + 99 others); Tue, 11 Feb 2020 21:08:40 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:38565 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727007AbgBLCIk (ORCPT ); Tue, 11 Feb 2020 21:08:40 -0500 Received: by mail-qk1-f194.google.com with SMTP id z19so601771qkj.5 for ; Tue, 11 Feb 2020 18:08:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aO1UKgSaz5CktVcc4Y8RcygWfgexx86iGtyjlHVU3kc=; b=Ra4CJUVRnDxwoRk1QHlRr35m77IrmNP+H+pxr+bZOB0DUqvHsCjOXSRfGg8rh5YTc/ bgIS4sXVXPWDN0WSvdb5FMIFOhtL88yKaI01xKq0D1/4ULI+kJq4x8UcjsWQePCqsrs8 6+XGOuD6jIhd4dxdCqcpHLWlftWwwtVIkMYXo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aO1UKgSaz5CktVcc4Y8RcygWfgexx86iGtyjlHVU3kc=; b=b3qJ5q3gMuEiKMhTFYld9dv4GUrZg8EV6V5I54qilhxar3RGstbpVbg5DKT3rP74CX ju2wzZojP2TPLHpXmISc8PXqJLUi45iDHm/spo92Gf2M2PcA6tQWGSTQT/URsoODGZui QM5if3uptl5/luHdtI4qY79OGw8dNQ5FIzQ8nPZVeY0Ijzs9D5dR66vJweTn9836d1xx BaR3514DS2Zm6TJwDWYarufju4SLhE2MIFaC1OxVzJInBkbP38w03FC1XD4ypSMQo854 mC/YZKF/TNf8hfjlmTRCpL2wHPgorPnkG5ApOKXI2KBd5H2QtJxJSS1SlJjJ7uq/a8PP MEkQ== X-Gm-Message-State: APjAAAXF/O0ADbebGnhnTd4w51f/D82Obr4LSXLrkWHSMsFPiXwS1dVu SMzXQqPb9mSr+4sep2mJRnon8ffTOsNHpurG0qlEaA== X-Received: by 2002:a05:620a:6d7:: with SMTP id 23mr8405839qky.299.1581473317421; Tue, 11 Feb 2020 18:08:37 -0800 (PST) MIME-Version: 1.0 References: <20200207052627.130118-1-drinkcat@chromium.org> <20200207052627.130118-6-drinkcat@chromium.org> In-Reply-To: From: Nicolas Boichat Date: Wed, 12 Feb 2020 10:08:26 +0800 Message-ID: Subject: Re: [PATCH v4 5/7] drm/panfrost: Add support for multiple power domains To: Saravana Kannan Cc: Rob Herring , David Airlie , Daniel Vetter , Mark Rutland , Matthias Brugger , Tomeu Vizoso , Steven Price , Alyssa Rosenzweig , Liam Girdwood , Mark Brown , dri-devel , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "linux-kernel@vger.kernel.org" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "moderated list:ARM/Mediatek SoC support" , Hsin-Yi Wang , Ulf Hansson , Greg Kroah-Hartman Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 12, 2020 at 4:09 AM Saravana Kannan wrote: > > On Tue, Feb 11, 2020 at 11:44 AM Rob Herring wrote: > > > > +Saravana > > > > On Thu, Feb 6, 2020 at 11:27 PM Nicolas Boichat wrote: > > > > > > When there is a single power domain per device, the core will > > > ensure the power domain is switched on (so it is technically > > > equivalent to having not power domain specified at all). > > > > > > However, when there are multiple domains, as in MT8183 Bifrost > > > GPU, we need to handle them in driver code. > > > > > > Signed-off-by: Nicolas Boichat > > > > > > --- > > > [snip] > > > + pfdev->pm_domain_links[i] = device_link_add(pfdev->dev, > > > + pfdev->pm_domain_devs[i], DL_FLAG_PM_RUNTIME | > > > + DL_FLAG_STATELESS | DL_FLAG_RPM_ACTIVE); > > > > We're in the process of adding device links based on DT properties. > > Shouldn't we add power domains to that? See drivers/of/property.c for > > what's handled. > > Rob, > > drivers/of/property.c doesn't enable the RPM_ACTIVE AND PM_RUNTIME > flags. Wanted to start off conservative. But adding command line ops > to change the default flags shouldn't be difficult. But before I do > that, I want to change of_devlink to > fw_devlink=. May be I can extend that to > "disabled, permissive, suspend, runtime". > > Nicholas, > > And the adding and removing of device links for power domains will be > a 2 line change. I've been meaning to add a few more bindings like > hwspinlocks and pinctrl. I can roll power domains support into that if > you want. Adding power domains makes sense to me, as there are a bunch of other users (git grep dev_pm_domain_attach_by_name). This seems to be a bit orthogonal to this patch though. If your solution lands before this (and not something that is behind a command line option), then I'm happy to make use of it. Either way, happy to test things.