Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: rcar-du: lvds: Set LVEN and LVRES bits together on D3

On the D3 SoC the LVDS PHY must be enabled in the same register write
that enables the LVDS output. Skip writing the LVEN bit independently
on that platform, it will be set by the write that sets LVRES.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>

+6 -2
+6 -2
drivers/gpu/drm/rcar-du/rcar_lvds.c
··· 485 485 } 486 486 487 487 if (lvds->info->quirks & RCAR_LVDS_QUIRK_GEN3_LVEN) { 488 - /* Turn on the LVDS PHY. */ 488 + /* 489 + * Turn on the LVDS PHY. On D3, the LVEN and LVRES bit must be 490 + * set at the same time, so don't write the register yet. 491 + */ 489 492 lvdcr0 |= LVDCR0_LVEN; 490 - rcar_lvds_write(lvds, LVDCR0, lvdcr0); 493 + if (!(lvds->info->quirks & RCAR_LVDS_QUIRK_PWD)) 494 + rcar_lvds_write(lvds, LVDCR0, lvdcr0); 491 495 } 492 496 493 497 if (!(lvds->info->quirks & RCAR_LVDS_QUIRK_EXT_PLL)) {