]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
video: tegra20: dsi: use set_backlight for backlight only
authorJonas Schwöbel <jonasschwoebel@yahoo.de>
Tue, 23 Jan 2024 17:16:33 +0000 (19:16 +0200)
committerAnatolij Gustschin <agust@denx.de>
Sun, 21 Apr 2024 07:07:01 +0000 (09:07 +0200)
Shift the backlight set further to prevent visual glitches on
panel init.

Signed-off-by: Jonas Schwöbel <jonasschwoebel@yahoo.de>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
drivers/video/tegra20/tegra-dsi.c

index 7d63557d1b9fddd72dea5147ee1678210b62e496..13dae37806f1fcc92b1194a2c35ffdbe05e8741e 100644 (file)
@@ -766,10 +766,6 @@ static int tegra_dsi_encoder_enable(struct udevice *dev)
        if (ret)
                return ret;
 
-       ret = panel_set_backlight(priv->panel, BACKLIGHT_DEFAULT);
-       if (ret)
-               return ret;
-
        tegra_dsi_configure(dev, device->mode_flags);
 
        tegra_dc_enable_controller(dev);
@@ -784,8 +780,10 @@ static int tegra_dsi_encoder_enable(struct udevice *dev)
 
 static int tegra_dsi_bridge_set_panel(struct udevice *dev, int percent)
 {
-       /* Is not used in tegra dc */
-       return 0;
+       struct tegra_dsi_priv *priv = dev_get_priv(dev);
+
+       /* Turn on/off backlight */
+       return panel_set_backlight(priv->panel, percent);
 }
 
 static int tegra_dsi_panel_timings(struct udevice *dev,