mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-07 16:06:25 +00:00
kms_frontbuffer_tracking: use igt_drm_format_to_bpp()
The only format from fb_get_bpp() not supported by igt_drm_format_to_bpp() is ARGB2101010, but we don't really use it in kms_frontbuffer_tracking, so we can do the switch. Adding ARGB2101010 to igt_fb won't be that simple since there's no equivalent Cairo format, and igt_fb users assume that all formats known by igt_fb have equivalent Cairo formats. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
This commit is contained in:
parent
be6f3fadaf
commit
096e020743
@ -1102,21 +1102,6 @@ static void *busy_thread_func(void *data)
|
||||
pthread_exit(0);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
static void start_busy_thread(struct igt_fb *fb)
|
||||
{
|
||||
int rc;
|
||||
@ -1129,7 +1114,7 @@ static void start_busy_thread(struct igt_fb *fb)
|
||||
busy_thread.width = fb->width;
|
||||
busy_thread.height = fb->height;
|
||||
busy_thread.color = pick_color(fb, COLOR_PRIM_BG);
|
||||
busy_thread.bpp = fb_get_bpp(fb);
|
||||
busy_thread.bpp = igt_drm_format_to_bpp(fb->drm_format);
|
||||
|
||||
rc = pthread_create(&busy_thread.thread, NULL, busy_thread_func, NULL);
|
||||
igt_assert_eq(rc, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user