From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65E1DC3A5A4 for ; Fri, 23 Aug 2019 15:06:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3D13020870 for ; Fri, 23 Aug 2019 15:06:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="siISpHlf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404840AbfHWPGa (ORCPT ); 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-Google-Smtp-Source: APXvYqzhBqSLYP5ApPK5mE0oG+RMyTUh1JqA9ZAmyyVrzxAloBECYA84RJ5XVFzKAvGUUyuOwLrT5w== 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC164C3A5A2 for ; Fri, 23 Aug 2019 15:06:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AF51420870 for ; Fri, 23 Aug 2019 15:06:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="o7iVyGQt"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="siISpHlf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AF51420870 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rhvt/I7IzjhwaLceUdGqwr4+NiBZjtnclQFsapE2TPM=; b=o7iVyGQt/dMq3N Z4xPIPwQfsDx7aoqRUFwlXhI+kA6Vik5PUWWN2jlT78Fn1LWVhwPvUFXufTaaPRkaDnx5kiAFZGsh yo5UlZkfS/dVEoMHx3V//CtC6smIug2BIqE7C0ErRjDncu9MLMPCLut3yv/VBwGg+EXk4wVyKvsCo pvfFX605vXmqERTB9j5c4p2m1hinSdYbwHZCbQ6ywQeZZJaeTi+XkJWTKew0RCz0h/mnTfg2OYR2b 6fKOlsHGslqY4H6aDepiDaI9DQXuZYS6N3T5xYCHjCGjhh9C0TcYxAMbdZTuESs93Pz5Tk2CymrwG uA5HhQa9iUQ8hNky/u7Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i1B98-0001Rc-5e; Fri, 23 Aug 2019 15:06:34 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i1B94-0001Pq-PR for linux-arm-kernel@lists.infradead.org; Fri, 23 Aug 2019 15:06:32 +0000 Received: by mail-pf1-x444.google.com with SMTP id b24so6662911pfp.1 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=A3Xz4JUah38hQJ/lZCdqj/+YYkn6dg7uFWrc0NCbTd3coA548cvnnwIxN9F6J56xK9 PE4eJvgBn75Xp0PVlNuFTQFifBKNnM/ROC8Z4A+1ufPDoEGE5oHMP3pEycfoGIHfR+Qg nWK1GlmboJKgoo87dhjaqJJ5iRWyfWSJ57WErvA9ixmy2sqIF8mBuObGMebPyw2vpuUF bt3lBzaaszAi8xPzbKgXeY1nFffmRsUu31/mmS3rRnnRsZLh4D+C6U96Ua1Z1X4R+jyw 8WpHK2Z5Meeg1sNE3kRdQblBHqKNPD/NyAZvDzHoMr0zTkiWHEFfcGazHhqxESWk/XYO f21A== X-Gm-Message-State: APjAAAX0RI6bWIkIQu49CLnNqt+bTQbaIYO1EjwhSKQ6BTsuPZiDLHPG 6wAvJ8cyPwfcOk72Mx/9HUBCEW+pBRY= X-Google-Smtp-Source: APXvYqzhBqSLYP5ApPK5mE0oG+RMyTUh1JqA9ZAmyyVrzxAloBECYA84RJ5XVFzKAvGUUyuOwLrT5w== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190823_080630_823794_2B789B0C X-CRM114-Status: GOOD ( 18.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0C3BC3A5A2 for ; Fri, 23 Aug 2019 15:06:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8765820870 for ; Fri, 23 Aug 2019 15:06:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mggiTHj5"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="siISpHlf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8765820870 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6vk4jg/ExFD7AjMl+jPojpXJVLy4BAzvXdSEzhLEGCU=; b=mggiTHj5UMdR8U 2uQo9LhvypWBVEWv6B5YaK1j6EHMdHj9TjKJw6dJKxe0/hpEzSqhlH5Wj/fzuz1B7T/UsNuIctxRW sjU0eugACkLtIYVykaTmY8qxcLVi3aG652j9kOuOpspwMEZYLaYBJeMhYzlVQRf0gCw4PeYRH13Eq Z8A06NtLucXgFX4VNfPKk1FhDDTPUCd4+aYby7ho1+Bakkz0Dr/+jgXoY22Gr+3eaXYUCPBMZCv+I dZB+fl52mKSQq9PUpcyMH+zHkenqKN2zEKdu8hD39hgzQX9NV/ySgvbQimWRz5bP9+H9c4Sx1L1ZQ QbCHXtXOGlEId1pB+OgA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i1B96-0001QY-OX; Fri, 23 Aug 2019 15:06:32 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i1B93-0001Pr-Kh for linux-amlogic@lists.infradead.org; Fri, 23 Aug 2019 15:06:31 +0000 Received: by mail-pf1-x442.google.com with SMTP id y9so6270821pfl.4 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=MDx29hlEJLvPnIUvEe2Zv63+XIL/BYZgay1fmadBexHuVJGZa5dulEA6eVw9g7Jjeu pip1fx/xp0nBsnuoDTyXzQl1R4dD93bTngC2wQDY2EdM0hl6H/nTRC3A80eiJOSfNpd8 hh6w+Dh/LEfs0/8p5aMAC9OMGqcbCG3YJIZkZnVRxoS11HYqJGwieCK/pMOKzN1qHgdH C0F4a/+MG0Igy7VPdMaLuT6gFZK6pRG7B/C7tMegF4BCko6bPU2vPSzEWPf3xcwOqiDO rpMDUxXrVRjsn27iIpED4nxMdSZ7m05h10oxkeyC2IQ4C4CTJCoqv1MS8UKptsGXdK/g t0iQ== X-Gm-Message-State: APjAAAWAQMFz1NCOzfwdFVGFWOvdYIzlyhLyunNzl/X6uLYrl5BgL3aL PMCW1OKJ9rgZ3pVFe3alKv90qQ== X-Google-Smtp-Source: APXvYqzhBqSLYP5ApPK5mE0oG+RMyTUh1JqA9ZAmyyVrzxAloBECYA84RJ5XVFzKAvGUUyuOwLrT5w== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190823_080629_822269_23F49D69 X-CRM114-Status: GOOD ( 16.98 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic