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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 85C3BC48BE5 for ; Wed, 16 Jun 2021 21:05:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6320D613BF for ; Wed, 16 Jun 2021 21:05:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233864AbhFPVHy (ORCPT ); Wed, 16 Jun 2021 17:07:54 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:34154 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233836AbhFPVHx (ORCPT ); Wed, 16 Jun 2021 17:07:53 -0400 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 21F5AFC9; Wed, 16 Jun 2021 23:05:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1623877545; bh=2IBPWP7hn6ucwodbxtkHel4D6eOZPP8Ec1jAvIB9tpo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RokUqXx2zOiLscgJQ8kMnrPUp7wLhensj/HpKU912X7Gd3s4AAYn6/hcKsSMShbHr 66f4J3p2xuUrDWgNtoT+gqvNcExviSmT5r0kvSt3bq4YAtM/tkSLTC+ZvSuPUxaAiK 0ZBy8fbZaz6qZF4IuVpJkL7alvqnhmyCzuc1dQCE= Date: Thu, 17 Jun 2021 00:05:24 +0300 From: Laurent Pinchart To: Pekka Paalanen Cc: Simon Ser , Liviu Dudau , Haneen Mohammed , Alexandre Belloni , Linux Doc Mailing List , Xinliang Liu , Daniel Vetter , Edmund Dea , Alexandre Torgue , dri-devel , Russell King , Melissa Wen , Tomi Valkeinen , Thierry Reding , Benjamin Gaignard , Anitha Chrisanthus , Daniel Vetter , Steven Price , Sam Ravnborg , Jyri Sarha , Jerome Brunet , Marek Vasut , Joonyoung Shim , Qiang Yu , Krzysztof Kozlowski , Kevin Hilman , Neil Armstrong , Alyssa Rosenzweig , Xinwei Kong , Jonathan Hunter , David Airlie , Ludovic Desroches , Kieran Bingham , VMware Graphics , NXP Linux Team , Ben Skeggs , Chun-Kuang Hu , Maxime Coquelin , Jonas Karlman , Martin Blumenstingl , Chen Feng , Sascha Hauer , Alison Wang , Roland Scheidegger , Andrzej Hajda , Hans de Goede , Maxime Ripard , Rodrigo Vivi , Matthias Brugger , Nicolas Ferre , Chen-Yu Tsai , Sean Paul , Thomas Zimmermann , Paul Cercueil , Jernej Skrabec , Rodrigo Siqueira , Hyun Kwon , Boris Brezillon , Andrew Jeffery , Huang Rui , Yannick Fertr e , Jonathan Corbet , Seung-Woo Kim , Sandy Huang , Robert Foss , Joel Stanley , Tomeu Vizoso , Kyungmin Park , Noralf =?utf-8?Q?Tr=C3=B8nnes?= , Philippe Cornu , Pengutronix Kernel Team , Alex Deucher , Tian Tao , Oleksandr Andrushchenko , Shawn Guo , Christian =?utf-8?B?S8O2bmln?= , Gerd Hoffmann Subject: Re: [PATCH v3] Documentation: gpu: Mention the requirements for new properties Message-ID: References: <20210611120309.2b5eb4htupv5ss32@e110455-lin.cambridge.arm.com> <20210614174912.15a49336@eldfell> <20210614152413.nguqia3s4tlowio4@e110455-lin.cambridge.arm.com> <20210615100335.0b8f96d5@eldfell> <20210615131656.2ecefdc4@eldfell> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210615131656.2ecefdc4@eldfell> Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Tue, Jun 15, 2021 at 01:16:56PM +0300, Pekka Paalanen wrote: > On Tue, 15 Jun 2021 12:45:57 +0300 Laurent Pinchart wrote: > > On Tue, Jun 15, 2021 at 07:15:18AM +0000, Simon Ser wrote: > > > On Tuesday, June 15th, 2021 at 09:03, Pekka Paalanen wrote: > > > > > > > indeed it will, but what else could one do to test userspace KMS > > > > clients in generic CI where all you can have is virtual hardware? Maybe > > > > in the long run VKMS needs to loop back to a userspace daemon that > > > > implements all the complex processing and returns the writeback result > > > > via VKMS again? That daemon would then need a single upstream, like the > > > > kernel, where it is maintained and correctness verified. > > > > > > The complex processing must be implemented even without write-back, because > > > user-space can ask for CRCs of the CRTC. > > > > > > > Or an LD_PRELOAD that hijacks all KMS ioctls and implements virtual > > > > stuff in userspace? Didn't someone already have something like that? > > > > It would need to be lifted to be a required part of kernel UAPI > > > > submissions, I suppose like IGT is nowadays. > > > > > > FWIW, I have a mock libdrm [1] for libliftoff. This is nowhere near a full > > > software implementation with write-back connectors, but allows to expose > > > virtual planes and check atomic commits in CI. > > > > > > [1]: https://github.com/emersion/libliftoff/blob/master/test/libdrm_mock.c > > > > > > > For compositor developers like me knowing the exact formulas would be a huge > > > > benefit as it would allow me to use KMS to off-load precision-sensitive > > > > operations (e.g. professional color management). Otherwise, compositors > > > > probably need a switch: "high quality color management? Then do not use KMS > > > > features." > > > > > > I think for alpha blending there are already rounding issues depending on the > > > hardware. I wouldn't keep my hopes up for any guarantee that all hw uses the > > > exact same formulae for color management stuff. > > > > Good, because otherwise you would be very quickly disappointed :-) > > > > For scaling we would also need to replicate the exact same filter taps, > > which are often not documented. > > That is where the documented tolerances come into play. This is something I've experimented with a while ago, when developing automated tests for the rcar-du driver. When playing with different input images we had to constantly increases tolerances, up to a point where the tests started to miss real problems :-( > Userspace projects need screenshot-based testing, and we need to know > how much tolerance we should allow or expect. > > Good reminder about CRCs. CRCs have zero tolerance, so they are not > useful for testing properties that have any leeway, are they? -- Regards, Laurent Pinchart 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=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,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 57867C48BE6 for ; Wed, 16 Jun 2021 21:05:50 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 07FD860698 for ; Wed, 16 Jun 2021 21:05:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 07FD860698 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 758786E829; Wed, 16 Jun 2021 21:05:49 +0000 (UTC) Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id 348AB6E829 for ; Wed, 16 Jun 2021 21:05:48 +0000 (UTC) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 21F5AFC9; Wed, 16 Jun 2021 23:05:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1623877545; bh=2IBPWP7hn6ucwodbxtkHel4D6eOZPP8Ec1jAvIB9tpo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RokUqXx2zOiLscgJQ8kMnrPUp7wLhensj/HpKU912X7Gd3s4AAYn6/hcKsSMShbHr 66f4J3p2xuUrDWgNtoT+gqvNcExviSmT5r0kvSt3bq4YAtM/tkSLTC+ZvSuPUxaAiK 0ZBy8fbZaz6qZF4IuVpJkL7alvqnhmyCzuc1dQCE= Date: Thu, 17 Jun 2021 00:05:24 +0300 From: Laurent Pinchart To: Pekka Paalanen Subject: Re: [PATCH v3] Documentation: gpu: Mention the requirements for new properties Message-ID: References: <20210611120309.2b5eb4htupv5ss32@e110455-lin.cambridge.arm.com> <20210614174912.15a49336@eldfell> <20210614152413.nguqia3s4tlowio4@e110455-lin.cambridge.arm.com> <20210615100335.0b8f96d5@eldfell> <20210615131656.2ecefdc4@eldfell> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210615131656.2ecefdc4@eldfell> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ludovic Desroches , Haneen Mohammed , Alexandre Belloni , Linux Doc Mailing List , Xinliang Liu , Daniel Vetter , Liviu Dudau , Alexandre Torgue , dri-devel , Sandy Huang , Melissa Wen , Andrzej Hajda , Thierry Reding , Gerd Hoffmann , Benjamin Gaignard , Anitha Chrisanthus , Daniel Vetter , Jonathan Hunter , Sam Ravnborg , Jerome Brunet , Marek Vasut , Jonathan Corbet , Joonyoung Shim , Krzysztof Kozlowski , Kevin Hilman , Neil Armstrong , Russell King , Steven Price , David Airlie , Xinwei Kong , Noralf =?utf-8?Q?Tr=C3=B8nnes?= , VMware Graphics , Alyssa Rosenzweig , Chen Feng , Hyun Kwon , NXP Linux Team , Chun-Kuang Hu , Tian Tao , Thomas Zimmermann , Jonas Karlman , Martin Blumenstingl , Edmund Dea , Sascha Hauer , Alison Wang , Roland Scheidegger , Shawn Guo , Ben Skeggs , Maxime Ripard , Rodrigo Vivi , Matthias Brugger , Chen-Yu Tsai , Sean Paul , Pengutronix Kernel Team , Paul Cercueil , Jernej Skrabec , Rodrigo Siqueira , Tomi Valkeinen , Hans de Goede , Andrew Jeffery , Yannick Fertr e , Boris Brezillon , Seung-Woo Kim , Nicolas Ferre , Robert Foss , Joel Stanley , Tomeu Vizoso , Kyungmin Park , Kieran Bingham , Qiang Yu , Maxime Coquelin , Alex Deucher , Huang Rui , Oleksandr Andrushchenko , Philippe Cornu , Jyri Sarha , Christian =?utf-8?B?S8O2bmln?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, Jun 15, 2021 at 01:16:56PM +0300, Pekka Paalanen wrote: > On Tue, 15 Jun 2021 12:45:57 +0300 Laurent Pinchart wrote: > > On Tue, Jun 15, 2021 at 07:15:18AM +0000, Simon Ser wrote: > > > On Tuesday, June 15th, 2021 at 09:03, Pekka Paalanen wrote: > > > > > > > indeed it will, but what else could one do to test userspace KMS > > > > clients in generic CI where all you can have is virtual hardware? Maybe > > > > in the long run VKMS needs to loop back to a userspace daemon that > > > > implements all the complex processing and returns the writeback result > > > > via VKMS again? That daemon would then need a single upstream, like the > > > > kernel, where it is maintained and correctness verified. > > > > > > The complex processing must be implemented even without write-back, because > > > user-space can ask for CRCs of the CRTC. > > > > > > > Or an LD_PRELOAD that hijacks all KMS ioctls and implements virtual > > > > stuff in userspace? Didn't someone already have something like that? > > > > It would need to be lifted to be a required part of kernel UAPI > > > > submissions, I suppose like IGT is nowadays. > > > > > > FWIW, I have a mock libdrm [1] for libliftoff. This is nowhere near a full > > > software implementation with write-back connectors, but allows to expose > > > virtual planes and check atomic commits in CI. > > > > > > [1]: https://github.com/emersion/libliftoff/blob/master/test/libdrm_mock.c > > > > > > > For compositor developers like me knowing the exact formulas would be a huge > > > > benefit as it would allow me to use KMS to off-load precision-sensitive > > > > operations (e.g. professional color management). Otherwise, compositors > > > > probably need a switch: "high quality color management? Then do not use KMS > > > > features." > > > > > > I think for alpha blending there are already rounding issues depending on the > > > hardware. I wouldn't keep my hopes up for any guarantee that all hw uses the > > > exact same formulae for color management stuff. > > > > Good, because otherwise you would be very quickly disappointed :-) > > > > For scaling we would also need to replicate the exact same filter taps, > > which are often not documented. > > That is where the documented tolerances come into play. This is something I've experimented with a while ago, when developing automated tests for the rcar-du driver. When playing with different input images we had to constantly increases tolerances, up to a point where the tests started to miss real problems :-( > Userspace projects need screenshot-based testing, and we need to know > how much tolerance we should allow or expect. > > Good reminder about CRCs. CRCs have zero tolerance, so they are not > useful for testing properties that have any leeway, are they? -- Regards, Laurent Pinchart