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=-17.5 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,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 249D4C49361 for ; Thu, 17 Jun 2021 15:39:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0D58561400 for ; Thu, 17 Jun 2021 15:39:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231547AbhFQPmD (ORCPT ); Thu, 17 Jun 2021 11:42:03 -0400 Received: from mx07-00178001.pphosted.com ([185.132.182.106]:49476 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233357AbhFQPmB (ORCPT ); Thu, 17 Jun 2021 11:42:01 -0400 Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15HFaU6J026838; Thu, 17 Jun 2021 17:39:07 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=3nkParf2pArP/VAU0fCoHkbEHN6sVjhrzpvoOQnAD4Q=; b=LAJTiyLtIc6JUhT5Dt4xibK2ntBvzjUmAczE0cnPyX1nm3ljuH/xlmF+I1tcRI0chI8t T5iYjfsXfjJ0A1IbE4CVyaemhbUY89/8y1E5ORbXkkxD60S2pefLV53b14OJbqs4SR12 SHqQ99ISGtgU2CSxjumyd8MDQfldSJu++njsgFUomkOc603idd52rekJnovfoXpDQs9p ScLmLAFY3DVGgN/BKULAQ5W1Zdo2AmTzqtfcfC0tfDCl8HLmDxBKH04Vlu+elOOB1xgx 4O/cexcEmzONe8Dw1J5JzO1nejrEppZNEyLt/DNIGQz3zgF3I+zQ3EHo8PVFJfKcbFzq tg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 397mmveamn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Jun 2021 17:39:07 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DC17E100038; Thu, 17 Jun 2021 17:39:01 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 5345C231DF4; Thu, 17 Jun 2021 17:39:01 +0200 (CEST) Received: from lmecxl0993.lme.st.com (10.75.127.50) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 17 Jun 2021 17:38:57 +0200 Subject: Re: [PATCH v4] Documentation: gpu: Mention the requirements for new properties To: Maxime Ripard , , Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann CC: , 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 , =?UTF-8?Q?Christian_K=c3=b6nig?= , Chun-Kuang Hu , Edmund Dea , Eric Anholt , Fabio Estevam , Gerd Hoffmann , Haneen Mohammed , Hans de Goede , =?UTF-8?Q?Heiko_St=c3=bcbner?= , Huang Rui , Hyun Kwon , Inki Dae , Jani Nikula , Jernej Skrabec , Jerome Brunet , Joel Stanley , 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 , =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= , NXP Linux Team , Oleksandr Andrushchenko , Patrik Jakobsson , Paul Cercueil , Pekka Paalanen , Pengutronix Kernel Team , 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 , Raphael GALLAIS-POU References: <20210616143842.632829-1-maxime@cerno.tech> From: Philippe CORNU Message-ID: <9a994b75-7578-d7b1-db3f-5625f121c740@foss.st.com> Date: Thu, 17 Jun 2021 17:38:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210616143842.632829-1-maxime@cerno.tech> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-06-17_14:2021-06-15,2021-06-17 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On 6/16/21 4:38 PM, 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: Joel Stanley > 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 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 > --- > Documentation/gpu/drm-kms.rst | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/Documentation/gpu/drm-kms.rst b/Documentation/gpu/drm-kms.rst > index 87e5023e3f55..c28b464dd397 100644 > --- a/Documentation/gpu/drm-kms.rst > +++ b/Documentation/gpu/drm-kms.rst > @@ -463,6 +463,25 @@ 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 > +requirements, in addition to the one mentioned above.: > + > +- It must be standardized, with some documentation to describe how the > + property can be used. > + > +- 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 planes. > + > +- An IGT test must be submitted where reasonable. > + > Property Types and Blob Property Support > ---------------------------------------- > > Hi, Regarding properties, we have a “case study example” related in a certain way to this documentation update :-) The use case: on a front desk at an exhibition, there is a welcome screen you can touch for searching various information. When this welcome screen is in idle, a small logo is displayed at its center (around 20% of the fullscreen). The logo has a white background color. We want to reduce the ddr usage for lowering the power (the board is battery powered) so the idea is to use a white background color around this logo, produced by the drm CRTC so the image in ddr is only the size of the logo. Reading the thread https://lists.freedesktop.org/archives/dri-devel/2019-October/239733.html dissuade us from coding a generic solution, so we started to implement a "STM_" private background color property, it works... but we are not at all convince this is the right way and we clearly prefer mainline/generic sw for both kernel & userland. So now, what are our options... well, this v4 documentation update is I think clear enough: we have to document + provide a generic helper in the core code (similar to the original patch) + update IGT test, right? Thanks Philippe :-) Note: It is really a pleasure to read such interesting thread, exposing the “complexity” of our job, dealing with various hw and sw... thank you to all of you.