Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1265027ybl; Fri, 23 Aug 2019 16:30:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOpf+DBIjQpRjMPOF+L1DIDkfmdq29WxdcycuUWSTFFpWaFqusItFZvGt4PMYPdcudpa7G X-Received: by 2002:a17:902:20e3:: with SMTP id v32mr7155778plg.142.1566603041005; Fri, 23 Aug 2019 16:30:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566603040; cv=none; d=google.com; s=arc-20160816; b=OL9tQh+DtHUYkFC7mJUCqN6N3Zh+XVL92CkvTszrtvRCjuJmTv3ChgSNNHiRoiu3D7 4A/XAYGosJ9bKj/RuTXNRWw7qpqO0f3SmmDVT8NMQ9FuNOC4HMYcPbzYtFCY75dt/w+o MEQzNKxkFaUkeeGRMGe5IyNmzVka64I3i3RucXX1W8yt2aSgYvkb5StVFdRHXeB00fr8 gFb35pamXQhYg7LQHb3qHlqZTwTmvDkPeEFM6I+hXue96WCGurfHMi1ujxkyjsVpLUX8 6k14pouzMGw6qAq4t6csWv+3ymlw8YfV4YQYQ9Be2NITc64EnhYzizfHK2LwFnjEGnU4 UQLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=br2IEBdfnW2qlqV7gg30Z/xwOIaLVKl9bGEeCZKa9NU=; b=OIorEORoAOvvSnqNLRN3702Ym6Iwc0+B6OKyVp5JzDOkqu9OFOUFf3M2W2TTSnJdm+ 2grD5Ab2YvgtAypJZEmGv1Db6n+5TEFOZU2/VQ7H5FO1Kl5Q+7akvpnRHU/tsW55kKok t7wjyB98HrG2CtGb4SzrD7L3gqCVEZyYAZqdR4ZwzI5iScNyiSAnv+jMMf+XJwD5LzTU 6TBlXROWx+NQND5NH5d4l9uYG0KdpP9r8UamjEJ1sHHcBKEk8jn0shbIQemr0jU1i8fO Fw9GpMmTqOMgO8rTRj4cvGeBL+zU8B4wwfnK4/3uISaeXom8k1snbduuubM0GOqd/8DZ tDcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=siISpHlf; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1si3962192pla.79.2019.08.23.16.30.26; Fri, 23 Aug 2019 16:30:40 -0700 (PDT) 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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=siISpHlf; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404818AbfHWPGa (ORCPT + 99 others); Fri, 23 Aug 2019 11:06:30 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:35392 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732875AbfHWPG3 (ORCPT ); Fri, 23 Aug 2019 11:06:29 -0400 Received: by mail-pg1-f194.google.com with SMTP id n4so5947576pgv.2 for ; Fri, 23 Aug 2019 08:06:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=br2IEBdfnW2qlqV7gg30Z/xwOIaLVKl9bGEeCZKa9NU=; b=siISpHlfibAjTzKXmzvMvdMERCB8h0biNAphsfX2uljz+Okx2iR9rML7xRX4aOLa45 G2Hej+2b3/xvgrJGt6vMT5MM5nsOSJlENKdRtjHjvUJYWQAlFT+/8pulaatvnRMmo79z 0vukJARO++UdwvA5MaHWvvNNJIPqDVj0WCKJPkAR+5MH3mym60HW3KXHiGIHzkv05VCZ 0NxHuTPkQs6KXJ3UTB1TiigWz2Ng1xU/GS8zTf5yLSmcpn+KulnVCOObrJ61y9nmhV9L c4l+BHt6kJeYQPHrpEbAmDFvHFLQG3KJB8Tkyo6KKDqpKlSLiWT6xNYcDeeOa/3qsrCT BepQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=br2IEBdfnW2qlqV7gg30Z/xwOIaLVKl9bGEeCZKa9NU=; b=DBQmpVmM8b/Er8ra1RFmyP4WJ+0SE3aY1AH3s2IMIuFUmzdzTGzeHyNPdMwrrdeDoi lzq608nT8vT/N8+iTS4iHRt+JrMPxixPU+87/JGSo7PcxZJlRDZjvKGFbGmtG7b81O4w gO3cCp9V2RtniovNKEtu96fDd8OjLLOO7wBfzKxnUUeVjcaxRybsfNQsxWhHXfJzVRh2 YMfm5u5VbnuFcxN81mgAxnbh2UBAWrIesHeN8IPb1c/byCgZxeyMpJtwazvmwHC0VX80 nGMv8ZIJ5gq/MjfRUYAXwN9tjeEL92uc8t8EOnepxbD97xP1OXXd3t88zRpzvs2llmKT tOMA== X-Gm-Message-State: APjAAAVIVe++EciZ5o7dXPu2Rn014sm522WfH3jHCmpe66GeT96v/Tzs 40841eXIzqu8IrTGnlrppdfYww== X-Received: by 2002:a17:90a:be07:: with SMTP id a7mr5731477pjs.88.1566572788803; Fri, 23 Aug 2019 08:06:28 -0700 (PDT) Received: from localhost ([2601:602:9200:a1a5:89d4:68d1:fc04:721]) by smtp.gmail.com with ESMTPSA id fa14sm2699525pjb.12.2019.08.23.08.06.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Aug 2019 08:06:27 -0700 (PDT) From: Kevin Hilman To: Neil Armstrong , ulf.hansson@linaro.org Cc: linux-pm@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/5] soc: amlogic: Add support for Everything-Else power domains controller In-Reply-To: <0ac1cf30-1796-a549-e195-0f94c4a85993@baylibre.com> References: <20190821114121.10430-1-narmstrong@baylibre.com> <20190821114121.10430-3-narmstrong@baylibre.com> <7hzhk25ct3.fsf@baylibre.com> <7hzhk12b6m.fsf@baylibre.com> <0ac1cf30-1796-a549-e195-0f94c4a85993@baylibre.com> Date: Fri, 23 Aug 2019 08:06:26 -0700 Message-ID: <7h36hr2a6l.fsf@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Neil Armstrong writes: [...] >>> It's for legacy when VPU is initialized from vendor U-Boot, look at commit : >>> 339cd0ea082287ea8e2b7e7159a5a33665a2cbe3 "soc: amlogic: meson-gx-pwrc-vpu: fix power-off when powered by bootloader" >>> >>> In the case the VPU power domain has been powered on by the bootloader >>> and no driver are attached to this power domain, the genpd will power it >>> off after a certain amount of time, but the clocks hasn't been enabled >>> by the kernel itself and the power-off will trigger some faults. >>> This patch enable the clocks to have a coherent state for an eventual >>> poweroff and switches to the pm_domain_always_on_gov governor. >> >> The key phrase there being "and no driver is attached". Now that we >> have a driver, it claims this domain so I don't think it will be >> powered off: >> >> # cat /sys/kernel/debug/pm_genpd/pm_genpd_summary >> domain status slaves >> /device runtime status >> ---------------------------------------------------------------------- >> ETH on >> /devices/platform/soc/ff3f0000.ethernet unsupported >> AUDIO off-0 >> GE2D off-0 >> PCI off-0 >> USB on >> /devices/platform/soc/ffe09000.usb active >> NNA off-0 >> VPU on >> /devices/platform/soc/ff900000.vpu unsupported >> >> In my tests with a framebuffer console (over HDMI), I don't see the >> display being powered off. > > It's in the case where the driver is a module loaded by the post-initramfs > system after the genpd timeout, or if the display driver is disabled. > > In the later I had some system failures when vendor u-boot enabled the > display and genpd disabled the power domain later on. OK, thanks for the explanation. I get it now. >> >>> I could set always-on governor only if the domain was already enabled, >>> what do you think ? >> >> I don't think that's necessary now that we have a driver. We really >> want to be able to power-down this domain when the display is not in >> use, and if you use always_on, that will never happen. >> >>> And seems I'm also missing the "This patch enable the clocks". >> >> I'm not sure what patch you're referring to. > > It's also added in 339cd0ea082287ea8e2b7e7159a5a33665a2cbe3 "soc: amlogic: meson-gx-pwrc-vpu: fix power-off when powered by bootloader" > > I would like to keep the same behavior as meson-gx-pwrc-vpu, since it works fine > and we debugged all the issues we got. OK, that's fine with me. We'll have to revist when we start using runtime PM enabled drviers and want to power down the display IPs on idle, but that's fine to do later. Thanks, Kevin