Received: by 2002:a05:6512:3d0e:0:0:0:0 with SMTP id d14csp1134385lfv; Thu, 14 Apr 2022 08:24:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwU8h1g7yimX4S3DPi++m4ulT40rs7PUobLCbkufwFJd09Mqb0YdRpKPv6i3RNk5MaWRP1W X-Received: by 2002:a17:907:72c3:b0:6e8:a265:4232 with SMTP id du3-20020a17090772c300b006e8a2654232mr2741395ejc.86.1649949853839; Thu, 14 Apr 2022 08:24:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649949853; cv=none; d=google.com; s=arc-20160816; b=I3h3202YYqVDfcONwxiS5ckdWsNuY5Symj1r3B/FXdHoyqCxHAGcuYuLY+x31EEuKb sNLQGPafJUlybHgpnEJtkslBWQOrF+HNPNse0AXEzLl/BtvB/YRCZ4yY+EzYyqi8d2Gz kjWgGZVLeK3NBhBPuPmVGXfPsZ6hvDrycRe1NAmh0HWnEpvajm7fwG2MR+2gnLimASAB DSsD+Mxi2e3u9V51bUG4sc6nyvD71Mn/WYpjQRWO3N5iMfi2H8KPitEvv2FInQFcD52G ybz9m+aeJHi2vrXF6wnuo5bkf98Gp1SP/b+nIMhKYQpMJp+6GjdWbVjl+5iFvms2VPPA eY/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=QtOx4T0HCpftqJcX0VmKkuT5uvDIfTobCkM4Jig4EYE=; b=kzvEvxm8mqhzAN1uNKTRzc9mrSGDppNKkwKYlW5TD1Pl9zUPEPgTEXswNGygFDk9cT oPMxSZ8PRY+FvWj5RHCLMZIW8MMLLt4RWPYERWpmWaOD/73YpqWqYd+vy6fAm5CWOpl9 tymUG8/NX+vwb5Fn6Yh9a8f/LGCQHHMX+5OgPeXfG4lUaViW+fsDkicQh9qJPdGgnP2T HHbBu2CLSfLSBiaV6ysgGFb9yhFxPKy0F8F9kEkP4k+YoNSmSJhEPLisARwA2XfEwE6N zPHwvLMoVWtuHmSvHeNYZm2O+D0KKZv5KCdFc1ECPqdm7FhSNBHuOPM8kLiwTmMPgfB9 2rpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=XDrAt+uv; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=bZiOfd0i; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e22-20020a170906c01600b006df76385eaesi2161846ejz.846.2022.04.14.08.23.47; Thu, 14 Apr 2022 08:24:13 -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=@sholland.org header.s=fm2 header.b=XDrAt+uv; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=bZiOfd0i; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236437AbiDMWXV (ORCPT + 99 others); Wed, 13 Apr 2022 18:23:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237804AbiDMWW0 (ORCPT ); Wed, 13 Apr 2022 18:22:26 -0400 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 380AE23BF0; Wed, 13 Apr 2022 15:19:44 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id DA9EB5C0340; Wed, 13 Apr 2022 18:19:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 13 Apr 2022 18:19:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1649888383; x=1649974783; bh=Qt Ox4T0HCpftqJcX0VmKkuT5uvDIfTobCkM4Jig4EYE=; b=XDrAt+uvDf0VTBvnBx xV6fY/r43+56hVhxGIinMCoZBALz9K+MTpsGGOGYZcgk6X8fxFKUdcKfo7hvoAw3 rlmpRXK+IAxkbSMnxfTd5+xXfl+VKP+V2S4O6kLq/ucyEQM3VfupIPIbBFd9hLcV ZPMPME1EXUQFiCr7H4thhG4/vKr/pnP9lQ5WurO3wV5w3bhhxKYZj0yAxN2DZzwT 734mWh478oLDkTKIL4oh18DtNtf7b+LmWjZeUnJg5wzMJZCOJGrpn6KbsQ/Z545+ xSsE2wb6d1r/o65h9a8LVKYox9AM16nKNg8n6vcf8teN9UjOhVNU2t+c/tlrhQxo /N0A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :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= 1649888383; x=1649974783; bh=QtOx4T0HCpftqJcX0VmKkuT5uvDIfTobCkM 4Jig4EYE=; b=bZiOfd0iJLPlzQ2/ZVIL+ux8BJZtFvN7R7gXr9xO4tjFQReZG6S PgjGn2fxUzoxC4EUae30tFI2E3IIlAJjwYk204JoEi8fOaHmUYXaVarSrzf4o1Lk WuV6x7ne4j1UEmh/ke9qXMgHI1xMjhChma1ajoNjlDIXfx0oNu3ylhRnU/frmSXf +YyXpunm+zqpYIyFdAE7Ou1dKKfBWdWuJIxq81ihfgbEh3fvkehvdFA5X/LmuswJ wBIlg5Tjgs5+1kezxWtkNFRGBxwuo7fRQUeT2lDBmlJqXVWvjYkfgkNz/C0tbg6b YH1bkCZVzhPu3XJtnw2OAMA3UMV8iBJi0Jg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudelvddgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpeduhfejfedvhffgfeehtefghfeiiefgfeehgfdvvdevfeegjeehjedv gfejheeuieenucevlhhushhtvghrufhiiigvpeehnecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Apr 2022 18:19:42 -0400 (EDT) From: Samuel Holland To: =?UTF-8?q?Heiko=20St=C3=BCbner?= , Sandy Huang , dri-devel@lists.freedesktop.org Cc: linux-rockchip@lists.infradead.org, Alistair Francis , =?UTF-8?q?Ond=C5=99ej=20Jirman?= , Andreas Kemnade , Daniel Vetter , David Airlie , Geert Uytterhoeven , Samuel Holland , Krzysztof Kozlowski , Liang Chen , Maarten Lankhorst , Maxime Ripard , Michael Riesch , Nicolas Frattaroli , Peter Geis , Rob Herring , Sam Ravnborg , Thierry Reding , Thomas Zimmermann , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 11/16] drm/rockchip: ebc: Enable diff mode for partial refreshes Date: Wed, 13 Apr 2022 17:19:11 -0500 Message-Id: <20220413221916.50995-12-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220413221916.50995-1-samuel@sholland.org> References: <20220413221916.50995-1-samuel@sholland.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Some waveforms, such as GC16, cause the display to flash even when the previous and next pixel values are the same. This can be helpful, because it produces more consistent brightness, but usually it is more distracting. Add an option, enabled by default, for the hardware to ignore the LUT and always send zeroes for pixels with unchanged values. Signed-off-by: Samuel Holland --- drivers/gpu/drm/rockchip/rockchip_ebc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_ebc.c b/drivers/gpu/drm/rockchip/rockchip_ebc.c index c3e4b65bdee6..dcd8c8e8208e 100644 --- a/drivers/gpu/drm/rockchip/rockchip_ebc.c +++ b/drivers/gpu/drm/rockchip/rockchip_ebc.c @@ -158,6 +158,10 @@ static int default_waveform = DRM_EPD_WF_GC16; module_param(default_waveform, int, 0644); MODULE_PARM_DESC(default_waveform, "waveform to use for display updates"); +static bool diff_mode = true; +module_param(diff_mode, bool, 0644); +MODULE_PARM_DESC(diff_mode, "only compute waveforms for changed pixels"); + static bool skip_reset; module_param(skip_reset, bool, 0444); MODULE_PARM_DESC(skip_reset, "skip the initial display reset"); @@ -582,11 +586,14 @@ static void rockchip_ebc_refresh(struct rockchip_ebc *ebc, dsp_ctrl |= EBC_DSP_CTRL_DSP_LUT_MODE; } else { epd_ctrl |= EBC_EPD_CTRL_DSP_THREE_WIN_MODE; + if (diff_mode) + dsp_ctrl |= EBC_DSP_CTRL_DSP_DIFF_MODE; } regmap_update_bits(ebc->regmap, EBC_EPD_CTRL, EBC_EPD_CTRL_DSP_THREE_WIN_MODE, epd_ctrl); regmap_update_bits(ebc->regmap, EBC_DSP_CTRL, + EBC_DSP_CTRL_DSP_DIFF_MODE | EBC_DSP_CTRL_DSP_LUT_MODE, dsp_ctrl); -- 2.35.1