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 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 46C09C48BE5 for ; Thu, 17 Jun 2021 19:08:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 20313613E7 for ; Thu, 17 Jun 2021 19:08:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231465AbhFQTKO (ORCPT ); Thu, 17 Jun 2021 15:10:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231379AbhFQTKN (ORCPT ); Thu, 17 Jun 2021 15:10:13 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94684C061574 for ; Thu, 17 Jun 2021 12:08:04 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id n7so7967240wri.3 for ; Thu, 17 Jun 2021 12:08:04 -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=IR6nqqUmGXk7IYRuhjjxlGaJI9czVlUrwb18e4SwsPA=; b=ePy97Wnyuf3Buo2r5hDPx4yZ07dOXcP51cxRlHQLUztYssgAubhYwtVW/83jWKr5Oq YAM95BJTr/4p+aDYgmO/ynMW7k+tJd2E6YRyuIeQuCud7iKbG8mFYQjVPg+OzLWdgyBW UL3chClOGb1/PJfjz57zFbIuvAXUpzJ/8eU+E= 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=IR6nqqUmGXk7IYRuhjjxlGaJI9czVlUrwb18e4SwsPA=; b=hEwKkxRa7mo/eyKVmC7x9sq87P4leSQbeyOpyZaGG1hB6ulBKHAz2WjTRU4LGM8T9Y +PchC8AA0yDiXLtE0eCRMDaRnLl3XoRb4NlWqySN2DwpIU+7EhvnGbPSLUWKkXnMTOHz 8MoMqwx21PmDmGbaAO8OYkvzq+GgXeHm4RSaLrIr/bALHKPlKZ7Q2IkpjlKhw2C4xqzC fVZxTjxm/YLHTVwY1l3ifkA4gjXqWn7OucRUSt6c32IjoCH46ueJC8WbfuHHAChtXsO2 uGk2XSfJJGwkiSlhTYEydnGxtaVKtrghL85en2WAFJKGe9ORzdJozUGDDGNktDRQ2gPl sW4A== X-Gm-Message-State: AOAM5301z71orVsYPvHISVsF3i2kU1Y32hxZNPhL7EJ1e0hgRp8fAjjd FG7i7g4rvBD2xPZMC12yZhjtdw== X-Google-Smtp-Source: ABdhPJytFXJtFAejmTkA7Of1m7BvEw9I3gYWSEalInUTunTXyu+jv1k5OhtkfQUsT7Dntrx4boToYQ== X-Received: by 2002:a05:6000:1888:: with SMTP id a8mr7472604wri.11.1623956883179; Thu, 17 Jun 2021 12:08:03 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id b15sm7537016wrr.27.2021.06.17.12.08.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Jun 2021 12:08:02 -0700 (PDT) Date: Thu, 17 Jun 2021 21:07:59 +0200 From: Daniel Vetter To: Philippe CORNU Cc: Maxime Ripard , dri-devel@lists.freedesktop.org, Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann , Xinliang Liu , Anitha Chrisanthus , Jonathan Hunter , Jerome Brunet , Kevin Hilman , Ludovic Desroches , NXP Linux Team , Raphael GALLAIS-POU , Sascha Hauer , Roland Scheidegger , Sean Paul , Hyun Kwon , Andrew Jeffery , Seung-Woo Kim , Noralf =?iso-8859-1?Q?Tr=F8nnes?= , Pengutronix Kernel Team , Alex Deucher , Laurent Pinchart , Alexandre Belloni , linux-doc@vger.kernel.org, Edmund Dea , Eric Anholt , Thierry Reding , Krzysztof Kozlowski , Steven Price , VMware Graphics , Ben Skeggs , Martin Blumenstingl , Rodrigo Siqueira , Boris Brezillon , Sandy Huang , Kyungmin Park , Maxime Coquelin , Haneen Mohammed , Neil Armstrong , Melissa Wen , Gerd Hoffmann , Benjamin Gaignard , Sam Ravnborg , Jonathan Corbet , Xinwei Kong , Chen-Yu Tsai , Joel Stanley , Alyssa Rosenzweig , Chun-Kuang Hu , Jonas Karlman , Chen Feng , Alison Wang , Rodrigo Vivi , Tomeu Vizoso , Tomi Valkeinen , Kieran Bingham , Tian Tao , Shawn Guo , Christian =?iso-8859-1?Q?K=F6nig?= , Daniel Vetter , Liviu Dudau , Alexandre Torgue , Paul Cercueil , Andrzej Hajda , Huang Rui , Marek Vasut , Joonyoung Shim , Oleksandr Andrushchenko , Russell King , Hans de Goede , Matthias Brugger , Jernej Skrabec , Pekka Paalanen , Yannick Fertre , Nicolas Ferre , Robert Foss , Rob Clark , Qiang Yu , Jyri Sarha Subject: Re: [PATCH v4] Documentation: gpu: Mention the requirements for new properties Message-ID: References: <20210616143842.632829-1-maxime@cerno.tech> <9a994b75-7578-d7b1-db3f-5625f121c740@foss.st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9a994b75-7578-d7b1-db3f-5625f121c740@foss.st.com> X-Operating-System: Linux phenom 5.10.0-7-amd64 Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Thu, Jun 17, 2021 at 05:38:36PM +0200, Philippe CORNU wrote: > > > 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? Yeah, also background color has been talked about for a while (lots of hw can do it), it's just that no one ever found a use-case to make the background somethign else than "black". There's a pile of drivers who could expose this, so definitely makes sense to have this generic. -Daniel > > 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. > > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch