From nobody Mon Feb 9 17:21:33 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29C32C77B75 for ; Mon, 15 May 2023 14:31:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241324AbjEOObg (ORCPT ); Mon, 15 May 2023 10:31:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241373AbjEOObQ (ORCPT ); Mon, 15 May 2023 10:31:16 -0400 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E07DF358A; Mon, 15 May 2023 07:31:03 -0700 (PDT) Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-52079a12451so9206807a12.3; Mon, 15 May 2023 07:31:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684161062; x=1686753062; 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=QVq/kpJ/70Wv68RjMJaNqydvleLpT2XbW0a2c5YuHeA=; b=bW2MaVBFgRr7231m/l4hHFIy4hGb46iF869j3WLa15qqsNJTd3j/N258uPhokNlg0Z rrmWgnxqqLtNEnWfgdkGTiUcTqo3Awy2ruCYzoEDs6A45fHEwgw/rrM9udtBi3Hn4ka4 FT/fNwayPHyYJ9sjXpy11xlpQl65r2fXoxHH4xt9d3DLEIW/dpzcu6SEAOyzDN4qM3Qo xCkWzGocLjM0ZlVPxAzk5umC6Jhms1ajOXEXTwvKFWmBTkKXE8GzlFZCwskWcix0m6DQ B1myHlr1KIP9Sf4r07RPDdTfBNRWi6fv77waWOaTzDmIyfy/6EEaXA8I/02tSBHMORxK WSWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684161062; x=1686753062; 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=QVq/kpJ/70Wv68RjMJaNqydvleLpT2XbW0a2c5YuHeA=; b=WP4qC4O3y/4G8GCFyLW3xX2EvHFvTHx/t86z4/oCJG8l8EwR8rdd24vMYFcZszjc10 6xh2UugK/39MHQFHHOwmh2KHgo/PvaNmJO+BrGJyRRXpe/gXK6y8u59Ls0DL2U4t5B4G S+77JWB9Z1QBXGypaOprYbyfcVGaT8uyQVqkCu64BV3xAmPCyNZ00EQ8qOlqRX+s70Vr 9CVJF+imLkMFgGmkWo/CB4Dl6uFaSRcxkzDi/QX+jODCMdVVebpFE8VTWOkG7sph/XLL uN1E/O3IndHOtHurX8ISw8Qsv1KJar2yHDzBF/37aRw2gdT3VolFzaGOi6GWDxvy1W4g gF6g== X-Gm-Message-State: AC+VfDyimcQgtIjNTa0m4oosMcpNxx5T12zKmwqzx20YThjOHgaRfLpO JZl+uMe5xdGniEKwai7IEcY= X-Google-Smtp-Source: ACHHUZ71l41Y3wgpKhvpJKf0oM96ttVQjDila4pNl6cUuMG11fTboomzRXCM+U5ceRWquu8RZWWeuw== X-Received: by 2002:a17:90a:8004:b0:24e:5245:6383 with SMTP id b4-20020a17090a800400b0024e52456383mr33282021pjn.23.1684161062193; Mon, 15 May 2023 07:31:02 -0700 (PDT) Received: from localhost ([2a00:79e1:abd:4a00:61b:48ed:72ab:435b]) by smtp.gmail.com with ESMTPSA id g22-20020a17090adb1600b00250bf8495b3sm10747609pjv.39.2023.05.15.07.31.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 07:31:01 -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 , 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 v4 7/9] drm/doc: Relax fdinfo string constraints Date: Mon, 15 May 2023 07:30:14 -0700 Message-Id: <20230515143023.801167-8-robdclark@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230515143023.801167-1-robdclark@gmail.com> References: <20230515143023.801167-1-robdclark@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 --- 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 standa= rdise as much as possible. =20 File format specification =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D =20 - 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 shal= l 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. =20 Key types --------- =20 1. Mandatory, fully standardised. 2. Optional, fully standardised. 3. Driver specific. =20 Data types ---------- =20 - - Unsigned integer without defining the maximum value. -- - String excluding any above defined reserved characters or whites= pace. +- - String excluding any above defined reserved characters or whi= tespace. +- - String. =20 Mandatory fully standardised keys --------------------------------- =20 -- drm-driver: +- drm-driver: =20 String shall contain the name this driver registered as via the respective `struct drm_driver` data structure. =20 Optional fully standardised keys -------------------------------- =20 Identification ^^^^^^^^^^^^^^ =20 @@ -68,62 +69,62 @@ to the in kernel representation of `struct drm_file` in= stances. =20 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. =20 Userspace should make sure to not double account any usage statistics by u= sing the above described criteria in order to associate data to individual clie= nts. =20 Utilization ^^^^^^^^^^^ =20 -- drm-engine-: ns +- drm-engine-: ns =20 GPUs usually contain multiple execution engines. Each shall be given a sta= ble -and unique name (str), with possible values documented in the driver speci= fic +and unique name (keystr), with possible values documented in the driver sp= ecific documentation. =20 Value shall be in specified time units which the respective GPU engine spe= nt busy executing workloads belonging to this client. =20 Values are not required to be constantly monotonic if it makes the driver implementation easier, but are required to catch up with the previously re= ported larger value within a reasonable period. Upon observing a value lower than= what was previously read, userspace is expected to stay with that larger previo= us value until a monotonic update is seen. =20 -- drm-engine-capacity-: +- drm-engine-capacity-: =20 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 ca= se the exported engine corresponds to a group of identical hardware engines. =20 In the absence of this tag parser shall assume capacity of one. Zero capac= ity is not allowed. =20 -- drm-cycles-: +- drm-cycles-: =20 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 g= iven +drm-engine- tag and shall contain the number of busy cycles for th= e given engine. =20 Values are not required to be constantly monotonic if it makes the driver implementation easier, but are required to catch up with the previously re= ported larger value within a reasonable period. Upon observing a value lower than= what was previously read, userspace is expected to stay with that larger previo= us value until a monotonic update is seen. =20 -- drm-maxfreq-: [Hz|MHz|KHz] +- drm-maxfreq-: [Hz|MHz|KHz] =20 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 calcula= te -percentage utilization of the engine, whereas drm-engine- only reflec= ts +drm-engine- tag and shall contain the maximum frequency for the gi= ven +engine. Taken together with drm-cycles-, this can be used to calc= ulate +percentage utilization of the engine, whereas drm-engine- only ref= lects time active without considering what frequency the engine is operating as a percentage of it's maximum frequency. =20 Memory ^^^^^^ =20 - drm-memory-: [KiB|MiB] =20 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 --=20 2.40.1