Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp7721392ioo; Fri, 3 Jun 2022 12:02:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDkrdwrBGdAJi14OLJ9D/aQVxxKloBSNIbPf+cbXDp+90B045O8Ds9ctxlIYx62zgkfprN X-Received: by 2002:a63:5a21:0:b0:3fd:41e4:f833 with SMTP id o33-20020a635a21000000b003fd41e4f833mr1777626pgb.409.1654282955112; Fri, 03 Jun 2022 12:02:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654282955; cv=none; d=google.com; s=arc-20160816; b=DMDbaciDL08s9Vj+Cb+na059AQWr42MZoaENA0w4m/630Q3ib8jaqSb+XUrGPAIpUN X8hkPqWTsXtej/GbJxgqpMjawx5R4AxuZBOQZ0KDjApLDD43YYH5hKPgfzmWkw1ydHzt 8P6/zwBT8rw+DslfxD2Xw+Wds9cY4tyv3qNVeuGTblTEa+j7hiKNeG2SC2VhT1TcCF5Y vUrj2M1Y93xcsF2MUfadUFuxQNAtWHI5vyf0+7zThaCHqVzbrFsUItTatzFVpeF/v+jj 5VIB+e7IH5/iz7H2srUA7tRL0tUo4EPZrIvYWD2Dt1yBuihGnEP1WgnAnQCsNVApwfT0 buhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:feedback-id:dkim-signature:dkim-signature; bh=pgoZiSnqzAty0gGUl5sg2b1gr+4y+ok52CSZUbELnhs=; b=L2y4e2zJNLlngtB8oqKJQTjrHzAsSTVnm7d8ofLaNCrS8o+ZAR1tgITquFKgK7WMso Wh1djhSpsa+g8uA6aJG14Iu7Y1zqBXfVti4/vLmP1SQd5CrbI/YYVi8eLG/bZalNXYvt Sabn/2CLDMzJCYxQEoMspi4jinYeOaZpdMAMoPOJ9VmTP8HkB5GeWmHlWMq701CxK+uX 2ZctRrCk2qhJF1nsC/6kBk/1JNixyQWFXMZ2Ob33KYxVjv7XnknfJkVLnXQio3FRBr9G RImfmJAg5TRktS/zJ2LkNW5wmNDrLqc2dRaG7CAFLDfsNV160U0wPzFfUl4QpyFZxNE2 b/1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=saD5VBvb; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=mSTwklVk; 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=cerno.tech Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s74-20020a63774d000000b003db27cae6b4si11473616pgc.430.2022.06.03.12.02.17; Fri, 03 Jun 2022 12:02:35 -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=@cerno.tech header.s=fm3 header.b=saD5VBvb; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=mSTwklVk; 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=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241818AbiFCOUK (ORCPT + 99 others); Fri, 3 Jun 2022 10:20:10 -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 S240024AbiFCOTw (ORCPT ); Fri, 3 Jun 2022 10:19:52 -0400 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4463048304 for ; Fri, 3 Jun 2022 07:19:49 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 5F3913200903; Fri, 3 Jun 2022 10:19:47 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 03 Jun 2022 10:19:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1654265986; x= 1654352386; bh=pgoZiSnqzAty0gGUl5sg2b1gr+4y+ok52CSZUbELnhs=; b=s aD5VBvbWjH/db2z8oHPTUNAOcujnTSV9jgaaQCTKU/lI6S9I8nGS9VkV0uriJb3H lU5B8QwFz75okTIFfUu8b6CqrR3QOIKas0Ie/gtJae5KlPn4H+GLmz3f2KettEhC U0TTOmiBYWN7r/dygmyWbENX/Re+u5cjoKt8t4Y+XoyulAlJgW6QmCo2bsWW01kk f4rOUgbxyIn8FCmbYPYin0N2i9daK7X3P4qDtfg4QrhVMHiaOJlwxay9sHpJKP97 n6tz4Q4CvIK+JKvzWzG7hiF9Eu5itQrJj7K4QKALyVTqTqE7InhxxxxoRUI6btj+ SVyPrXh05MF2+RKm8m7wA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1654265986; x= 1654352386; bh=pgoZiSnqzAty0gGUl5sg2b1gr+4y+ok52CSZUbELnhs=; b=m STwklVkTq53ZdBXcFpxGYQlAzb7GEIkGYNgU1g/iSlmXfqHRidn1wOUIu50qzC8r z+MzGukeeIgtz8xTuK8aicpnkhOFy3SFYa1Q3/5BXdesp0i2M/cdI6art1c39dFC s0TgI/1/p+A4Zp/2yeEv35XF25NbySOQ+bnzNxwQ3ml6sM81AZxEyvrYfA2XDj2T TOcZbB4f5oLUo78+nEQ9lVEBFD1h7fQS4vzkc/Maj6kUQYgFnPK5NOU8vaYBjLSK KzeCK9yIsukI1EnKGaQ6UqMZiQZdF/iyE4ndGwHj378EfKisifvPvx9on4/OwLAU gWig2cWfKn7cOwgpKn7uQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrleeigdejfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtugfgjgesthhqredttddtjeenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpeefhfejveejfefgfedtudetvdfgleethefgvdevueelhedtheejteeuheeh geeikeenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggt hh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 3 Jun 2022 10:19:45 -0400 (EDT) Date: Fri, 3 Jun 2022 16:19:37 +0200 From: Maxime Ripard To: Roman Stratiienko Cc: wens@csie.org, Jernej =?utf-8?Q?=C5=A0krabec?= , airlied@linux.ie, Daniel Vetter , Samuel Holland , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, megi@xff.cz Subject: Re: [PATCH] drm/sun4i: sun8i: Add the ability to keep scaler enabled for VI layer Message-ID: <20220603141937.modhvsqa3urmpcxr@penduick> References: <20220602180118.66170-1-r.stratiienko@gmail.com> <20220603082416.ukohug3mwzu43csu@penduick> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Fri, Jun 03, 2022 at 11:57:35AM +0300, Roman Stratiienko wrote: > Hi Maxime, >=20 > =D0=BF=D1=82, 3 =D0=B8=D1=8E=D0=BD. 2022 =D0=B3. =D0=B2 11:24, Maxime Rip= ard : > > > > Hi, > > > > On Thu, Jun 02, 2022 at 06:01:18PM +0000, Roman Stratiienko wrote: > > > According to DE2.0/DE3.0 manual VI scaler enable register is double > > > buffered, but de facto it doesn't, or the hardware has the shadow > > > register latching issues which causes single-frame picture corruption > > > after changing the state of scaler enable register. > > > > > > Allow the user to keep the scaler always enabled, preventing the UI > > > glitches on the transition from scaled to unscaled state. > > > > > > NOTE: > > > UI layer scaler has more registers with double-buffering issue and ca= n't > > > be workarounded in the same manner. > > > > > > You may find a python test and a demo video for this issue at [1] > > > > > > [1]: https://github.com/GloDroid/glodroid_tests/issues/4 > > > > Please describe the issue entirely here. The commit log must be self-su= fficient. >=20 > Commit message already states "single-frame picture corruption after > changing the state of scaler enable register", therefore I find it > already self-sufficient >=20 > Also I find demo videos and link to tests useful for the followers to > go further with investigation. Until a couple of years, where that URL isn't valid anymore and it's just u= seless. > If you have something specific in mind when asking to enhance the > commit message please say it. What sequence of events trigger the issue, what issue it triggers and why your solution addresses it would be nice > > > Signed-off-by: Roman Stratiienko > > > --- > > > drivers/gpu/drm/sun4i/sun8i_mixer.c | 12 ++++++++++++ > > > drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 4 +++- > > > 2 files changed, 15 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/su= n4i/sun8i_mixer.c > > > index 71ab0a00b4de..15cad0330f66 100644 > > > --- a/drivers/gpu/drm/sun4i/sun8i_mixer.c > > > +++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c > > > @@ -27,6 +27,18 @@ > > > #include "sun8i_vi_layer.h" > > > #include "sunxi_engine.h" > > > > > > +/* According to DE2.0/DE3.0 manual VI scaler enable register is doub= le > > > + * buffered, but de facto it doesn't, or the hardware has the shadow > > > + * register latching issues which causes single-frame picture corrup= tion > > > + * after changing the state of scaler enable register. > > > + * Allow the user to keep the scaler always enabled, preventing the = UI > > > + * glitches on the transition from scaled to unscaled state. > > > + */ > > > +int sun8i_vi_keep_scaler_enabled; > > > +MODULE_PARM_DESC(keep_vi_scaler_enabled, > > > + "Keep VI scaler enabled (1 =3D enabled, 0 =3D disabled= (default))"); > > > +module_param_named(keep_vi_scaler_enabled, sun8i_vi_keep_scaler_enab= led, int, 0644); > > > + > > > > It's not clear to me why we would want to make that a parameter? > > > >1 If it never works, we should fix it once and for all and not allow a b= roken setup at all. >=20 > It's a hardware issue and can be fixed only within the hardware. >=20 > Current patch is a workaround that if enabled can cause increased > power consumption for existing users. Therefore I think it is better > to give existing distro-maintainers a chance to test it prior to > delivery. Except distro-maintainers are likely never going to notice that flag exists in the first place, won't be using it and thus the issue will remain. Maxime