diff options
author | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2015-08-11 15:40:35 -0300 |
---|---|---|
committer | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2015-08-14 15:30:56 -0300 |
commit | 3b176007899e81aa6254131d09a9693b13bdbcd6 (patch) | |
tree | cf9f15b154969d4186860b0c15967fd8d56c893a | |
parent | 606f039decec8623250979beb6f141ce4fa2f13c (diff) |
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 <paulo.r.zanoni@intel.com>
-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); |