diff options
-rw-r--r-- | tests/kms_frontbuffer_tracking.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c index 0b5c67d2..c3900eb5 100644 --- a/tests/kms_frontbuffer_tracking.c +++ b/tests/kms_frontbuffer_tracking.c @@ -486,6 +486,13 @@ static uint32_t pick_color(struct igt_fb *fb, enum color ecolor) bool alpha = false; switch (fb->drm_format) { + case DRM_FORMAT_RGB565: + a = 0x0; + r = 0x1F << 11; + g = 0x3F << 5; + b = 0x1F; + b2 = 0x10; + break; case DRM_FORMAT_ARGB8888: alpha = true; case DRM_FORMAT_XRGB8888: @@ -495,6 +502,15 @@ static uint32_t pick_color(struct igt_fb *fb, enum color ecolor) b = 0xFF; b2 = 0x80; break; + case DRM_FORMAT_ARGB2101010: + alpha = true; + case DRM_FORMAT_XRGB2101010: + a = 0x3 << 30; + r = 0x3FF << 20; + g = 0x3FF << 10; + b = 0x3FF; + b2 = 0x200; + break; default: igt_assert(false); } @@ -993,8 +1009,12 @@ static void *busy_thread_func(void *data) static int fb_get_bpp(struct igt_fb *fb) { switch (fb->drm_format) { + case DRM_FORMAT_RGB565: + return 16; case DRM_FORMAT_XRGB8888: case DRM_FORMAT_ARGB8888: + case DRM_FORMAT_ARGB2101010: + case DRM_FORMAT_XRGB2101010: return 32; default: igt_assert(false); |