[PATCH 17/26] video: Add comments to struct sandbox_sdl_plat

Simon Glass sjg at chromium.org
Wed May 20 01:10:49 CEST 2020


This struct is not commented but needs it. Also fix the comment in
check_vidconsole_output() about the encoding for the rotation value.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 include/dm/test.h | 14 +++++++++++++-
 test/dm/video.c   |  3 ++-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/include/dm/test.h b/include/dm/test.h
index f0f36624ce..d39686cde2 100644
--- a/include/dm/test.h
+++ b/include/dm/test.h
@@ -159,7 +159,19 @@ enum {
 /* Declare a new driver model test */
 #define DM_TEST(_name, _flags)	UNIT_TEST(_name, _flags, dm_test)
 
-/* This platform data is needed in tests, so declare it here */
+/*
+ * struct sandbox_sdl_plat - Platform data for the SDL video driver
+ *
+ * This platform data is needed in tests, so declare it here
+ *
+ * @xres: Width of display in pixels
+ * @yres: Height of display in pixels
+ * @bpix: Log2 of bits per pixel (enum video_log2_bpp)
+ * @rot: Console rotation (0=normal orientation, 1=90 degrees clockwise,
+ *	2=upside down, 3=90 degree counterclockwise)
+ * @vidconsole_drv_name: Name of video console driver (set by tests)
+ * @font_size: Console font size to select (set by tests)
+ */
 struct sandbox_sdl_plat {
 	int xres;
 	int yres;
diff --git a/test/dm/video.c b/test/dm/video.c
index 68f5ba44e7..729c31b47d 100644
--- a/test/dm/video.c
+++ b/test/dm/video.c
@@ -188,7 +188,8 @@ DM_TEST(dm_test_video_ansi, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
  * check_vidconsole_output() - Run a text console test
  *
  * @uts:	Test state
- * @rot:	Console rotation (0, 90, 180, 270)
+ * @rot:	Console rotation (0=normal orientation, 1=90 degrees clockwise,
+ *		2=upside down, 3=90 degree counterclockwise)
  * @wrap_size:	Expected size of compressed frame buffer for the wrap test
  * @scroll_size: Same for the scroll test
  * @return 0 on success
-- 
2.26.2.761.g0e0b3e54be-goog



More information about the U-Boot mailing list