Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG

2023-04-12 Thread Maxime Ripard
On Wed, Apr 12, 2023 at 09:14:59AM +0200, Roman Beranek wrote: > On Wed Apr 5, 2023 at 5:03 PM CEST, Maxime Ripard wrote: > > On Wed, Apr 05, 2023 at 02:34:11PM +0200, Roman Beranek wrote: > > > It turns out however that the new dclk rates can't be set exactly as > > > requested without touching pl

Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG

2023-04-12 Thread Roman Beranek
On Wed Apr 5, 2023 at 5:03 PM CEST, Maxime Ripard wrote: > On Wed, Apr 05, 2023 at 02:34:11PM +0200, Roman Beranek wrote: > > It turns out however that the new dclk rates can't be set exactly as > > requested without touching pll-video0*, tcon0 now therefore gets > > reparented from pll-mipi to pll

Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG

2023-04-11 Thread Roman Beranek
On Sat Apr 8, 2023 at 9:07 AM CEST, Jernej Škrabec wrote: > Dne sreda, 05. april 2023 ob 14:34:11 CEST je Roman Beranek napisal(a): > > While simply forbidding the video0-2x mux option seems > > to me as the right way to go because there's not much use for it with > > non-DSI interfaces either besi

Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG

2023-04-08 Thread Jernej Škrabec
Dne sreda, 05. april 2023 ob 14:34:11 CEST je Roman Beranek napisal(a): > Hello Maxime, > > On Wed Mar 29, 2023 at 9:58 PM CEST, Maxime Ripard wrote: > > > In order to preserve semantic correctness however, I propose to preface > > > the change with a patch that renames sun4i_dotclock and tcon-pix

Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG

2023-04-05 Thread Maxime Ripard
On Wed, Apr 05, 2023 at 02:34:11PM +0200, Roman Beranek wrote: > Hello Maxime, > > On Wed Mar 29, 2023 at 9:58 PM CEST, Maxime Ripard wrote: > > > In order to preserve semantic correctness however, I propose to preface > > > the change with a patch that renames sun4i_dotclock and tcon-pixel-clock

Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG

2023-04-05 Thread Roman Beranek
Hello Maxime, On Wed Mar 29, 2023 at 9:58 PM CEST, Maxime Ripard wrote: > > In order to preserve semantic correctness however, I propose to preface > > the change with a patch that renames sun4i_dotclock and tcon-pixel-clock > > such that dot/pixel is replaced with d/data. What do you think? > > I

Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG

2023-03-30 Thread Roman Beranek
Hello Frank, On Thu Mar 30, 2023 at 6:45 AM CEST, Frank Oltmanns wrote: > Roman, will you please submit a V2 of the patch I submitted then? Or do > you want me to do it? Yes, I'm already on it, only missing a cover letter. Roman

Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG

2023-03-29 Thread Frank Oltmanns
Hi Roman, On 2023-03-29 at 21:58:02 +0200, Maxime Ripard wrote: > On Tue, Mar 28, 2023 at 01:48:33AM +0200, Roman Beranek wrote: >> On Mon Mar 27, 2023 at 10:20 PM CEST, Maxime Ripard wrote: >> > >> > On Sat, Mar 25, 2023 at 12:40:04PM +0100, Frank Oltmanns wrote: >> > > Claiming to set the divid

Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG

2023-03-29 Thread Frank Oltmanns
Hi, On 2023-03-29 at 21:56:39 +0200, Maxime Ripard wrote: > Hi, > > On Tue, Mar 28, 2023 at 09:28:19PM +0200, Frank Oltmanns wrote: >> --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c >> +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c >> @@ -819,6 +819,34 @@ static void sun6i_dsi_encoder_disable(struc

Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG

2023-03-29 Thread Maxime Ripard
On Tue, Mar 28, 2023 at 01:48:33AM +0200, Roman Beranek wrote: > On Mon Mar 27, 2023 at 10:20 PM CEST, Maxime Ripard wrote: > > > > On Sat, Mar 25, 2023 at 12:40:04PM +0100, Frank Oltmanns wrote: > > > Claiming to set the divider to a different value (bpp / lanes) than what > > > we’re actually us

Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG

2023-03-29 Thread Maxime Ripard
Hi, On Tue, Mar 28, 2023 at 09:28:19PM +0200, Frank Oltmanns wrote: > --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c > +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c > @@ -819,6 +819,34 @@ static void sun6i_dsi_encoder_disable(struct drm_encoder > *encoder) > regulator_disable(dsi->regulator);

Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG

2023-03-28 Thread Frank Oltmanns
Hi, On 2023-03-27 at 22:20:45 +0200, Maxime Ripard wrote: > Hi, > > On Sat, Mar 25, 2023 at 12:40:04PM +0100, Frank Oltmanns wrote: [...] >> Actually, I had the following third patch prepared that adjusted the >> dotclock rate so that the >> required PLL rate is set. But again, this seems very

Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG

2023-03-27 Thread Roman Beranek
On Mon Mar 27, 2023 at 10:20 PM CEST, Maxime Ripard wrote: > > On Sat, Mar 25, 2023 at 12:40:04PM +0100, Frank Oltmanns wrote: > > Claiming to set the divider to a different value (bpp / lanes) than what > > we’re actually using in > > the end (SUN6I_DSIO_TCON_DIV) is somehow bugging me. I feel li

Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG

2023-03-27 Thread Maxime Ripard
On Tue, Mar 21, 2023 at 09:53:11PM +0100, Roman Beranek wrote: > On Tue Mar 21, 2023 at 5:50 PM CET, Roman Beranek wrote: > > > > Also, how was it tested/confirmed? > > > > By counting Vblank interrupts (GIC 118). > > Sorry, that was perhaps too abbreviated. To test this change, I set up > an A64

Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG

2023-03-27 Thread Maxime Ripard
Hi, On Sat, Mar 25, 2023 at 12:40:04PM +0100, Frank Oltmanns wrote: > On 2023-03-20 at 17:16:36 +0100, Roman Beranek > wrote: > > In the case of DSI output, the value of SUN4I_TCON0_DCLK_DIV (4) does > > not represent the actual dotclock divider, PLL_MIPI instead runs at > > (bpp / lanes )-multi

Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG

2023-03-25 Thread Frank Oltmanns
Hi, On 2023-03-20 at 17:16:36 +0100, Roman Beranek wrote: > In the case of DSI output, the value of SUN4I_TCON0_DCLK_DIV (4) does > not represent the actual dotclock divider, PLL_MIPI instead runs at > (bpp / lanes )-multiple [1] of the dotclock. [2] Setting 4 as dotclock > divder thus leads to r

Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG

2023-03-21 Thread Roman Beranek
On Tue Mar 21, 2023 at 5:50 PM CET, Roman Beranek wrote: > > Also, how was it tested/confirmed? > > By counting Vblank interrupts (GIC 118). Sorry, that was perhaps too abbreviated. To test this change, I set up an A64 board running kmscube on DSI-1 and verified that the rate of Vblank IRQs track

Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG

2023-03-21 Thread Roman Beranek
Hello Maxime, On Tue Mar 21, 2023 at 3:56 PM CET, Maxime Ripard wrote: > > This is similar to > https://lore.kernel.org/all/20230319160704.9858-2-fr...@oltmanns.dev/ > > What's the story there? Yes, Frank Oltmanns wrote me recently in relation to a patch I wrote ~ 3 years ago that addressed the f

Re: [PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG

2023-03-21 Thread Maxime Ripard
Hi, On Mon, Mar 20, 2023 at 05:16:36PM +0100, Roman Beranek wrote: > In the case of DSI output, the value of SUN4I_TCON0_DCLK_DIV (4) does > not represent the actual dotclock divider, PLL_MIPI instead runs at > (bpp / lanes )-multiple [1] of the dotclock. [2] Setting 4 as dotclock > divder thus le

[PATCH] drm/sun4i: uncouple DSI dotclock divider from TCON0_DCLK_REG

2023-03-20 Thread Roman Beranek
In the case of DSI output, the value of SUN4I_TCON0_DCLK_DIV (4) does not represent the actual dotclock divider, PLL_MIPI instead runs at (bpp / lanes )-multiple [1] of the dotclock. [2] Setting 4 as dotclock divder thus leads to reduced frame rate, specifically by 1/3 on 4-lane panels, and by 2/3