On Thu, 15 Oct 2026 14:15:55 +0300 Tomi Valkeinen <[email protected]> wrote:
> SYSCTRL affects the DPI output and the clock tree, but we configure it > late, when the DPI output is already enabled and clocks are running. > > Move the SYSCTRL configuration to the beginning, before anything is > enabled. > > Signed-off-by: Tomi Valkeinen <[email protected]> sounds sane so Reviewed-by: Andreas Kemnade <[email protected]> > --- > drivers/gpu/drm/bridge/tc358762.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/tc358762.c > b/drivers/gpu/drm/bridge/tc358762.c > index 26671dc66874..f5ee781275fc 100644 > --- a/drivers/gpu/drm/bridge/tc358762.c > +++ b/drivers/gpu/drm/bridge/tc358762.c > @@ -134,6 +134,13 @@ static int tc358762_init(struct tc358762 *ctx) > { > u32 lcdctrl; > > + tc358762_write(ctx, SYSCTRL, > + FIELD_PREP(SYSCTRL_DPIDATA_IO_MASK, > SYSCTRL_DPIDATA_IO_4MA) | > + FIELD_PREP(SYSCTRL_DPISTB_IO_MASK, > SYSCTRL_DPISTB_IO_4MA) | > + FIELD_PREP(SYSCTRL_PCLKDIV_MASK, SYSCTRL_PCLKDIV_DIV_3)); > + > + msleep(100); > + > tc358762_write(ctx, DSI_LANEENABLE, > DSI_LANEENABLE_L0EN | DSI_LANEENABLE_CLEN); > tc358762_write(ctx, PPI_D0S_CLRSIPOCOUNT, 5); > @@ -157,13 +164,6 @@ static int tc358762_init(struct tc358762 *ctx) > > tc358762_write(ctx, LCDCTRL, lcdctrl); > > - tc358762_write(ctx, SYSCTRL, > - FIELD_PREP(SYSCTRL_DPIDATA_IO_MASK, > SYSCTRL_DPIDATA_IO_4MA) | > - FIELD_PREP(SYSCTRL_DPISTB_IO_MASK, > SYSCTRL_DPISTB_IO_4MA) | > - FIELD_PREP(SYSCTRL_PCLKDIV_MASK, SYSCTRL_PCLKDIV_DIV_3)); > - > - msleep(100); > - > tc358762_write(ctx, PPI_STARTPPI, PPI_STARTPPI_STARTPPI); > tc358762_write(ctx, DSI_STARTDSI, DSI_STARTDSI_STARTDSI); > >
