summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-02 21:12:17 -0600
committerBin Meng <bmeng.cn@gmail.com>2020-07-09 12:33:24 +0800
commit9beb364a2844605ae664c048853bcfef769f9464 (patch)
tree265096bade1fda7186b34428a429e515f758ed52 /test
parenta254d11dda3064489eeffa5cb935b212986627f3 (diff)
downloadu-boot-9beb364a2844605ae664c048853bcfef769f9464.tar.gz
u-boot-9beb364a2844605ae664c048853bcfef769f9464.tar.xz
u-boot-9beb364a2844605ae664c048853bcfef769f9464.zip
video: Adjust rotated console to start at right edge
At present when the console is rotated 180 degrees it starts almost a whole character to the left of the right edge (typically 7 pixels with an 8-pixel-wide font). On a display which aligns with the font width, this just wastes space. On a display that does not this can result in x_frac going negative for the final character (the one on the left side) and the overflow -EAGAIN check at the start of the function failing. Change the function to start at the rightmost pixel to fix these problems. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Anatolij Gustschin <agust@denx.de> Tested-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/dm/video.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/dm/video.c b/test/dm/video.c
index 0664e3f22b..68f5ba44e7 100644
--- a/test/dm/video.c
+++ b/test/dm/video.c
@@ -251,7 +251,7 @@ DM_TEST(dm_test_video_rotation1, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
/* Test rotated text output through the console uclass */
static int dm_test_video_rotation2(struct unit_test_state *uts)
{
- ut_assertok(check_vidconsole_output(uts, 2, 785, 446));
+ ut_assertok(check_vidconsole_output(uts, 2, 783, 445));
return 0;
}