[PATCH i-g-t 17/22] tests/kms_plane_lowres: Adopt to use allocator
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Fri Jun 25 12:54:11 UTC 2021
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
tests/kms_plane_lowres.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/tests/kms_plane_lowres.c b/tests/kms_plane_lowres.c
index 7fd021800b..31f0edf752 100644
--- a/tests/kms_plane_lowres.c
+++ b/tests/kms_plane_lowres.c
@@ -154,6 +154,9 @@ static void create_ref_fb(data_t *data, uint64_t modifier,
blit(data, cr, &data->fb_primary, 0, 0);
blit(data, cr, &data->fb_plane[0], data->x, data->y);
igt_put_cairo_ctx(cr);
+
+ if (is_i915_device(data->drm_fd))
+ put_offset(fb->ahnd, fb->gem_handle);
}
static unsigned
@@ -165,6 +168,7 @@ test_planes_on_pipe_with_output(data_t *data, igt_plane_t *plane, uint64_t modif
unsigned tested = 0;
igt_plane_t *primary;
igt_crc_t crc_lowres, crc_hires1, crc_hires2;
+ uint64_t ahnd = 0;
igt_output_set_pipe(data->output, data->pipe);
@@ -172,6 +176,15 @@ test_planes_on_pipe_with_output(data_t *data, igt_plane_t *plane, uint64_t modif
mode = igt_output_get_mode(data->output);
mode_lowres = get_lowres_mode(data->drm_fd, data->output, mode);
+ if (is_i915_device(data->drm_fd))
+ ahnd = get_reloc_ahnd(data->drm_fd, 0);
+
+ data->fb_primary.ahnd =
+ data->fb_plane[0].ahnd =
+ data->fb_plane[1].ahnd =
+ data->ref_hires.fb.ahnd =
+ data->ref_lowres.fb.ahnd = ahnd;
+
igt_create_color_pattern_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888, modifier, 0.0, 0.0, 1.0,
&data->fb_primary);
@@ -191,6 +204,9 @@ test_planes_on_pipe_with_output(data_t *data, igt_plane_t *plane, uint64_t modif
create_ref_fb(data, modifier, mode, &data->ref_hires.fb);
create_ref_fb(data, modifier, &mode_lowres, &data->ref_lowres.fb);
+ if (is_i915_device(data->drm_fd))
+ put_ahnd(ahnd);
+
pipe_crc = igt_pipe_crc_new(data->drm_fd, data->pipe,
INTEL_PIPE_CRC_SOURCE_AUTO);
--
2.20.1
More information about the Intel-gfx-trybot
mailing list