[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231218-pinephone-pll-fixes-v1-0-e238b6ed6dc1@oltmanns.dev>
Date: Mon, 18 Dec 2023 14:35:18 +0100
From: Frank Oltmanns <frank@...manns.dev>
To: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>, Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...il.com>,
Samuel Holland <samuel@...lland.org>,
Guido Günther <agx@...xcpu.org>,
Purism Kernel Team <kernel@...i.sm>, Ondrej Jirman <megi@....cz>,
Neil Armstrong <neil.armstrong@...aro.org>,
Jessica Zhang <quic_jesszhan@...cinc.com>, Sam Ravnborg <sam@...nborg.org>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>
Cc: linux-clk@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-sunxi@...ts.linux.dev, linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org, Frank Oltmanns <frank@...manns.dev>
Subject: [PATCH 0/5] Pinephone video out fixes (flipping between two
frames)
On some pinephones the video output sometimes freezes (flips between two
frames) [1]. It seems to be that the reason for this behaviour is that
PLL-MIPI and PLL-VIDEO0 are operating outside there specified limits.
The changes I propose in this patch series consists of two major parts:
1. sunxi-ng: Adhere to the following constraints given in the
Allwinner A64 Manual:
a. PLL-MIPI:
* M/N >= 3
* (PLL_VIDEO0)/M >= 24MHz
b. PLL-VIDEO0:
* 8 <= N/M <= 25
2. Choose a higher clock rate for the ST7703 based XDB599 panel, so
that the panel functions with the Allwinner A64 SOC. PLL-MIPI
must run between 500 MHz and 1.4 GHz. As PLL-MIPI runs at 6 times
the panel's clock rate, we need its clock to be at least 83.333
MHz.
So far, I've tested the patches only on my pinephone. Before the patches
it would freeze at least every other day. With the patches it has not
shown this behavior in over a week.
I very much appreciate your feedback!
[1] https://gitlab.com/postmarketOS/pmaports/-/issues/805
Signed-off-by: Frank Oltmanns <frank@...manns.dev>
---
Frank Oltmanns (5):
clk: sunxi-ng: nkm: Support constraints on m/n ratio and parent rate
clk: sunxi-ng: a64: Add constraints on PLL-MIPI's n/m ratio and parent rate
clk: sunxi-ng: nm: Support constraints on n/m ratio and parent rate
clk: sunxi-ng: a64: Add constraints on PLL-VIDEO0's n/m ratio
drm/panel: st7703: Drive XBD599 panel at higher clock rate
drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 10 ++++++--
drivers/clk/sunxi-ng/ccu_nkm.c | 23 ++++++++++++++++++
drivers/clk/sunxi-ng/ccu_nkm.h | 8 +++++++
drivers/clk/sunxi-ng/ccu_nm.c | 21 +++++++++++++++--
drivers/clk/sunxi-ng/ccu_nm.h | 34 +++++++++++++++++++++++++--
drivers/gpu/drm/panel/panel-sitronix-st7703.c | 14 +++++------
6 files changed, 97 insertions(+), 13 deletions(-)
---
base-commit: d0ac5722dae5f4302bb4ef6df10d0afa718df80b
change-id: 20231218-pinephone-pll-fixes-0ccdfde273e4
Best regards,
--
Frank Oltmanns <frank@...manns.dev>
Powered by blists - more mailing lists