[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220413221916.50995-12-samuel@sholland.org>
Date: Wed, 13 Apr 2022 17:19:11 -0500
From: Samuel Holland <samuel@...lland.org>
To: Heiko Stübner <heiko@...ech.de>,
Sandy Huang <hjc@...k-chips.com>,
dri-devel@...ts.freedesktop.org
Cc: linux-rockchip@...ts.infradead.org,
Alistair Francis <alistair@...stair23.me>,
Ondřej Jirman <x@....cz>,
Andreas Kemnade <andreas@...nade.info>,
Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...ux.ie>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Samuel Holland <samuel@...lland.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Liang Chen <cl@...k-chips.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Michael Riesch <michael.riesch@...fvision.net>,
Nicolas Frattaroli <frattaroli.nicolas@...il.com>,
Peter Geis <pgwipeout@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Sam Ravnborg <sam@...nborg.org>,
Thierry Reding <thierry.reding@...il.com>,
Thomas Zimmermann <tzimmermann@...e.de>,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [RFC PATCH 11/16] drm/rockchip: ebc: Enable diff mode for partial refreshes
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 <samuel@...lland.org>
---
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
Powered by blists - more mailing lists