Received: by 2002:a05:6359:322:b0:b3:69d0:12d8 with SMTP id ef34csp144530rwb; Wed, 10 Aug 2022 16:37:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR4E0/kGT9tRhAiABjyuMdvDOK+USGeUToZY2jdI5o4A6iPAJ9tVxkM/NKcbk8n4Bn/o3RkF X-Received: by 2002:a63:84c1:0:b0:41b:ebff:f3bf with SMTP id k184-20020a6384c1000000b0041bebfff3bfmr25296586pgd.435.1660174620500; Wed, 10 Aug 2022 16:37:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660174620; cv=none; d=google.com; s=arc-20160816; b=wWwfP/Tz3SV8HDhduKGXnqTBeo5P7jSHlQxRZ6z6W+6KYAa4pUOxcamqWRehx995A4 654i51/QsGmwtYAT08qrTqFwPrdlFcquwodJ1MT8dSne2jMyhx75NFwHziriy4Bi/NW1 GmY2vU3rSpUQj3Ces/OjWoG/cvmK6ILK0/QihBhvc1Gw0vsYqKtRKt0YzmMCDbBSubGG 3LM4ocebQKIKQxV/GQD45MOo2ziLK3nNSgVKsb3WyHNZuV7YLuLvDGDig3VT9iBnk1Hg pe1P54NhPr5LMfCF58EsWrzcq70HoI9fKf6ACGuSJHkPlGJ3Iu785J/rkf6zfJU/7i/1 PHtg== 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=eHrvTcdNO7jdbXbEMTjYaEzx6hgZ/fRzU4I+AiV6ST3NDfZgma3310UMEyaB6YtBMk O3mTeY6c24LTlnPwm4O0W92QygUTXZowtvTmEaD3tgyNGlSkKyint2rKAF821LnRHmrr iN4IPdRQni/fyMFNFktZZFcoO6jHCFNIbTBufqS75R7gn06efuxQ9WwqkY9NLMSLb6++ B+qhanICxf5lHlHz2tgvy7T2iIshsuXS0Ixu/jBq9mmvGtQHgcWoUXdtFIG+arpzH6vE 9DSaONSnaeRYyOfHxZxQz/ikZT95o92ZVVyeHx4ISLf0H7qNYZ6Z0/8NNa277U33B7b+ sbRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=RkaB8hBq; 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 g4-20020a1709026b4400b00170a752cae8si8979844plt.115.2022.08.10.16.36.47; Wed, 10 Aug 2022 16:37:00 -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=RkaB8hBq; 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 S233152AbiHJXa0 (ORCPT + 99 others); Wed, 10 Aug 2022 19:30:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233758AbiHJX3z (ORCPT ); Wed, 10 Aug 2022 19:29:55 -0400 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 724D583F33 for ; Wed, 10 Aug 2022 16:29:48 -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=RkaB8hBq3/R/1OYWjtaZU64XCX 3OmzaUdxiynm4exZuNrmc6p80Mw5Q6TYSSnSb/f1mTTaOmyzWraHCWxeISIq1a1ICOLOzZmlweG0o YOmSL381a0dVFwm5y1rNY8WU5GNzqwCjTruBEEV0GEyTjt4gRDE2hh+yRINWGSaTFlAi1r6sEUQBM DLld2kb46YIkOfVWUrCd61qLCINDWkePkLM9hWKCHeyfQMuPQ4RxM+rbHM2B8H7Lgj9+lvMGgr/nv B9KLN8qAnLDY6xslPCom9REx6WbYaVQXvAoCBquUIG8VXYXzipYvOf+Drhi1GLdT5TXFFv6zg5n1n qYTw7yMQ==; Received: from [191.17.41.12] (helo=localhost.localdomain) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1oLv8x-004r9g-62; Thu, 11 Aug 2022 01:29:43 +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 v3 3/4] Documentation/gpu: Document GFXOFF's count and residency Date: Wed, 10 Aug 2022 20:28:57 -0300 Message-Id: <20220810232858.11844-4-andrealmeid@igalia.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220810232858.11844-1-andrealmeid@igalia.com> References: <20220810232858.11844-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, T_SCC_BODY_TEXT_LINE 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