From: Svyatoslav Ryhel Date: Sat, 1 Mar 2025 12:37:59 +0000 (+0200) Subject: video: endeavoru-panel: move backlight request after probe X-Git-Tag: v2025.07-rc1~18^2~12^2~23 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=467f9275e73913e01b5e3813350c2caed468e462;p=pandora-u-boot.git video: endeavoru-panel: move backlight request after probe Due to the use of the Tegra DC backlight feature by the HTC ONE X, backlight requests MUST NOT be made during probe or earlier. This is because it creates a loop, as the backlight is a DC child. To mitigate this issue, backlight requests can be made later, once the backlight is actively used. Signed-off-by: Svyatoslav Ryhel --- diff --git a/drivers/video/endeavoru-panel.c b/drivers/video/endeavoru-panel.c index d4ba4d8b6da..90f838ecc20 100644 --- a/drivers/video/endeavoru-panel.c +++ b/drivers/video/endeavoru-panel.c @@ -117,6 +117,18 @@ static int endeavoru_panel_set_backlight(struct udevice *dev, int percent) struct endeavoru_panel_priv *priv = dev_get_priv(dev); int ret; + /* + * Due to the use of the Tegra DC backlight feature, backlight + * requests MUST NOT be made during probe or earlier. This is + * because it creates a loop, as the backlight is a DC child. + */ + ret = uclass_get_device_by_phandle(UCLASS_PANEL_BACKLIGHT, dev, + "backlight", &priv->backlight); + if (ret) { + log_err("cannot get backlight: ret = %d\n", ret); + return ret; + } + ret = backlight_enable(priv->backlight); if (ret) return ret; @@ -136,13 +148,6 @@ static int endeavoru_panel_of_to_plat(struct udevice *dev) struct endeavoru_panel_priv *priv = dev_get_priv(dev); int ret; - ret = uclass_get_device_by_phandle(UCLASS_PANEL_BACKLIGHT, dev, - "backlight", &priv->backlight); - if (ret) { - log_err("cannot get backlight: ret = %d\n", ret); - return ret; - } - ret = uclass_get_device_by_phandle(UCLASS_REGULATOR, dev, "vdd-supply", &priv->vdd); if (ret) {