summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>2015-03-03 14:11:01 +0000
committerDamien Lespiau <damien.lespiau@intel.com>2015-03-12 14:23:48 +0000
commite36091d1c7010e825897dc4487f9985ab353973b (patch)
tree9551cea280183f470119d7616748c70f7744cb9f /tests
parent672e88acb72bf58f322af928b2bc636d14aa9f21 (diff)
tiling: Convert framebuffer helpers to use fb modifiers
This converts the IGT API only, underneath legacy set_tiling is still used. v2: One got away in kms_flip. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/kms_3d.c2
-rw-r--r--tests/kms_cursor_crc.c8
-rw-r--r--tests/kms_fbc_crc.c4
-rw-r--r--tests/kms_fence_pin_leak.c4
-rw-r--r--tests/kms_flip.c8
-rw-r--r--tests/kms_flip_event_leak.c4
-rw-r--r--tests/kms_flip_tiling.c7
-rw-r--r--tests/kms_mmio_vs_cs_flip.c12
-rw-r--r--tests/kms_pipe_crc_basic.c2
-rw-r--r--tests/kms_plane.c8
-rw-r--r--tests/kms_psr_sink_crc.c8
-rw-r--r--tests/kms_pwrite_crc.c4
-rw-r--r--tests/kms_render.c8
-rw-r--r--tests/kms_rotation_crc.c4
-rw-r--r--tests/kms_setmode.c2
-rw-r--r--tests/kms_sink_crc_basic.c6
-rw-r--r--tests/kms_universal_plane.c18
-rw-r--r--tests/pm_lpsp.c2
-rw-r--r--tests/pm_rpm.c26
-rw-r--r--tests/testdisplay.c4
20 files changed, 75 insertions, 66 deletions
diff --git a/tests/kms_3d.c b/tests/kms_3d.c
index 6588d9d2..fdc05b1f 100644
--- a/tests/kms_3d.c
+++ b/tests/kms_3d.c
@@ -103,7 +103,7 @@ igt_simple_main
/* create stereo framebuffer */
fb_id = igt_create_stereo_fb(drm_fd, &connector->modes[i],
igt_bpp_depth_to_drm_format(32, 32),
- I915_TILING_NONE);
+ LOCAL_DRM_FORMAT_MOD_NONE);
ret = drmModeSetCrtc(drm_fd, config.crtc->crtc_id, fb_id, 0, 0,
&connector->connector_id, 1,
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 94e2b4a7..fca82487 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -279,7 +279,7 @@ static bool prepare_crtc(data_t *data, igt_output_t *output,
mode = igt_output_get_mode(output);
igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
- I915_TILING_NONE,
+ LOCAL_DRM_FORMAT_MOD_NONE,
0.0, 0.0, 0.0,
&data->primary_fb);
@@ -384,7 +384,8 @@ static void create_cursor_fb(data_t *data, int cur_w, int cur_h)
* with non-square cursors).
*/
fb_id = igt_create_color_fb(data->drm_fd, cur_w, cur_h + 1,
- DRM_FORMAT_ARGB8888, I915_TILING_NONE,
+ DRM_FORMAT_ARGB8888,
+ LOCAL_DRM_FORMAT_MOD_NONE,
1.0, 1.0, 1.0,
&data->fb);
@@ -419,7 +420,8 @@ static void test_cursor_size(data_t *data)
* smaller ones to see that the size is applied correctly
*/
fb_id = igt_create_fb(data->drm_fd, cursor_max_size, cursor_max_size,
- DRM_FORMAT_ARGB8888, I915_TILING_NONE, &data->fb);
+ DRM_FORMAT_ARGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
+ &data->fb);
igt_assert(fb_id);
/* Use a solid white rectangle as the cursor */
diff --git a/tests/kms_fbc_crc.c b/tests/kms_fbc_crc.c
index 32c3d989..b6de2184 100644
--- a/tests/kms_fbc_crc.c
+++ b/tests/kms_fbc_crc.c
@@ -324,12 +324,12 @@ static bool prepare_test(data_t *data, enum test_mode test_mode)
data->fb_id[0] = igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
- I915_TILING_X,
+ LOCAL_I915_FORMAT_MOD_X_TILED,
0.0, 0.0, 0.0, &data->fb[0]);
igt_assert(data->fb_id[0]);
data->fb_id[1] = igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
- I915_TILING_X,
+ LOCAL_I915_FORMAT_MOD_X_TILED,
0.1, 0.1, 0.1,
&data->fb[1]);
igt_assert(data->fb_id[1]);
diff --git a/tests/kms_fence_pin_leak.c b/tests/kms_fence_pin_leak.c
index 7f530e65..4d3d37a2 100644
--- a/tests/kms_fence_pin_leak.c
+++ b/tests/kms_fence_pin_leak.c
@@ -131,12 +131,12 @@ static bool run_single_test(data_t *data, enum pipe pipe, igt_output_t *output)
igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
- I915_TILING_X, /* need a fence so must be tiled */
+ LOCAL_I915_FORMAT_MOD_X_TILED , /* need a fence so must be tiled */
0.0, 0.0, 0.0,
&fb[0]);
igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
- I915_TILING_X, /* need a fence so must be tiled */
+ LOCAL_I915_FORMAT_MOD_X_TILED, /* need a fence so must be tiled */
0.0, 0.0, 0.0,
&fb[1]);
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 30139caa..25c92430 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1325,7 +1325,7 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
char test_name[128];
unsigned elapsed;
unsigned bo_size = 0;
- unsigned int tiling;
+ uint64_t tiling;
int i;
switch (crtc_count) {
@@ -1357,9 +1357,9 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
if (o->flags & TEST_PAN)
o->fb_width *= 2;
- tiling = I915_TILING_NONE;
+ tiling = LOCAL_DRM_FORMAT_MOD_NONE;
if (o->flags & TEST_FENCE_STRESS)
- tiling = I915_TILING_X;
+ tiling = LOCAL_I915_FORMAT_MOD_X_TILED;
/* 256 MB is usually the maximum mappable aperture,
* (make it 4x times that to ensure failure) */
@@ -1374,7 +1374,7 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
tiling, &o->fb_info[1], bo_size);
o->fb_ids[2] = igt_create_fb(drm_fd, o->fb_width, o->fb_height,
igt_bpp_depth_to_drm_format(o->bpp, o->depth),
- I915_TILING_X, &o->fb_info[2]);
+ LOCAL_I915_FORMAT_MOD_X_TILED, &o->fb_info[2]);
igt_assert(o->fb_ids[0]);
igt_assert(o->fb_ids[1]);
if (o->flags & TEST_FB_BAD_TILING)
diff --git a/tests/kms_flip_event_leak.c b/tests/kms_flip_event_leak.c
index b397df48..4e9f58a0 100644
--- a/tests/kms_flip_event_leak.c
+++ b/tests/kms_flip_event_leak.c
@@ -67,7 +67,7 @@ static bool test(data_t *data, enum pipe pipe, igt_output_t *output)
igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
- true, /* tiled */
+ LOCAL_I915_FORMAT_MOD_X_TILED,
0.0, 0.0, 0.0, &fb[0]);
igt_plane_set_fb(primary, &fb[0]);
@@ -83,7 +83,7 @@ static bool test(data_t *data, enum pipe pipe, igt_output_t *output)
igt_create_color_fb(fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
- true, /* tiled */
+ LOCAL_I915_FORMAT_MOD_X_TILED,
0.0, 0.0, 0.0, &fb[1]);
ret = drmModePageFlip(fd, output->config.crtc->crtc_id,
fb[1].fb_id, DRM_MODE_PAGE_FLIP_EVENT,
diff --git a/tests/kms_flip_tiling.c b/tests/kms_flip_tiling.c
index 32f167ab..7d6998b0 100644
--- a/tests/kms_flip_tiling.c
+++ b/tests/kms_flip_tiling.c
@@ -84,7 +84,8 @@ test_flip_changes_tiling(data_t *data, igt_output_t *output)
while (width < mode->hdisplay)
width *= 2;
fb_id = igt_create_fb(data->drm_fd, width, mode->vdisplay,
- DRM_FORMAT_XRGB8888, I915_TILING_NONE, &linear);
+ DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
+ &linear);
/* fill it with a pattern that will look wrong if tiling is wrong */
fill_linear_fb(&linear, data, mode);
@@ -96,8 +97,8 @@ test_flip_changes_tiling(data_t *data, igt_output_t *output)
/* allocate a tiled buffer and set the crtc with it */
igt_create_color_fb(data->drm_fd, width, mode->vdisplay,
- DRM_FORMAT_XRGB8888, I915_TILING_X, 0.0, 0.0, 0.0,
- &tiled);
+ DRM_FORMAT_XRGB8888, LOCAL_I915_FORMAT_MOD_X_TILED,
+ 0.0, 0.0, 0.0, &tiled);
igt_plane_set_fb(primary, &tiled);
igt_display_commit(&data->display);
diff --git a/tests/kms_mmio_vs_cs_flip.c b/tests/kms_mmio_vs_cs_flip.c
index b77f7aee..b24c7f4e 100644
--- a/tests/kms_mmio_vs_cs_flip.c
+++ b/tests/kms_mmio_vs_cs_flip.c
@@ -218,17 +218,17 @@ test_plane(data_t *data, igt_output_t *output, enum pipe pipe, enum igt_plane pl
mode = igt_output_get_mode(output);
igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
- I915_TILING_NONE,
+ LOCAL_DRM_FORMAT_MOD_NONE,
1.0, 0.0, 0.0,
&red_fb);
igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
- I915_TILING_NONE,
+ LOCAL_DRM_FORMAT_MOD_NONE,
0.0, 1.0, 0.0,
&green_fb);
igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
- I915_TILING_NONE,
+ LOCAL_DRM_FORMAT_MOD_NONE,
0.0, 0.0, 1.0,
&blue_fb);
@@ -368,17 +368,17 @@ test_crtc(data_t *data, igt_output_t *output, enum pipe pipe)
mode = igt_output_get_mode(output);
igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay+1,
DRM_FORMAT_XRGB8888,
- I915_TILING_NONE,
+ LOCAL_DRM_FORMAT_MOD_NONE,
1.0, 0.0, 0.0,
&red_fb);
igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay+1,
DRM_FORMAT_XRGB8888,
- I915_TILING_NONE,
+ LOCAL_DRM_FORMAT_MOD_NONE,
0.0, 0.0, 1.0,
&blue_fb);
igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay+1,
DRM_FORMAT_XRGB8888,
- I915_TILING_NONE,
+ LOCAL_DRM_FORMAT_MOD_NONE,
0.0, 1.0, 0.0,
&green_fb);
diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
index a658b39d..bbedd588 100644
--- a/tests/kms_pipe_crc_basic.c
+++ b/tests/kms_pipe_crc_basic.c
@@ -138,7 +138,7 @@ test_read_crc_for_output(data_t *data, int pipe, igt_output_t *output,
igt_create_color_fb(data->drm_fd,
mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
- I915_TILING_NONE,
+ LOCAL_DRM_FORMAT_MOD_NONE,
colors[c].r,
colors[c].g,
colors[c].b,
diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index b66ab1d2..ffd31e01 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -79,7 +79,7 @@ test_grab_crc(data_t *data, igt_output_t *output, enum pipe pipe,
mode = igt_output_get_mode(output);
igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
- I915_TILING_NONE,
+ LOCAL_DRM_FORMAT_MOD_NONE,
fb_color->red, fb_color->green, fb_color->blue,
&fb);
igt_plane_set_fb(primary, &fb);
@@ -131,7 +131,7 @@ create_fb_for_mode__position(data_t *data, drmModeModeInfo *mode,
fb_id = igt_create_fb(data->drm_fd,
mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
- I915_TILING_NONE,
+ LOCAL_DRM_FORMAT_MOD_NONE,
fb);
igt_assert(fb_id);
@@ -181,7 +181,7 @@ test_plane_position_with_output(data_t *data,
igt_create_color_fb(data->drm_fd,
64, 64, /* width, height */
DRM_FORMAT_XRGB8888,
- I915_TILING_NONE,
+ LOCAL_DRM_FORMAT_MOD_NONE,
0.0, 1.0, 0.0,
&sprite_fb);
igt_plane_set_fb(sprite, &sprite_fb);
@@ -263,7 +263,7 @@ create_fb_for_mode__panning(data_t *data, drmModeModeInfo *mode,
fb_id = igt_create_fb(data->drm_fd,
mode->hdisplay * 2, mode->vdisplay * 2,
DRM_FORMAT_XRGB8888,
- I915_TILING_NONE,
+ LOCAL_DRM_FORMAT_MOD_NONE,
fb);
igt_assert(fb_id);
diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c
index ddcc903f..ba6fb1d6 100644
--- a/tests/kms_psr_sink_crc.c
+++ b/tests/kms_psr_sink_crc.c
@@ -91,7 +91,7 @@ static void create_cursor_fb(data_t *data)
uint32_t fb_id;
fb_id = igt_create_fb(data->drm_fd, 64, 64,
- DRM_FORMAT_ARGB8888, I915_TILING_NONE,
+ DRM_FORMAT_ARGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
&data->fb_white);
igt_assert(fb_id);
@@ -436,7 +436,8 @@ static void run_test(data_t *data)
igt_create_color_fb(data->drm_fd,
mode->hdisplay, mode->vdisplay,
- DRM_FORMAT_XRGB8888, I915_TILING_X,
+ DRM_FORMAT_XRGB8888,
+ LOCAL_I915_FORMAT_MOD_X_TILED,
0.0, 1.0, 0.0,
&data->fb_green);
@@ -459,7 +460,8 @@ static void run_test(data_t *data)
case PRIMARY:
igt_create_color_fb(data->drm_fd,
white_h, white_v,
- DRM_FORMAT_XRGB8888, I915_TILING_X,
+ DRM_FORMAT_XRGB8888,
+ LOCAL_I915_FORMAT_MOD_X_TILED,
1.0, 1.0, 1.0,
&data->fb_white);
break;
diff --git a/tests/kms_pwrite_crc.c b/tests/kms_pwrite_crc.c
index aa1d3a30..a8e40ef3 100644
--- a/tests/kms_pwrite_crc.c
+++ b/tests/kms_pwrite_crc.c
@@ -65,7 +65,7 @@ static void test(data_t *data)
/* create a non-white fb where we can pwrite later */
igt_create_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
- DRM_FORMAT_XRGB8888, I915_TILING_NONE, fb);
+ DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE, fb);
cr = igt_get_cairo_ctx(data->drm_fd, fb);
igt_paint_test_pattern(cr, fb->width, fb->height);
@@ -123,7 +123,7 @@ static bool prepare_crtc(data_t *data)
/* create a white reference fb and flip to it */
igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
- DRM_FORMAT_XRGB8888, I915_TILING_NONE,
+ DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
1.0, 1.0, 1.0, &data->fb[0]);
data->primary = igt_output_get_plane(output, IGT_PLANE_PRIMARY);
diff --git a/tests/kms_render.c b/tests/kms_render.c
index 6e70aa91..1759eaa3 100644
--- a/tests/kms_render.c
+++ b/tests/kms_render.c
@@ -125,12 +125,12 @@ static int test_format(const char *test_name,
width = mode->hdisplay;
height = mode->vdisplay;
- if (!igt_create_fb(drm_fd, width, height, format, I915_TILING_NONE,
- &fb[0]))
+ if (!igt_create_fb(drm_fd, width, height, format,
+ LOCAL_DRM_FORMAT_MOD_NONE, &fb[0]))
goto err1;
- if (!igt_create_fb(drm_fd, width, height, format, I915_TILING_NONE,
- &fb[1]))
+ if (!igt_create_fb(drm_fd, width, height, format,
+ LOCAL_DRM_FORMAT_MOD_NONE, &fb[1]))
goto err2;
if (drmModeSetCrtc(drm_fd, cconf->crtc->crtc_id, fb[0].fb_id,
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 7f09df31..a57692e1 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -97,14 +97,14 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe,
fb_id = igt_create_fb(data->gfx_fd,
mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
- false, /* tiled */
+ LOCAL_DRM_FORMAT_MOD_NONE,
&data->fb);
igt_assert(fb_id);
fb_cursor_id = igt_create_fb(data->gfx_fd,
128, 128,
DRM_FORMAT_ARGB8888,
- false, /* tiled */
+ LOCAL_DRM_FORMAT_MOD_NONE,
&data->fb_cursor);
igt_assert(fb_cursor_id);
diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
index 25caad9a..5520dcc8 100644
--- a/tests/kms_setmode.c
+++ b/tests/kms_setmode.c
@@ -186,7 +186,7 @@ static void create_fb_for_crtc(struct crtc_config *crtc,
fb_id = igt_create_fb(drm_fd, crtc->mode.hdisplay,
crtc->mode.vdisplay,
igt_bpp_depth_to_drm_format(bpp, depth),
- I915_TILING_NONE, fb_info);
+ LOCAL_DRM_FORMAT_MOD_NONE, fb_info);
igt_assert_lt(0, fb_id);
}
diff --git a/tests/kms_sink_crc_basic.c b/tests/kms_sink_crc_basic.c
index 41accf4a..d2cc7ed7 100644
--- a/tests/kms_sink_crc_basic.c
+++ b/tests/kms_sink_crc_basic.c
@@ -144,13 +144,15 @@ static void run_test(data_t *data)
igt_create_color_fb(data->drm_fd,
mode->hdisplay, mode->vdisplay,
- DRM_FORMAT_XRGB8888, I915_TILING_X,
+ DRM_FORMAT_XRGB8888,
+ LOCAL_I915_FORMAT_MOD_X_TILED,
0.0, 1.0, 0.0,
&data->fb_green);
igt_create_color_fb(data->drm_fd,
mode->hdisplay, mode->vdisplay,
- DRM_FORMAT_XRGB8888, I915_TILING_X,
+ DRM_FORMAT_XRGB8888,
+ LOCAL_I915_FORMAT_MOD_X_TILED,
1.0, 0.0, 0.0,
&data->fb_red);
diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c
index a851994a..39dd0aa3 100644
--- a/tests/kms_universal_plane.c
+++ b/tests/kms_universal_plane.c
@@ -68,22 +68,22 @@ functional_test_init(functional_test_t *test, igt_output_t *output, enum pipe pi
mode = igt_output_get_mode(output);
igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
- false, /* tiled */
+ LOCAL_DRM_FORMAT_MOD_NONE,
0.0, 0.0, 0.0,
&test->black_fb);
igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
- false, /* tiled */
+ LOCAL_DRM_FORMAT_MOD_NONE,
0.0, 0.0, 1.0,
&test->blue_fb);
igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
- false, /* tiled */
+ LOCAL_DRM_FORMAT_MOD_NONE,
1.0, 1.0, 0.0,
&test->yellow_fb);
igt_create_color_fb(data->drm_fd, 100, 100,
DRM_FORMAT_XRGB8888,
- false, /* tiled */
+ LOCAL_DRM_FORMAT_MOD_NONE,
1.0, 0.0, 0.0,
&test->red_fb);
@@ -310,19 +310,19 @@ sanity_test_init(sanity_test_t *test, igt_output_t *output, enum pipe pipe)
mode = igt_output_get_mode(output);
igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
- false, /* tiled */
+ LOCAL_DRM_FORMAT_MOD_NONE,
0.0, 0.0, 1.0,
&test->blue_fb);
igt_create_color_fb(data->drm_fd,
mode->hdisplay + 100, mode->vdisplay + 100,
DRM_FORMAT_XRGB8888,
- false, /* tiled */
+ LOCAL_DRM_FORMAT_MOD_NONE,
0.0, 0.0, 1.0,
&test->oversized_fb);
igt_create_color_fb(data->drm_fd,
mode->hdisplay - 100, mode->vdisplay - 100,
DRM_FORMAT_XRGB8888,
- false, /* tiled */
+ LOCAL_DRM_FORMAT_MOD_NONE,
0.0, 0.0, 1.0,
&test->undersized_fb);
@@ -434,12 +434,12 @@ pageflip_test_init(pageflip_test_t *test, igt_output_t *output, enum pipe pipe)
mode = igt_output_get_mode(output);
igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
- false, /* tiled */
+ LOCAL_DRM_FORMAT_MOD_NONE,
1.0, 0.0, 0.0,
&test->red_fb);
igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
- false, /* tiled */
+ LOCAL_DRM_FORMAT_MOD_NONE,
0.0, 0.0, 1.0,
&test->blue_fb);
}
diff --git a/tests/pm_lpsp.c b/tests/pm_lpsp.c
index bcf353c0..50b3dd9c 100644
--- a/tests/pm_lpsp.c
+++ b/tests/pm_lpsp.c
@@ -85,7 +85,7 @@ static uint32_t create_fb(int drm_fd, int width, int height)
uint32_t buffer_id;
buffer_id = igt_create_fb(drm_fd, width, height, DRM_FORMAT_XRGB8888,
- I915_TILING_NONE, &fb);
+ LOCAL_DRM_FORMAT_MOD_NONE, &fb);
cr = igt_get_cairo_ctx(drm_fd, &fb);
igt_paint_test_pattern(cr, width, height);
cairo_destroy(cr);
diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index 87e5a568..91df93a3 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -285,7 +285,8 @@ static bool init_modeset_params_for_type(struct mode_set_data *data,
return false;
igt_create_fb(drm_fd, mode->hdisplay, mode->vdisplay,
- DRM_FORMAT_XRGB8888, I915_TILING_NONE, &params->fb);
+ DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
+ &params->fb);
cr = igt_get_cairo_ctx(drm_fd, &params->fb);
igt_paint_test_pattern(cr, mode->hdisplay, mode->vdisplay);
cairo_destroy(cr);
@@ -1508,12 +1509,12 @@ static void cursor_subtest(bool dpms)
igt_require(default_mode_params);
crtc_id = default_mode_params->crtc_id;
- igt_create_fb(drm_fd, 64, 64, DRM_FORMAT_ARGB8888, I915_TILING_NONE,
- &cursor_fb1);
- igt_create_fb(drm_fd, 64, 64, DRM_FORMAT_ARGB8888, I915_TILING_NONE,
- &cursor_fb2);
- igt_create_fb(drm_fd, 64, 64, DRM_FORMAT_ARGB8888, I915_TILING_X,
- &cursor_fb3);
+ igt_create_fb(drm_fd, 64, 64, DRM_FORMAT_ARGB8888,
+ LOCAL_DRM_FORMAT_MOD_NONE, &cursor_fb1);
+ igt_create_fb(drm_fd, 64, 64, DRM_FORMAT_ARGB8888,
+ LOCAL_DRM_FORMAT_MOD_NONE, &cursor_fb2);
+ igt_create_fb(drm_fd, 64, 64, DRM_FORMAT_ARGB8888,
+ LOCAL_I915_FORMAT_MOD_X_TILED, &cursor_fb3);
fill_igt_fb(&cursor_fb1, 0xFF00FFFF);
fill_igt_fb(&cursor_fb2, 0xFF00FF00);
@@ -1620,7 +1621,7 @@ static void test_one_plane(bool dpms, uint32_t plane_id,
uint32_t crtc_id;
struct igt_fb plane_fb1, plane_fb2;
int32_t crtc_x = 0, crtc_y = 0;
- unsigned int tiling;
+ uint64_t tiling;
disable_all_screens_and_wait(&ms_data);
@@ -1632,19 +1633,19 @@ static void test_one_plane(bool dpms, uint32_t plane_id,
plane_format = DRM_FORMAT_XRGB8888;
plane_w = 64;
plane_h = 64;
- tiling = I915_TILING_X;
+ tiling = LOCAL_I915_FORMAT_MOD_X_TILED;
break;
case PLANE_PRIMARY:
plane_format = DRM_FORMAT_XRGB8888;
plane_w = default_mode_params->mode->hdisplay;
plane_h = default_mode_params->mode->vdisplay;
- tiling = I915_TILING_X;
+ tiling = LOCAL_I915_FORMAT_MOD_X_TILED;
break;
case PLANE_CURSOR:
plane_format = DRM_FORMAT_ARGB8888;
plane_w = 64;
plane_h = 64;
- tiling = I915_TILING_NONE;
+ tiling = LOCAL_DRM_FORMAT_MOD_NONE;
break;
default:
igt_assert(0);
@@ -1763,7 +1764,8 @@ static void fences_subtest(bool dpms)
params.connector_id = default_mode_params->connector_id;
params.mode = default_mode_params->mode;
igt_create_fb(drm_fd, params.mode->hdisplay, params.mode->vdisplay,
- DRM_FORMAT_XRGB8888, I915_TILING_X, &params.fb);
+ DRM_FORMAT_XRGB8888, LOCAL_I915_FORMAT_MOD_X_TILED,
+ &params.fb);
/* Even though we passed "true" as the tiling argument, double-check
* that the fb is really tiled. */
diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index 2559cc86..6b1f2653 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -81,7 +81,7 @@ drmModeRes *resources;
int drm_fd, modes;
int test_all_modes = 0, test_preferred_mode = 0, force_mode = 0, test_plane,
test_stereo_modes;
-unsigned int tiling = I915_TILING_NONE;
+uint64_t tiling = LOCAL_DRM_FORMAT_MOD_NONE;
int sleep_between_modes = 5;
int do_dpms = 0; /* This aliases to DPMS_ON */
uint32_t depth = 24, stride, bpp;
@@ -695,7 +695,7 @@ int main(int argc, char **argv)
test_preferred_mode = 1;
break;
case 't':
- tiling = I915_TILING_X;
+ tiling = LOCAL_I915_FORMAT_MOD_X_TILED;
break;
case 'r':
qr_code = 1;