diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/kms_cursor_crc.c | 1 | ||||
-rw-r--r-- | tests/kms_fbc_crc.c | 2 | ||||
-rw-r--r-- | tests/kms_flip.c | 15 | ||||
-rw-r--r-- | tests/kms_pipe_crc_basic.c | 1 | ||||
-rw-r--r-- | tests/kms_plane.c | 5 | ||||
-rw-r--r-- | tests/kms_render.c | 2 | ||||
-rw-r--r-- | tests/kms_setmode.c | 6 | ||||
-rw-r--r-- | tests/pm_lpsp.c | 5 | ||||
-rw-r--r-- | tests/pm_pc8.c | 6 | ||||
-rw-r--r-- | tests/testdisplay.c | 8 |
10 files changed, 26 insertions, 25 deletions
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c index f87fe0ba..f95448f4 100644 --- a/tests/kms_cursor_crc.c +++ b/tests/kms_cursor_crc.c @@ -27,7 +27,6 @@ #include <stdbool.h> #include <stdio.h> #include <string.h> -#include <drm_fourcc.h> #include "drmtest.h" #include "igt_debugfs.h" diff --git a/tests/kms_fbc_crc.c b/tests/kms_fbc_crc.c index db595c72..f1d918b4 100644 --- a/tests/kms_fbc_crc.c +++ b/tests/kms_fbc_crc.c @@ -27,8 +27,6 @@ #include <stdio.h> #include <string.h> -#include <drm_fourcc.h> - #include "drmtest.h" #include "igt_debugfs.h" #include "igt_kms.h" diff --git a/tests/kms_flip.c b/tests/kms_flip.c index 7ba16568..d147bf45 100644 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -1290,12 +1290,15 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs, if (o->flags & TEST_FENCE_STRESS) tiled = true; - o->fb_ids[0] = kmstest_create_fb(drm_fd, o->fb_width, o->fb_height, - o->bpp, o->depth, tiled, &o->fb_info[0]); - o->fb_ids[1] = kmstest_create_fb(drm_fd, o->fb_width, o->fb_height, - o->bpp, o->depth, tiled, &o->fb_info[1]); - o->fb_ids[2] = kmstest_create_fb(drm_fd, o->fb_width, o->fb_height, - o->bpp, o->depth, true, &o->fb_info[2]); + o->fb_ids[0] = kmstest_create_fb2(drm_fd, o->fb_width, o->fb_height, + bpp_depth_to_drm_format(o->bpp, o->depth), + tiled, &o->fb_info[0]); + o->fb_ids[1] = kmstest_create_fb2(drm_fd, o->fb_width, o->fb_height, + bpp_depth_to_drm_format(o->bpp, o->depth), + tiled, &o->fb_info[1]); + o->fb_ids[2] = kmstest_create_fb2(drm_fd, o->fb_width, o->fb_height, + bpp_depth_to_drm_format(o->bpp, o->depth), + true, &o->fb_info[2]); igt_assert(o->fb_ids[0]); igt_assert(o->fb_ids[1]); igt_assert(o->fb_ids[2]); diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c index ef3ab408..75217df4 100644 --- a/tests/kms_pipe_crc_basic.c +++ b/tests/kms_pipe_crc_basic.c @@ -26,7 +26,6 @@ #include <stdbool.h> #include <stdio.h> #include <string.h> -#include <drm_fourcc.h> #include "drmtest.h" #include "igt_debugfs.h" diff --git a/tests/kms_plane.c b/tests/kms_plane.c index 83d45c54..ca73f4f5 100644 --- a/tests/kms_plane.c +++ b/tests/kms_plane.c @@ -28,7 +28,6 @@ #include <stdbool.h> #include <stdio.h> #include <string.h> -#include <drm_fourcc.h> #include "drmtest.h" #include "igt_debugfs.h" @@ -69,9 +68,9 @@ create_fb_for_mode__position(data_t *data, drmModeModeInfo *mode, unsigned int fb_id; cairo_t *cr; - fb_id = kmstest_create_fb(data->drm_fd, + fb_id = kmstest_create_fb2(data->drm_fd, mode->hdisplay, mode->vdisplay, - 32 /* bpp */, 24 /* depth */, + DRM_FORMAT_XRGB8888, false /* tiling */, fb); igt_assert(fb_id); diff --git a/tests/kms_render.c b/tests/kms_render.c index 2179e65d..dda84421 100644 --- a/tests/kms_render.c +++ b/tests/kms_render.c @@ -30,8 +30,6 @@ #include <unistd.h> #include <sys/time.h> -#include <drm_fourcc.h> - #include "drmtest.h" #include "testdisplay.h" #include "intel_bufmgr.h" diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c index 703e9326..3a764c38 100644 --- a/tests/kms_setmode.c +++ b/tests/kms_setmode.c @@ -32,7 +32,6 @@ #include <getopt.h> #include <sys/time.h> -#include "drm_fourcc.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" @@ -189,8 +188,9 @@ static void create_fb_for_crtc(struct crtc_config *crtc, bpp = 32; depth = 24; enable_tiling = false; - fb_id = kmstest_create_fb(drm_fd, crtc->mode.hdisplay, - crtc->mode.vdisplay, bpp, depth, + fb_id = kmstest_create_fb2(drm_fd, crtc->mode.hdisplay, + crtc->mode.vdisplay, + bpp_depth_to_drm_format(bpp, depth), enable_tiling, fb_info); igt_assert(fb_id > 0); } diff --git a/tests/pm_lpsp.c b/tests/pm_lpsp.c index 87397055..aba6f7be 100644 --- a/tests/pm_lpsp.c +++ b/tests/pm_lpsp.c @@ -95,8 +95,9 @@ static uint32_t create_fb(int drm_fd, int width, int height) cairo_t *cr; uint32_t buffer_id; - buffer_id = kmstest_create_fb(drm_fd, width, height, 32, 24, false, - &fb); + buffer_id = kmstest_create_fb2(drm_fd, width, height, + DRM_FORMAT_XRGB8888, + false, &fb); cr = kmstest_get_cairo_ctx(drm_fd, &fb); kmstest_paint_test_pattern(cr, width, height); cairo_destroy(cr); diff --git a/tests/pm_pc8.c b/tests/pm_pc8.c index 3004c32e..5e4a1f99 100644 --- a/tests/pm_pc8.c +++ b/tests/pm_pc8.c @@ -40,7 +40,8 @@ #include <linux/i2c.h> #include <linux/i2c-dev.h> -#include "drm.h" +#include <drm.h> + #include "drmtest.h" #include "intel_batchbuffer.h" #include "intel_io.h" @@ -274,7 +275,8 @@ static struct scanout_fb *create_fb(struct mode_set_data *data, int width, fb_info = malloc(sizeof(struct scanout_fb)); igt_assert(fb_info); - fb_info->handle = kmstest_create_fb(drm_fd, width, height, 32, 24, + fb_info->handle = kmstest_create_fb2(drm_fd, width, height, + DRM_FORMAT_XRGB8888, false, &fb); fb_info->width = width; fb_info->height = height; diff --git a/tests/testdisplay.c b/tests/testdisplay.c index b70287ec..36412201 100644 --- a/tests/testdisplay.c +++ b/tests/testdisplay.c @@ -405,7 +405,8 @@ set_mode(struct connector *c) width = c->mode.hdisplay; height = c->mode.vdisplay; - fb_id = kmstest_create_fb(drm_fd, width, height, bpp, depth, + fb_id = kmstest_create_fb2(drm_fd, width, height, + bpp_depth_to_drm_format(bpp, depth), enable_tiling, &fb_info[current_fb]); paint_output_info(c, &fb_info[current_fb]); paint_color_key(&fb_info[current_fb]); @@ -531,8 +532,9 @@ static uint32_t create_stereo_fb(drmModeModeInfo *mode, struct kmstest_fb *fb) uint32_t fb_id; stereo_fb_layout_from_mode(&layout, mode); - fb_id = kmstest_create_fb(drm_fd, layout.fb_width, layout.fb_height, - bpp, depth, enable_tiling, fb); + fb_id = kmstest_create_fb2(drm_fd, layout.fb_width, layout.fb_height, + bpp_depth_to_drm_format(bpp, depth), + enable_tiling, fb); cr = kmstest_get_cairo_ctx(drm_fd, fb); kmstest_paint_image(cr, IGT_DATADIR"/1080p-left.png", |