Re: [PATCH 2/6] drm/format-helper: Add KUnit tests for drm_fb_swab()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Em 21/07/2023 15:23, Arthur Grillo escreveu:
Insert parameterized test for the drm_fb_swab() to ensure correctness
and prevent future regressions.

Signed-off-by: Arthur Grillo <arthurgrillo@xxxxxxxxxx>
---

[...]

+			.dst_pitch =  TEST_USE_DEFAULT_PITCH,
+			.expected = {
+				0xFFFFFF11, 0x00000022,
+				0x0000FF33, 0x00FF0044,
+				0xFF000055, 0xFF00FF66,
+				0x00FFFF77, 0xFFFF0088,
+			},
+		},
  	},
  	{
  		/* Randomly picked colors. Full buffer within the clip area. */
@@ -425,6 +448,14 @@ static struct convert_xrgb8888_case convert_xrgb8888_cases[] = {
  				0b010, 0b000,
  			},
  		},
+		.swab_result = {
+			.dst_pitch =  20,
+			.expected = {
+				0x9C440EA1, 0x054D11B1, 0x03F3A8C1, 0x00000000, 0x00000000,
+				0x73F06CD1, 0x9C440EA2, 0x054D11B2, 0x00000000, 0x00000000,
+				0x0303A8C2, 0x73F06CD2, 0x9C440EA3, 0x00000000, 0x00000000,

I would appreciated to have some information about those numbers in the commit message.



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux