Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp879889imn; Tue, 26 Jul 2022 11:53:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vFV/XiyNWNOP4s1sIe49trEWdQsWwFD7I2zX9vy4ad50DbWP7K/0+wivtu969BzjJjtArp X-Received: by 2002:a17:907:6089:b0:72f:56db:ccb6 with SMTP id ht9-20020a170907608900b0072f56dbccb6mr14891638ejc.318.1658861615481; Tue, 26 Jul 2022 11:53:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658861615; cv=none; d=google.com; s=arc-20160816; b=pEOlrN9mdncimLm7Nv+PjklKROVPBfl89yT6UYVH3gwAoWcNi8D4JbwJGrnfCTp+rC jeSS5dPnecq1K8B8NAN9Cra+F6Uct9ECG4gkAOyiTqdslIm1qS73QeSjk2gTFq9pYesN vJQM+f8IDQu5bNO9WsXP9djEPRp8AUExO8CLJ7Sdq4N6/YYbQP7nDn+XdLbdpWIwN6ZK e8Uzd4j8uRCFsOcwcxEWrBmeE4TXomTAQ1/85Ps1Z5yIx3IsBYUT8RMlgzCCnbFYs/Dz pWG7FckufzwSebaJLL2oFz/CFUxRqaaUfo0Ov/DNwShFBvVFQ4d1e7rXk/q/SEPacl0d X08A== 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=ciDPhF07fS+tRj3SbXyJWbm9upDSDTB8l7rbsGiPQ3k=; b=H43aSiayO/HgVVzScFGxpg9KSd4tUgnwqQRzKQp428MZq9N/6N8LwdLmwDfUgOtMT6 vZ9k2khvXp+psXPWAxkkrPwE4SGNm9+fG6giuVX94wUTjkzf7JdINjcZGusPeK2gdPX3 uWgroZSBUpXZn5bDtMENkD1BXsYLnNlEKndSFV7jMaYOI4bL7s7u9lAsqEZdRtxAOk8i Kpvq8Q6HZFKDj7GS2J3pXzGfoG1AU0akR/DABltPVdzNiXlTWZfXGqN0NtZGaPwHJUO0 8KejHYagpFDyi5nbM2MCWrOOcESC0URVCBUChVb2HpPVsCsIABop0INHwaCU62XWyZ3W zvhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=HonnJmwD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w23-20020a1709062f9700b0072a4b4fb1e0si9497696eji.911.2022.07.26.11.53.10; Tue, 26 Jul 2022 11:53:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=HonnJmwD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239737AbiGZSX1 (ORCPT + 99 others); Tue, 26 Jul 2022 14:23:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239617AbiGZSXO (ORCPT ); Tue, 26 Jul 2022 14:23:14 -0400 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6F4632D8C for ; Tue, 26 Jul 2022 11:23:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ciDPhF07fS+tRj3SbXyJWbm9upDSDTB8l7rbsGiPQ3k=; b=HonnJmwDnytfcoTbVHoLE3mgX0 lcMlhkhvqTsXNkBGMdFPqQ93L1kBh1dV0CRrxL9rAHgFFsmdES4PJTyjvaVmm2KZ2+3CEWvCDLEDw K6hnBDsnv22F6NxxkjIsklTgXVcW4Rqrog04d0nacSx2c4sroNW1F8VsdWUddNE3MofdBGjoZ73Db P+2GyLpHBZElYEr5k9BmHeil6vp0UyNIK4z6Ewb6yajipHVteL7Lo4eEk917qCSp7D6NF4WYLi4Il Wroc3Om0g6NK8wYZIJlwacrEwW/xZ6rOtnv67ByyHMJC3B/7WiKMrKtdH5kvDMuZrWksr1JqZuLL6 ztGiztzg==; Received: from 201-13-50-220.dsl.telesp.net.br ([201.13.50.220] helo=localhost.localdomain) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1oGPCx-007aEh-7i; Tue, 26 Jul 2022 20:23:04 +0200 From: =?UTF-8?q?Andr=C3=A9=20Almeida?= To: Alex Deucher , =?UTF-8?q?=27Christian=20K=C3=B6nig=27?= , 'Pan Xinhui' , David Airlie , Daniel Vetter , Hawking Zhang , Tao Zhou , Felix Kuehling , Jack Xiao , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Tom St Denis , Rodrigo Siqueira Cc: kernel-dev@igalia.com, =?UTF-8?q?Andr=C3=A9=20Almeida?= Subject: [PATCH v2 3/4] Documentation/gpu: Document GFXOFF's count and residency Date: Tue, 26 Jul 2022 15:21:51 -0300 Message-Id: <20220726182152.123649-4-andrealmeid@igalia.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220726182152.123649-1-andrealmeid@igalia.com> References: <20220726182152.123649-1-andrealmeid@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Add documentation explaining those two new files. While here, add a note about the value type. Signed-off-by: André Almeida --- Documentation/gpu/amdgpu/thermal.rst | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Documentation/gpu/amdgpu/thermal.rst b/Documentation/gpu/amdgpu/thermal.rst index 997231b6adcf..5e27e4eb3959 100644 --- a/Documentation/gpu/amdgpu/thermal.rst +++ b/Documentation/gpu/amdgpu/thermal.rst @@ -72,7 +72,8 @@ card's RLC (RunList Controller) firmware powers off the gfx engine dynamically when there is no workload on gfx or compute pipes. GFXOFF is on by default on supported GPUs. -Userspace can interact with GFXOFF through a debugfs interface: +Userspace can interact with GFXOFF through a debugfs interface (all values in +`uint32_t`, unless otherwise noted): ``amdgpu_gfxoff`` ----------------- @@ -104,3 +105,18 @@ Read it to check current GFXOFF's status of a GPU:: If GFXOFF is enabled, the value will be transitioning around [0, 3], always getting into 0 when possible. When it's disabled, it's always at 2. Returns ``-EINVAL`` if it's not supported. + +``amdgpu_gfxoff_count`` +----------------------- + +Read it to get the total GFXOFF entry count at the time of query since system +power-up. The value is an `uint64_t` type, however, due to firmware limitations, +it can currently overflow as an `uint32_t`. *Only supported in vangogh* + +``amdgpu_gfxoff_residency`` +--------------------------- + +Write 1 to amdgpu_gfxoff_residency to start logging, and 0 to stop. Read it to +get average GFXOFF residency % multiplied by 100 during the last logging +interval. E.g. a value of 7854 means 78.54% of the time in the last logging +interval the GPU was in GFXOFF mode. *Only supported in vangogh* -- 2.37.1