Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp5077965rwe; Tue, 18 Apr 2023 01:32:28 -0700 (PDT) X-Google-Smtp-Source: AKy350bLdkct9k/H1O7hB1G6c93hKqt66OinEIceYkwoja1OCuBtxsMStOyepRKITRMTPM78lye4 X-Received: by 2002:a05:6a20:7f83:b0:f0:d4fc:f0c with SMTP id d3-20020a056a207f8300b000f0d4fc0f0cmr529998pzj.24.1681806747971; Tue, 18 Apr 2023 01:32:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681806747; cv=none; d=google.com; s=arc-20160816; b=ve6rGCUuYSguJBBpJCDTbWvUO1kIWE36+uuC/t9eG8qwCAmpavs/F9kT/9hZ5iQTu5 FeWorqf0IGDokwn+JLCJ3e6nHiFpDXnVe/U1xr4R/N1JB8SYSHfzAAb3FduyEqTXp90i 88IgL2Bj+Y+Do+RbnpfE5WxdviBGKE9XbqTnhV4k8b0hy6jw4+bJRW1uITdcJG2QGtdw wAlUGnyLCWCn+ZBYsOKoU83Q2oNBtJJ4QDrvCMRTH5KRulTbkpBZXKOYWvlP4jvYxwL/ PXOAE++FkPMZOtPjD01Z1ORC1iZIDLjyoylK1q0CeqLL2J7/WHuXjcOj0W6s5rjd3Ets +J5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=NZ6SqEGmo/WUFLQFm1Bu89jQePC2Xyk1EnLLsD/dtnw=; b=IbGVLGvn9Rv9f7XLIudaG2Yfk+gXCpY2aZglBqhJskaUjCdb/ZLuto1cgQW6ngTt4G Psr8eWjw3ufw7GipW9Otg0bbt0j6MwfH576uqmgP9sz0qxS3Pxp+D4J2UK0T2t4xNjBR m5kdhMWDKiJLdIV5jnL31Cm2KQUZy4MxUrtMvTtEcnv+jcC7j1iTpqcrg33bzzYD++kL ZyUI7ZURv+kSrInr8PdQpII7WkJwDsaLa5xDpS/O8VPKHk2g0qiK4mHuM9iMahvmihGC T6Wp03tdhEiNmNUAQm4C/I96ITTRp0uQUd3KIn+4433BT9ViL+1KqOPwpTE1ld77TZIp 9pfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=WkLhIT85; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 4-20020a630004000000b0051b930ef846si8128314pga.141.2023.04.18.01.32.14; Tue, 18 Apr 2023 01:32:27 -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=@intel.com header.s=Intel header.b=WkLhIT85; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231355AbjDRIUB (ORCPT + 99 others); Tue, 18 Apr 2023 04:20:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230244AbjDRIUA (ORCPT ); Tue, 18 Apr 2023 04:20:00 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C9EA420F; Tue, 18 Apr 2023 01:19:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681805995; x=1713341995; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=BUDt7Leg5YNsBfAufyHE9J891sNBSaCcNnWZI81W9tU=; b=WkLhIT85YvgBF50wY9kqg5NxFibXE6b84JSq2/dM0HYORnLx/YPEYLJK xzRKiSOEh1dNQY0uFc4Cp4e8VMJ+2CN1lkshpVC6inFbaZp63ToVRR/f9 dWYvn4ooUKAO3Y2z6x9ZMgBcSp1ClNdbhfhYa3s/y54AtkwEUdcwbcDQ6 vWn3yRs01mrD3JfEbDajxYT9dyUw+YJVivga4BsHw/wyLM4vAkBams79A SIfpQUDN7y138rLCbEVk5Nylbwpz7/xtVKedJ/I4c+KmsdpaS0o/aRi1L zF+OOopLMlKF654vhabM0A7ZSOaQD3kMRRHQf3x8bC58XQz5G52D1zYOD g==; X-IronPort-AV: E=McAfee;i="6600,9927,10683"; a="347858338" X-IronPort-AV: E=Sophos;i="5.99,206,1677571200"; d="scan'208";a="347858338" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2023 01:19:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10683"; a="641288458" X-IronPort-AV: E=Sophos;i="5.99,206,1677571200"; d="scan'208";a="641288458" Received: from dilipban-mobl.ger.corp.intel.com (HELO [10.213.234.43]) ([10.213.234.43]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2023 01:19:51 -0700 Message-ID: Date: Tue, 18 Apr 2023 09:19:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [RFC 1/3] drm/doc: Relax fdinfo string constraints Content-Language: en-US To: Rob Clark , dri-devel@lists.freedesktop.org Cc: Rob Clark , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Jonathan Corbet , "open list:DOCUMENTATION" , open list References: <20230417201215.448099-1-robdclark@gmail.com> <20230417201215.448099-2-robdclark@gmail.com> From: Tvrtko Ursulin Organization: Intel Corporation UK Plc In-Reply-To: <20230417201215.448099-2-robdclark@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HK_RANDOM_ENVFROM,HK_RANDOM_FROM, NICE_REPLY_A,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On 17/04/2023 21:12, Rob Clark wrote: > 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 > --- > Documentation/gpu/drm-usage-stats.rst | 29 ++++++++++++++------------- > 1 file changed, 15 insertions(+), 14 deletions(-) > > diff --git a/Documentation/gpu/drm-usage-stats.rst b/Documentation/gpu/drm-usage-stats.rst > index 258bdcc8fb86..8e00d53231e0 100644 > --- a/Documentation/gpu/drm-usage-stats.rst > +++ b/Documentation/gpu/drm-usage-stats.rst > @@ -24,7 +24,7 @@ File format specification > - 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. > > @@ -39,12 +39,13 @@ 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. Makes sense I think. At least I can't remember that I had special reason to word it as strict as it was. Lets give it some time to marinade so for later: Acked-by: Tvrtko Ursulin Regards, Tvrtko > > 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. > @@ -69,10 +70,10 @@ 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. > > -- 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 > @@ -84,16 +85,16 @@ 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-memory-: [KiB|MiB] > +- 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 > @@ -126,10 +127,10 @@ The total size of buffers that are purgeable. > > The total size of buffers that are active on one or more rings. > > -- 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 > @@ -138,12 +139,12 @@ 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. >