Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6026883rwd; Wed, 24 May 2023 09:46:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6IqCXofG1woPlwzLozSAzigXU53X9bJT6P7yXlwhZWZwNqzSQNwNSMblriWcuRw10Zq5+0 X-Received: by 2002:a17:902:748c:b0:1a9:21bc:65f8 with SMTP id h12-20020a170902748c00b001a921bc65f8mr16446947pll.11.1684946801814; Wed, 24 May 2023 09:46:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684946801; cv=none; d=google.com; s=arc-20160816; b=xPEraPZuvkvC8/NROVZqbDiynoEi17ziGdNLS8MR4ea5bKPKCJi43lTpcVAEnWNv4o QWH2ym6ZaZcEQSVv08f0Gtbt7a5p+hmInUbqROeINwvVWszTPu56EizH5N2G/D2fSqSi 4NpAN9EK0iu/VNCfmpcCeniI4FdJ5E6d9Z4ZPXo5ZcWMXQnBp3g7TUY2iChmR9BdsVSZ Ks3b2Zo8wgSCCNDqojJPDfvYb/V0Fekl7rrKYYIHWBg0mIvNeAxc+57ZLsCnWwjYaUdZ 50q28UAM9MgupNdoGUoj3Ki4kOU8iV0vRasWGJz/Hko1bc2hwogFnKGvGb2YLzyQQvvi xlJw== 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=ex5RgcOGAy76xADxIoHPP5AhCcNedegsTMiHxYneYvA=; b=WNIPTrK4CjIgGABEwBEwqEfnK0URoedaANwKdnk2HxBPnJrpVdJnfFD4QbL9aLIEE9 LMcwd6MYPH0gNQxaIoZx++Fhlo+qKD9UeRduPv/pbaHbCBovKXK0aF+1QLsjRGqSaX8p jEgGCtB03126apOpjnIfzL83aSPKBUuj7aOP9SJtP/qAoHq2StzpQ+ay3NruROOOeIXw UPn2f3QSFzKE0bDzgi+tBnX+Bm3eVf/KWHacVrRQqfMeUERtmNsQwUT1jUREl4wDMSgR 6kzXz/U1goMl4Q6VsFLvNDHqWv8BicMeJWUNRtqesd/HClEHwewl4oTQkryxCfEF9DYO O6ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=AESaB1Mj; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h1-20020a170902f54100b001aada12d628si7683053plf.585.2023.05.24.09.46.29; Wed, 24 May 2023 09:46:41 -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=pass header.i=@gmail.com header.s=20221208 header.b=AESaB1Mj; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238456AbjEXQB5 (ORCPT + 99 others); Wed, 24 May 2023 12:01:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238427AbjEXQBS (ORCPT ); Wed, 24 May 2023 12:01:18 -0400 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E45C186; Wed, 24 May 2023 09:00:44 -0700 (PDT) Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-53eee18a192so426895a12.3; Wed, 24 May 2023 09:00:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684944039; x=1687536039; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ex5RgcOGAy76xADxIoHPP5AhCcNedegsTMiHxYneYvA=; b=AESaB1MjaCZtF0RCoh9e77N5vnrWapnBypJL1aCtjHEnEZb14XPLFFeEJGplihdCB9 xcEovBnrNPwzC7actG2PNYtsxUMNUvPyjKjRRUrpLAdhSU5qs/L1njJWvayRfHp6l+gz DqdY/B8iS7/N4Cz3Mh8phN8N4jdj1+hGp50cUv08D3FxbcIRaj092Fo6DNoRQFZ2kjEG FdlR6Vkl83wdnxOKU0/1vIWWJhcfMA+VF0M9QMBpwhVsYaADIYuYWXvuGLJxUk/v3JW0 4nYEjVSCl7hMOEonBURtneMlQ5nePBIVU79XIPcNi5N5riSozrlNxKYUZdorCfnJ7/CW cgpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684944039; x=1687536039; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ex5RgcOGAy76xADxIoHPP5AhCcNedegsTMiHxYneYvA=; b=O4ZkO9fo0HPxLE0x6WK4gELXFwuhQ/lwwb9tCxR+96tyMFMTw/WzJWZZYPizfebulr v0EfS8cqlV8kjRKBcVcTeNUKYXHl4qqJ5JbcGkNHxjD85bf0dPi4dXVO7hv5ifGyp6A6 lA7E7umWcuB77x2zGsgSj6z9R7TjpKD0ByXUHLJGxowcI+yMRne/o1vAIxGeF+TXw+lt TeYobUjLkZdLvHjilrGSXU4w4kxSNl26vqDMQb+mnnPvtBUM4q6FPiUIcdizxjz7fG2z lmHPyJAn/OKX3BB9uLs6E2BddvaAGK297z4UpWGJWe5cshRt4nB5HspI4xMyGLBwyftq FZnw== X-Gm-Message-State: AC+VfDxaKO+lgZPfBBmPvd5lXgQlHXY8+VP4TbVJlyOY5q7QedrpNkjp kCk9J75ZD8xAQdEMzXcuJdQ= X-Received: by 2002:a17:902:748c:b0:1a9:21bc:65f8 with SMTP id h12-20020a170902748c00b001a921bc65f8mr16308136pll.11.1684944039060; Wed, 24 May 2023 09:00:39 -0700 (PDT) Received: from localhost ([2a00:79e1:abd:4a00:61b:48ed:72ab:435b]) by smtp.gmail.com with ESMTPSA id e16-20020a17090301d000b001afccb29d69sm3698533plh.303.2023.05.24.09.00.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 09:00:38 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org, Daniel Vetter , Tvrtko Ursulin , Boris Brezillon , Christopher Healy , Emil Velikov , =?UTF-8?q?Christian=20K=C3=B6nig?= , Rob Clark , Tvrtko Ursulin , Dave Airlie , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Jonathan Corbet , linux-doc@vger.kernel.org (open list:DOCUMENTATION), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v5 7/7] drm/doc: Relax fdinfo string constraints Date: Wed, 24 May 2023 08:59:37 -0700 Message-Id: <20230524155956.382440-8-robdclark@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230524155956.382440-1-robdclark@gmail.com> References: <20230524155956.382440-1-robdclark@gmail.com> MIME-Version: 1.0 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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 From: Rob Clark The restriction about no whitespace, etc, really only applies to the usage of strings in keys. Values can contain anything (other than newline). Signed-off-by: Rob Clark Acked-by: Tvrtko Ursulin Acked-by: Dave Airlie --- Documentation/gpu/drm-usage-stats.rst | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/Documentation/gpu/drm-usage-stats.rst b/Documentation/gpu/drm-usage-stats.rst index d012eb56885e..fe35a291ff3e 100644 --- a/Documentation/gpu/drm-usage-stats.rst +++ b/Documentation/gpu/drm-usage-stats.rst @@ -17,41 +17,42 @@ wherever possible effort should still be made to standardise as much as possible. File format specification ========================= - File shall contain one key value pair per one line of text. - Colon character (`:`) must be used to delimit keys and values. - All keys shall be prefixed with `drm-`. - Whitespace between the delimiter and first non-whitespace character shall be ignored when parsing. -- Neither keys or values are allowed to contain whitespace characters. +- Keys are not allowed to contain whitespace characters. - Numerical key value pairs can end with optional unit string. - Data type of the value is fixed as defined in the specification. Key types --------- 1. Mandatory, fully standardised. 2. Optional, fully standardised. 3. Driver specific. Data types ---------- - - Unsigned integer without defining the maximum value. -- - String excluding any above defined reserved characters or whitespace. +- - String excluding any above defined reserved characters or whitespace. +- - String. Mandatory fully standardised keys --------------------------------- -- drm-driver: +- drm-driver: String shall contain the name this driver registered as via the respective `struct drm_driver` data structure. Optional fully standardised keys -------------------------------- Identification ^^^^^^^^^^^^^^ @@ -68,62 +69,62 @@ to the in kernel representation of `struct drm_file` instances. Uniqueness of the value shall be either globally unique, or unique within the scope of each device, in which case `drm-pdev` shall be present as well. Userspace should make sure to not double account any usage statistics by using the above described criteria in order to associate data to individual clients. Utilization ^^^^^^^^^^^ -- drm-engine-: ns +- drm-engine-: ns GPUs usually contain multiple execution engines. Each shall be given a stable -and unique name (str), with possible values documented in the driver specific +and unique name (keystr), with possible values documented in the driver specific documentation. Value shall be in specified time units which the respective GPU engine spent busy executing workloads belonging to this client. Values are not required to be constantly monotonic if it makes the driver implementation easier, but are required to catch up with the previously reported larger value within a reasonable period. Upon observing a value lower than what was previously read, userspace is expected to stay with that larger previous value until a monotonic update is seen. -- drm-engine-capacity-: +- drm-engine-capacity-: Engine identifier string must be the same as the one specified in the -drm-engine- tag and shall contain a greater than zero number in case the +drm-engine- tag and shall contain a greater than zero number in case the exported engine corresponds to a group of identical hardware engines. In the absence of this tag parser shall assume capacity of one. Zero capacity is not allowed. -- drm-cycles-: +- drm-cycles-: Engine identifier string must be the same as the one specified in the -drm-engine- tag and shall contain the number of busy cycles for the given +drm-engine- tag and shall contain the number of busy cycles for the given engine. Values are not required to be constantly monotonic if it makes the driver implementation easier, but are required to catch up with the previously reported larger value within a reasonable period. Upon observing a value lower than what was previously read, userspace is expected to stay with that larger previous value until a monotonic update is seen. -- drm-maxfreq-: [Hz|MHz|KHz] +- drm-maxfreq-: [Hz|MHz|KHz] Engine identifier string must be the same as the one specified in the -drm-engine- tag and shall contain the maximum frequency for the given -engine. Taken together with drm-cycles-, this can be used to calculate -percentage utilization of the engine, whereas drm-engine- only reflects +drm-engine- tag and shall contain the maximum frequency for the given +engine. Taken together with drm-cycles-, this can be used to calculate +percentage utilization of the engine, whereas drm-engine- only reflects time active without considering what frequency the engine is operating as a percentage of it's maximum frequency. Memory ^^^^^^ - drm-memory-: [KiB|MiB] Each possible memory type which can be used to store buffer objects by the GPU in question shall be given a stable and unique name to be returned as the -- 2.40.1