Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1450922pxu; Thu, 17 Dec 2020 10:12:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJxlFwH7e1q1kHTjO6t+LhdoMJ9n2UMKPfjRiHw5G3X2M3hYQgyKkbJKDnJ8fO58JOKdT0Ud X-Received: by 2002:a17:906:8151:: with SMTP id z17mr278636ejw.48.1608228722536; Thu, 17 Dec 2020 10:12:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608228722; cv=none; d=google.com; s=arc-20160816; b=Vmag3rENODerl0Tc34OrSww1WvcR2PQ3gL2Q1QqHCCyycvBFUkdcxbaqDCipRmFo8B 0cXn0hO0d2UoxI72fEgI2aRX3KCxtojN2X/o+aBYmpB44Oh6o2BzQI/knPSdy2Eb+ohG WBwf1J2Dz5JKtVoyKYFIGm985r9xm0Np6lKRLLxImZcpT33URXmFGfZ70puzB2vMRdxX KHAkmp09eI+3l46oW9JOZyDtK6e0SkcHPRMVpFPkEZRjHYH1oYwtpYlvgpazt2siR0/I tIaFbOV9LuzanbBLX8vA8L6oxR4x2kvRjLkwWR1qem4yCOMGciSOsN1i9TrgpjBOtAnk /xFw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4FYxQew+p18AO5FBSec7kTxg/87GRcpO76q4A6IgDv4=; b=XHAT/lhPP1Y5uR+WaAv6rK4wkgtzMFcyeNFSVKbc8MlmFFQl+SSkmzyTmwuyhcUAjg MMGaYc3NADFupfNXOpl2DlZe8J90yfEvQWWj06993fJxgcIxYwUVt2D+oK8jFo+ct8QH p4PI79+G/eMSnc1jP8Xiwr1OYYcRPBsJUMunBprmDITuVvp3EJw3xrKY4OktS5n1d50h xYFeuU5BVFD3h2LyszAJibghcnb3frURraPm9qaxTkJ5JVA28/IwU+QAHN2SPZm2Htzw vt2quSDlozqFu1yAB+hFRb9WJROX4pkzdB2cx1YO23jHYtUqoKvTsjw8UCUoEza1Ml0O R6og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cOKXXBVS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i4si3074466ejg.258.2020.12.17.10.11.38; Thu, 17 Dec 2020 10:12:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cOKXXBVS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731347AbgLQSJc (ORCPT + 99 others); Thu, 17 Dec 2020 13:09:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731119AbgLQSJW (ORCPT ); Thu, 17 Dec 2020 13:09:22 -0500 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBA84C0619D9; Thu, 17 Dec 2020 10:07:45 -0800 (PST) Received: by mail-lf1-x133.google.com with SMTP id a12so59837505lfl.6; Thu, 17 Dec 2020 10:07:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4FYxQew+p18AO5FBSec7kTxg/87GRcpO76q4A6IgDv4=; b=cOKXXBVSpDRg0y9isOFdN9ypZc0EDS0wcBFXXnpHA5gHfe4rMBp0KSj+DDdWOL11DO 14H+OQC2eE39/MWECC9kqvFurVIqFvJ2WndhK/heNmgpBhaBuetfvjX3bSbDChUGYlOl M03g7jnK6aEYOl3VVMYqgb92F5jHXviJ0kadHsCvkB6DjdIkY3a6/yN0ivwTWZMQPNas 0wbcDxjvzueYloI0q/vTGlIggkOTjoKgB+9h6hdCf1lTJRXhHWJAjOP8NmnXryCCK0tq y7aL9Gb5rsb/CvF+4IQm84UqG1pgiogHxaF3WzjOcQgVdkCBNmmODR0H0IjN3ODbgQKH YcOA== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4FYxQew+p18AO5FBSec7kTxg/87GRcpO76q4A6IgDv4=; b=krr/kRgNcDpPqORYEt3/6UET9Ups7ctNVJseTeiI0CUrf7cbiKYO/r8YYgW9Ybwdp6 +BLqCoQaQTFojJjGbQJCXuLbkkXS0Q58sVeFl994SAwx5mXcdwblxnh/9AHcROB2rKy2 ldLpr9pIN228gNec5LGgKl3DoVD3LNZ8OMdwszU1uXyr0wjxDKgJhdQj4eo7n3IKmFQi VLWNPWLIuNhJ/mNJXkM1wb5MkRJmInH4tD2miU07Dr6dBNiAMJohD8q8DMffAUNKuCyc It/DUn/jQ30HSITjm/Pka1bPMMiXHndpkam59E+gngGpszsGyQcqsmqsLLGecOV/x9cS lGuQ== X-Gm-Message-State: AOAM532zw9ofK+NCqzJHVGJHefeUqI4ijVVWqHmeaPIfsJ4ZbkvN9M1G y+bVLhME9G63gTwY90O5Y54= X-Received: by 2002:a2e:712:: with SMTP id 18mr205136ljh.165.1608228464322; Thu, 17 Dec 2020 10:07:44 -0800 (PST) Received: from localhost.localdomain (109-252-192-57.dynamic.spd-mgts.ru. [109.252.192.57]) by smtp.gmail.com with ESMTPSA id u5sm655596lff.78.2020.12.17.10.07.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 10:07:43 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Mark Brown , Liam Girdwood , Ulf Hansson , Mauro Carvalho Chehab , Rob Herring , Peter Geis , Nicolas Chauvet , Krzysztof Kozlowski , "Rafael J. Wysocki" , Kevin Hilman , Peter De Schrijver , Viresh Kumar , Stephen Boyd , Michael Turquette Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linux-tegra@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH v2 21/48] PM: domains: Add "performance" column to debug summary Date: Thu, 17 Dec 2020 21:06:11 +0300 Message-Id: <20201217180638.22748-22-digetx@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217180638.22748-1-digetx@gmail.com> References: <20201217180638.22748-1-digetx@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add "performance" column to debug summary which shows performance state of all power domains and theirs devices. Signed-off-by: Dmitry Osipenko --- drivers/base/power/domain.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index a3e1bfc233d4..1c60dae8540c 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -2951,7 +2951,15 @@ static void rtpm_status_str(struct seq_file *s, struct device *dev) else WARN_ON(1); - seq_puts(s, p); + seq_printf(s, "%-25s ", p); +} + +static void perf_status_str(struct seq_file *s, struct device *dev) +{ + struct generic_pm_domain_data *gpd_data; + + gpd_data = to_gpd_data(dev->power.subsys_data->domain_data); + seq_put_decimal_ull(s, "", gpd_data->performance_state); } static int genpd_summary_one(struct seq_file *s, @@ -2979,7 +2987,7 @@ static int genpd_summary_one(struct seq_file *s, else snprintf(state, sizeof(state), "%s", status_lookup[genpd->status]); - seq_printf(s, "%-30s %-15s ", genpd->name, state); + seq_printf(s, "%-30s %-50s %u", genpd->name, state, genpd->performance_state); /* * Modifications on the list require holding locks on both @@ -2987,7 +2995,10 @@ static int genpd_summary_one(struct seq_file *s, * Also genpd->name is immutable. */ list_for_each_entry(link, &genpd->parent_links, parent_node) { - seq_printf(s, "%s", link->child->name); + if (list_is_first(&link->parent_node, &genpd->parent_links)) + seq_printf(s, "\n%50s ", link->child->name); + else + seq_printf(s, "%s", link->child->name); if (!list_is_last(&link->parent_node, &genpd->parent_links)) seq_puts(s, ", "); } @@ -3001,6 +3012,7 @@ static int genpd_summary_one(struct seq_file *s, seq_printf(s, "\n %-50s ", kobj_path); rtpm_status_str(s, pm_data->dev); + perf_status_str(s, pm_data->dev); kfree(kobj_path); } @@ -3016,9 +3028,9 @@ static int summary_show(struct seq_file *s, void *data) struct generic_pm_domain *genpd; int ret = 0; - seq_puts(s, "domain status children\n"); + seq_puts(s, "domain status children performance\n"); seq_puts(s, " /device runtime status\n"); - seq_puts(s, "----------------------------------------------------------------------\n"); + seq_puts(s, "----------------------------------------------------------------------------------------------\n"); ret = mutex_lock_interruptible(&gpd_list_lock); if (ret) -- 2.29.2