Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp133354iof; Sun, 5 Jun 2022 23:21:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeR4KQKLjktS7Ey4v+xZa4t2njsBfWZEM8PW4YCBlqRY6bkON483LBifpkSuAPd2aprot4 X-Received: by 2002:a63:4a51:0:b0:3fd:d5d7:c493 with SMTP id j17-20020a634a51000000b003fdd5d7c493mr1692104pgl.512.1654496479023; Sun, 05 Jun 2022 23:21:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654496479; cv=none; d=google.com; s=arc-20160816; b=J4x3TZlM9hOLINuYMwn2C8UWlJGQk6nHdXCHFfpoK1wi7L8QXlN9bw5VA2crB1L+Ty WrBDAO6WcKg250jUtWcqyEWefbEgC7rVCavwhY7erF3dYQb+K+YR1LVCLGMpuTyOelVe ZkPn/7F1XNcGxjLRx4M+7k252+IE5svBpz7S4OJGkqSIMCIeDoHLEkr6uPFVQjqfurNX NfS4yYkiCYkpVThETi6sAKzOl35cKo2E3CvA/QcFg4HL15PMbIfzqa4apvYpOX3LTNJM aWCRA6pJf0aAtzLIDkVWEBsL3c9uuRlP60kosNTuv2Fxka6Q2eiXHnMK4t+kNemSKgCb upUA== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature:dkim-signature; bh=WSWWhdSOQKdEUaHqyqEBOb+/qAji3ZgVcCXOcQfuj/w=; b=UDEjmKURDP46Hawxq9GRsalyqKrnUaVXAqXwEnef4/l0kVQd+OBNz82Jb3JrvvYwbq tuNgA8mTpx7Tkvpbf1idcw231eJduTsOoHqoIl4ex3JmGKDSMx76Vz/KEd2a3dd6TmbX p+UOD/3OAv0i7p6l8kBYMmQefr+r0zyRf6wmu1MNNW1NQgKJyD8W9FD//nT/wbhUr2pr hZPShd29GuuPoRrb40Xu3UOKcFxQ/nE2rFkPFKUSg8cuBXPcmOiFt7P2TdVfrfwjowBv 36VAXxnGxlZbxg6LrY0QWHj/Vxgm+Dgx32zfBI4lQfVMiD2kcG4e1Pmls4y88WsqRO4j 6ZEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (expired) header.i=@cerno.tech; dkim=neutral (expired) header.i=@cerno.tech; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b17-20020a056a000a9100b0050d332b93b2si22965814pfl.18.2022.06.05.23.21.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 23:21:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=neutral (expired) header.i=@cerno.tech; dkim=neutral (expired) header.i=@cerno.tech; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8647EB7DCA; Sun, 5 Jun 2022 22:00:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242820AbiFCIYZ (ORCPT + 99 others); Fri, 3 Jun 2022 04:24:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229744AbiFCIYX (ORCPT ); Fri, 3 Jun 2022 04:24:23 -0400 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 348BC1B793 for ; Fri, 3 Jun 2022 01:24:21 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 978765C01F3; Fri, 3 Jun 2022 04:24:20 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 03 Jun 2022 04:24:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc: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=1654244660; x=1654331060; bh=WSWWhdSOQK dEUaHqyqEBOb+/qAji3ZgVcCXOcQfuj/w=; b=mX+E1LyPOiThUobyBvfFXjVreG IYTDFMyvGWA8FS8FFyIPfIU2oYLOMMHn+L9gPxNFDwiMevG0nLXEkyJoEpYTbsEP BIDzE0BtIH0eGd1EIa4pFaNht6Mmwkm6+uSr7vGPebatRwbHU+SN2qvRd/OZx11J iS3jKMLA1HK6yweGLCTyGQ/g9jNLQMoJ8RPmVA3n68bdRqR+j5yq1gVhI7H0LNQk ymYOBEPiBgEDc+QCBpdL57yR+QeBAN28w96afp2/j8WWEmfkcLot/E6sjnUf+1NC FAK9jEl8zSXkwXNG1Uu7TVXNPEMeC3k6YPftgYNXx0jtZS7xCuUOwhgTmCfw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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=1654244660; x=1654331060; bh=WSWWhdSOQKdEUaHqyqEBOb+/qAji 3ZgVcCXOcQfuj/w=; b=pSVVD7CgWjuVCHvoVIbP9Hb0zvmjUspNwG2zm7F5EWYX I2zrK4kjUc6dM8q5qrZ5x6kohUU09TIPTl3E58vKKB/z348qHm5Xv0Qfsh0JZaFK l++7mkhTQAUbGUxNZEKDW67ponV721LbNTezqS3pJH1nflHdtAHTdwrTYK3WPb8K cI2J3u+nr/ytkGKPKZf3DbybJE5DP1LIYF/ayya9h+KOVpialq3XPVs4LOn2xuWD 5ab73tqelbEH23Ej0ymBIwF6i8nZamnsEsI0k7mcfxZPi22Hd8CdePp2tbDCikli q2iJbZebKv5Mzcat9v1lWDgxYbmy+ZfHEaUqznN5mA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrleeigddtudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepkeetjeevgfdvleeiveeutefhfeejtdegvdeugeetvdduffeigfdtveeuffet feeknecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 3 Jun 2022 04:24:18 -0400 (EDT) Date: Fri, 3 Jun 2022 10:24:16 +0200 From: Maxime Ripard To: Roman Stratiienko Cc: wens@csie.org, jernej.skrabec@gmail.com, airlied@linux.ie, daniel@ffwll.ch, samuel@sholland.org, 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: <20220603082416.ukohug3mwzu43csu@penduick> References: <20220602180118.66170-1-r.stratiienko@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220602180118.66170-1-r.stratiienko@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 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 can'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-sufficient. > 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/sun4i/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 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. > + */ > +int sun8i_vi_keep_scaler_enabled; > +MODULE_PARM_DESC(keep_vi_scaler_enabled, > + "Keep VI scaler enabled (1 = enabled, 0 = disabled (default))"); > +module_param_named(keep_vi_scaler_enabled, sun8i_vi_keep_scaler_enabled, int, 0644); > + It's not clear to me why we would want to make that a parameter? If it never works, we should fix it once and for all and not allow a broken setup at all. Maxime