From 3b176007899e81aa6254131d09a9693b13bdbcd6 Mon Sep 17 00:00:00 2001 From: Paulo Zanoni Date: Tue, 11 Aug 2015 15:40:35 -0300 Subject: kms_frontbuffer_tracking: add information about more formats We're not using those formats yet, but a simple change to create_fb() allows us to use these formats without problems now. Signed-off-by: Paulo Zanoni --- tests/kms_frontbuffer_tracking.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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); -- cgit v1.2.3