summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-02-04 14:53:00 -0500
committerTom Rini <trini@konsulko.com>2023-02-04 14:53:00 -0500
commitf8f47e6ff214a3ba7a61025bcc4dc058f507c279 (patch)
tree081b7f28b6d20344bcfc064dd8b39f0dce742061 /test
parenta209c3e6b48cf042d0220245a2d1636f74389c17 (diff)
parent03610ebf3520ae768ff90c4831f39088088ee666 (diff)
Merge tag 'video-20230204' of https://source.denx.de/u-boot/custodians/u-boot-video
- restore TI AM335x LCDC driver with DM support - make simple panel independent of backlight - add ofnode panel timing decode functions with test - add TIDSS video driver and AM62x splash screen - add TI logo
Diffstat (limited to 'test')
-rw-r--r--test/dm/test-fdt.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index 7cd2d046122..1d2af94f568 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -12,6 +12,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <dm/test.h>
+#include <dm/read.h>
#include <dm/root.h>
#include <dm/device-internal.h>
#include <dm/devres.h>
@@ -1157,6 +1158,41 @@ static int dm_test_decode_display_timing(struct unit_test_state *uts)
}
DM_TEST(dm_test_decode_display_timing, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
+/* Test dev_decode_panel_timing() */
+static int dm_test_decode_panel_timing(struct unit_test_state *uts)
+{
+ struct udevice *dev;
+ struct display_timing timing;
+
+ ut_assertok(uclass_first_device_err(UCLASS_TEST_FDT, &dev));
+ ut_asserteq_str("a-test", dev->name);
+
+ ut_assertok(dev_decode_panel_timing(dev, &timing));
+ ut_assert(timing.hactive.typ == 240);
+ ut_assert(timing.hback_porch.typ == 7);
+ ut_assert(timing.hfront_porch.typ == 6);
+ ut_assert(timing.hsync_len.typ == 1);
+ ut_assert(timing.vactive.typ == 320);
+ ut_assert(timing.vback_porch.typ == 5);
+ ut_assert(timing.vfront_porch.typ == 8);
+ ut_assert(timing.vsync_len.typ == 2);
+ ut_assert(timing.pixelclock.typ == 6500000);
+ ut_assert(timing.flags & DISPLAY_FLAGS_HSYNC_HIGH);
+ ut_assert(!(timing.flags & DISPLAY_FLAGS_HSYNC_LOW));
+ ut_assert(!(timing.flags & DISPLAY_FLAGS_VSYNC_HIGH));
+ ut_assert(timing.flags & DISPLAY_FLAGS_VSYNC_LOW);
+ ut_assert(timing.flags & DISPLAY_FLAGS_DE_HIGH);
+ ut_assert(!(timing.flags & DISPLAY_FLAGS_DE_LOW));
+ ut_assert(timing.flags & DISPLAY_FLAGS_PIXDATA_POSEDGE);
+ ut_assert(!(timing.flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE));
+ ut_assert(timing.flags & DISPLAY_FLAGS_INTERLACED);
+ ut_assert(timing.flags & DISPLAY_FLAGS_DOUBLESCAN);
+ ut_assert(timing.flags & DISPLAY_FLAGS_DOUBLECLK);
+
+ return 0;
+}
+DM_TEST(dm_test_decode_panel_timing, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
+
/* Test read_resourcee() */
static int dm_test_read_resource(struct unit_test_state *uts)
{