]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
video: tegra20: dc: fix image shift on rotated panels
authorSvyatoslav Ryhel <clamor95@gmail.com>
Tue, 23 Jan 2024 17:16:17 +0000 (19:16 +0200)
committerAnatolij Gustschin <agust@denx.de>
Sun, 21 Apr 2024 07:07:01 +0000 (09:07 +0200)
Subtracting 1 from x and y fixes image shifting on rotated
panels.

Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS Grouper E1565
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
drivers/video/tegra20/tegra-dc.c

index 7605e77bc1f9c10fffee44d0e35aa390b7b5bf3f..bcc274862389589013b3af16d31dba672749b059 100644 (file)
@@ -242,8 +242,8 @@ static int setup_window(struct tegra_lcd_priv *priv,
                        struct disp_ctl_win *win)
 {
        if (priv->rotation) {
-               win->x = priv->width * 2;
-               win->y = priv->height;
+               win->x = priv->width * 2 - 1;
+               win->y = priv->height - 1;
        } else {
                win->x = 0;
                win->y = 0;