From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C493CC07E96 for ; Tue, 6 Jul 2021 21:56:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A300661CB6 for ; Tue, 6 Jul 2021 21:56:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229770AbhGFV6r (ORCPT ); Tue, 6 Jul 2021 17:58:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229753AbhGFV6q (ORCPT ); Tue, 6 Jul 2021 17:58:46 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9427FC061574 for ; Tue, 6 Jul 2021 14:56:06 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id j34so471554wms.5 for ; Tue, 06 Jul 2021 14:56:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=iKB6HrB8g29SVIpwGM01O+Jln+X6mmTMmrUNdgf9M7Q=; b=Vh/Hse7z3K8hdZy4GLsIIhi2Rp9MgcPDRt1km4yyIYkipxRtRR1RVRL54+U6wIG3b/ fwtgEyeK7IfTKYlgnYn3rIIzClvQsg1x2SlKgzmaJXHDD4d/yi8E6ry8TMfMbEY9zs2s FdR36DUihPfw4G7nOKRk6c37N1ejl7MTynjpU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=iKB6HrB8g29SVIpwGM01O+Jln+X6mmTMmrUNdgf9M7Q=; b=Ugtnt/iWW6toGSqvEfq2lqNQ+J1uG8ty1ZQ2hwmkpR3bAvRrMWrm+jkjVjpWcPZ2w7 IE6YRumdWoYl5Ye3r5Q+DgF/qLf1t6UrhoJtzUF2BMXHK8Ywle1mqOt7PwR88TiaJMS0 HQfAW59k+KCSPSnB53vvVfHZdcA/+sr97R3xulEcSBNi1KXIci0xxBqA3x+pITOCxOva G5DPLh3lYnyV8YRJdecXOEuIIyL9vP/Z0ysJCKu5JMUnL9dtEqX/47ScSNsVxA8j0df7 S0upxZCfttRoCAv1xTmjzh/3Il/aUAZY7+F2LEcOjwJCZAMdWRbTSG6At871EsfrFslq 4O4Q== X-Gm-Message-State: AOAM53087Rytl1AHW2vmeUbrT8gkz+AtruFQMq0HXyhLS5PLU2Um+DwR TD5rS0TrBU4trbKNeCWdjRA0Cg== X-Google-Smtp-Source: ABdhPJwuNVMCgJJcQpMcqhiFNZuMsLj1WIndhsM808heNcT/i3bs+XkVLobyN8RFo/ReYlxepNIFrQ== X-Received: by 2002:a7b:cc15:: with SMTP id f21mr3054068wmh.5.1625608565191; Tue, 06 Jul 2021 14:56:05 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id f9sm18574300wrm.48.2021.07.06.14.56.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 14:56:04 -0700 (PDT) Date: Tue, 6 Jul 2021 23:56:00 +0200 From: Daniel Vetter To: Maxime Ripard Cc: dri-devel@lists.freedesktop.org, Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann , linux-doc@vger.kernel.org, Jonathan Corbet , Alexandre Belloni , Alexandre Torgue , Alex Deucher , Alison Wang , Alyssa Rosenzweig , Andrew Jeffery , Andrzej Hajda , Anitha Chrisanthus , Benjamin Gaignard , Ben Skeggs , Boris Brezillon , Brian Starkey , Chen Feng , Chen-Yu Tsai , Christian Gmeiner , Christian =?iso-8859-1?Q?K=F6nig?= , Chun-Kuang Hu , Edmund Dea , Eric Anholt , Fabio Estevam , Gerd Hoffmann , Haneen Mohammed , Hans de Goede , Heiko =?iso-8859-1?Q?St=FCbner?= , Huang Rui , Hyun Kwon , Inki Dae , Jani Nikula , Jernej Skrabec , Jerome Brunet , John Stultz , Jonas Karlman , Jonathan Hunter , Joonas Lahtinen , Joonyoung Shim , Jyri Sarha , Kevin Hilman , Kieran Bingham , Krzysztof Kozlowski , Kyungmin Park , Laurent Pinchart , Linus Walleij , Liviu Dudau , Lucas Stach , Ludovic Desroches , Marek Vasut , Martin Blumenstingl , Matthias Brugger , Maxime Coquelin , Maxime Ripard , Melissa Wen , Neil Armstrong , Nicolas Ferre , Noralf =?iso-8859-1?Q?Tr=F8nnes?= , NXP Linux Team , Oleksandr Andrushchenko , Patrik Jakobsson , Paul Cercueil , Pekka Paalanen , Pengutronix Kernel Team , Philippe Cornu , Philipp Zabel , Qiang Yu , Rob Clark , Robert Foss , Rob Herring , Rodrigo Siqueira , Rodrigo Vivi , Roland Scheidegger , Russell King , Sam Ravnborg , Sandy Huang , Sascha Hauer , Sean Paul , Seung-Woo Kim , Shawn Guo , Simon Ser , Stefan Agner , Steven Price , Sumit Semwal , Thierry Reding , Tian Tao , Tomeu Vizoso , Tomi Valkeinen , VMware Graphics , Xinliang Liu , Xinwei Kong , Yannick Fertre , Zack Rusin , Daniel Vetter Subject: Re: [PATCH v5] Documentation: gpu: Mention the requirements for new properties Message-ID: References: <20210706161244.1038592-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210706161244.1038592-1-maxime@cerno.tech> X-Operating-System: Linux phenom 5.10.0-7-amd64 Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Tue, Jul 06, 2021 at 06:12:44PM +0200, Maxime Ripard wrote: > New KMS properties come with a bunch of requirements to avoid each > driver from running their own, inconsistent, set of properties, > eventually leading to issues like property conflicts, inconsistencies > between drivers and semantics, etc. > > Let's document what we expect. > > Cc: Alexandre Belloni > Cc: Alexandre Torgue > Cc: Alex Deucher > Cc: Alison Wang > Cc: Alyssa Rosenzweig > Cc: Andrew Jeffery > Cc: Andrzej Hajda > Cc: Anitha Chrisanthus > Cc: Benjamin Gaignard > Cc: Ben Skeggs > Cc: Boris Brezillon > Cc: Brian Starkey > Cc: Chen Feng > Cc: Chen-Yu Tsai > Cc: Christian Gmeiner > Cc: "Christian König" > Cc: Chun-Kuang Hu > Cc: Edmund Dea > Cc: Eric Anholt > Cc: Fabio Estevam > Cc: Gerd Hoffmann > Cc: Haneen Mohammed > Cc: Hans de Goede > Cc: "Heiko Stübner" > Cc: Huang Rui > Cc: Hyun Kwon > Cc: Inki Dae > Cc: Jani Nikula > Cc: Jernej Skrabec > Cc: Jerome Brunet > Cc: John Stultz > Cc: Jonas Karlman > Cc: Jonathan Hunter > Cc: Joonas Lahtinen > Cc: Joonyoung Shim > Cc: Jyri Sarha > Cc: Kevin Hilman > Cc: Kieran Bingham > Cc: Krzysztof Kozlowski > Cc: Kyungmin Park > Cc: Laurent Pinchart > Cc: Linus Walleij > Cc: Liviu Dudau > Cc: Lucas Stach > Cc: Ludovic Desroches > Cc: Marek Vasut > Cc: Martin Blumenstingl > Cc: Matthias Brugger > Cc: Maxime Coquelin > Cc: Maxime Ripard > Cc: Melissa Wen > Cc: Neil Armstrong > Cc: Nicolas Ferre > Cc: "Noralf Trĝnnes" > Cc: NXP Linux Team > Cc: Oleksandr Andrushchenko > Cc: Patrik Jakobsson > Cc: Paul Cercueil > Cc: Pekka Paalanen > Cc: Pengutronix Kernel Team > Cc: Philippe Cornu > Cc: Philipp Zabel > Cc: Qiang Yu > Cc: Rob Clark > Cc: Robert Foss > Cc: Rob Herring > Cc: Rodrigo Siqueira > Cc: Rodrigo Vivi > Cc: Roland Scheidegger > Cc: Russell King > Cc: Sam Ravnborg > Cc: Sandy Huang > Cc: Sascha Hauer > Cc: Sean Paul > Cc: Seung-Woo Kim > Cc: Shawn Guo > Cc: Simon Ser > Cc: Stefan Agner > Cc: Steven Price > Cc: Sumit Semwal > Cc: Thierry Reding > Cc: Tian Tao > Cc: Tomeu Vizoso > Cc: Tomi Valkeinen > Cc: VMware Graphics > Cc: Xinliang Liu > Cc: Xinwei Kong > Cc: Yannick Fertre > Cc: Zack Rusin > Reviewed-by: Daniel Vetter > Signed-off-by: Maxime Ripard > > --- > > Changes from v4: > - Changes suggested by Pekka > > Changes from v3: > - Roll back to the v2 > - Add Simon and Pekka in Cc > > Changes from v2: > - Take into account the feedback from Laurent and Lidiu to no longer > force generic properties, but prefix vendor-specific properties with > the vendor name > > Changes from v1: > - Typos and wording reported by Daniel and Alex Bunch of typos, but still lgtm. > --- > Documentation/gpu/drm-kms.rst | 30 ++++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > > diff --git a/Documentation/gpu/drm-kms.rst b/Documentation/gpu/drm-kms.rst > index 87e5023e3f55..47994890fd1e 100644 > --- a/Documentation/gpu/drm-kms.rst > +++ b/Documentation/gpu/drm-kms.rst > @@ -463,6 +463,36 @@ KMS Properties > This section of the documentation is primarily aimed at user-space developers. > For the driver APIs, see the other sections. > > +Requirements > +------------ > + > +KMS drivers might need to add extra properties to support new features. > +Each new property introduced in a driver need to meet a few s/need/needs/ > +requirements, in addition to the one mentioned above: > + > +* It must be standardized, documenting: > + > + * The full, exact, name string; > + * If the property is an enum, all the valid variants name; I think that should be "variant's names" but not 100% sure. > + * What values are accepted, and what these values mean; > + * What the property does and how it can be used; > + * How the property might interact with other, existing properties. > + > +* It must provide a generic helper in the core code to register that > + property on the object it attaches to. > + > +* Its content must be decoded by the core and provided in the object's > + associated state structure. That includes anything drivers might want > + to precompute, like :c:type:`struct drm_clip_rect ` for Stuff auto-hyperlinks even in .rst files nowadays, so just sturct drm_clip_rect should be enough here. See https://dri.freedesktop.org/docs/drm/doc-guide/kernel-doc.html#cross-referencing-from-restructuredtext > + planes. > + > +* Its initial state must match the behavior prior to the property > + introduction. This might be a fixed value matching what the hardware > + does, or it may be inherited from the state the firmware left the > + system in during boot. I like this addition. Cheers, Daniel > + > +* An IGT test must be submitted where reasonable. > + > Property Types and Blob Property Support > ---------------------------------------- > > -- > 2.31.1 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch