Lines Matching +full:- +full:- +full:test_output
91 f->width = fb->width; in addfb_init()
92 f->height = fb->height; in addfb_init()
93 f->pixel_format = fb->drm_format; in addfb_init()
94 f->flags = LOCAL_DRM_MODE_FB_MODIFIERS; in addfb_init()
96 for (i = 0; i < fb->num_planes; i++) { in addfb_init()
97 f->handles[i] = fb->gem_handle; in addfb_init()
98 f->modifier[i] = fb->modifier; in addfb_init()
99 f->pitches[i] = fb->strides[i]; in addfb_init()
100 f->offsets[i] = fb->offsets[i]; in addfb_init()
114 /* Use either compressed or Y-tiled to test. However, given the lack of in generate_fb()
120 modifier = data->ccs_modifier; in generate_fb()
126 if (data->flags & TEST_BAD_PIXEL_FORMAT) in generate_fb()
131 igt_create_bo_for_fb(data->drm_fd, width, height, format, modifier, fb); in generate_fb()
132 igt_assert(fb->gem_handle > 0); in generate_fb()
140 f.pitches[1] -= 64; in generate_fb()
153 if (data->flags & TEST_BAD_CCS_HANDLE) in generate_fb()
154 f.handles[1] = gem_create(data->drm_fd, fb->size); in generate_fb()
156 if (data->flags & TEST_NO_AUX_BUFFER) { in generate_fb()
164 if (!(data->flags & TEST_BAD_PIXEL_FORMAT)) { in generate_fb()
165 int c = !!data->plane; in generate_fb()
167 cr = igt_get_cairo_ctx(data->drm_fd, fb); in generate_fb()
170 igt_put_cairo_ctx(data->drm_fd, fb, cr); in generate_fb()
173 ret = drmIoctl(data->drm_fd, LOCAL_DRM_IOCTL_MODE_ADDFB2, &f); in generate_fb()
174 if (data->flags & TEST_FAIL_ON_ADDFB2) { in generate_fb()
175 igt_assert_eq(ret, -1); in generate_fb()
181 fb->fb_id = f.fb_id; in generate_fb()
187 igt_display_t *display = &data->display; in try_config()
189 drmModeModeInfo *drm_mode = igt_output_get_mode(data->output); in try_config()
194 if (data->display.is_atomic) in try_config()
199 primary = igt_output_get_plane_type(data->output, in try_config()
202 data->ccs_modifier)) in try_config()
205 if (data->plane && fb_flags & FB_COMPRESSED) { in try_config()
206 if (!igt_plane_has_format_mod(data->plane, DRM_FORMAT_XRGB8888, in try_config()
207 data->ccs_modifier)) in try_config()
210 generate_fb(data, &fb, min(MAX_SPRITE_PLANE_WIDTH, drm_mode->hdisplay), in try_config()
211 drm_mode->vdisplay, in try_config()
215 generate_fb(data, &fb, min(MAX_SPRITE_PLANE_WIDTH, drm_mode->hdisplay), in try_config()
216 drm_mode->vdisplay, fb_flags); in try_config()
219 if (data->flags & TEST_FAIL_ON_ADDFB2) in try_config()
223 igt_plane_set_size(primary, drm_mode->hdisplay, drm_mode->vdisplay); in try_config()
226 if (data->plane && fb_flags & FB_COMPRESSED) { in try_config()
227 igt_plane_set_position(data->plane, 0, 0); in try_config()
228 igt_plane_set_size(data->plane, 256, 256); in try_config()
229 igt_plane_set_fb(data->plane, &fb_sprite); in try_config()
232 if (data->flags & TEST_ROTATE_180) in try_config()
234 if (data->flags & TEST_BAD_ROTATION_90) in try_config()
238 if (data->flags & TEST_BAD_ROTATION_90) { in try_config()
239 igt_assert_eq(ret, -EINVAL); in try_config()
244 igt_pipe_crc_collect_crc(data->pipe_crc, crc); in try_config()
249 if (data->plane && fb_flags & FB_COMPRESSED) { in try_config()
250 igt_plane_set_position(data->plane, 0, 0); in try_config()
251 igt_plane_set_size(data->plane, 0, 0); in try_config()
252 igt_plane_set_fb(data->plane, NULL); in try_config()
253 igt_remove_fb(display->drm_fd, &fb_sprite); in try_config()
260 if (data->flags & TEST_CRC) in try_config()
261 igt_remove_fb(data->drm_fd, &fb); in try_config()
271 if (data->flags & TEST_CRC) { in test_ccs()
272 data->pipe_crc = igt_pipe_crc_new(data->drm_fd, data->pipe, INTEL_PIPE_CRC_SOURCE_AUTO); in test_ccs()
280 igt_pipe_crc_free(data->pipe_crc); in test_ccs()
281 data->pipe_crc = NULL; in test_ccs()
284 if (data->flags & TEST_BAD_PIXEL_FORMAT || in test_ccs()
285 data->flags & TEST_BAD_ROTATION_90 || in test_ccs()
286 data->flags & TEST_NO_AUX_BUFFER || in test_ccs()
287 data->flags & TEST_BAD_CCS_HANDLE) { in test_ccs()
291 if (data->flags & TEST_BAD_AUX_STRIDE) { in test_ccs()
302 igt_display_t *display = &data->display; in __test_output()
305 data->output = igt_get_single_output_for_pipe(display, data->pipe); in __test_output()
306 igt_require(data->output); in __test_output()
308 igt_output_set_pipe(data->output, data->pipe); in __test_output()
311 data->ccs_modifier = ccs_modifiers[i]; in __test_output()
315 igt_output_set_pipe(data->output, PIPE_NONE); in __test_output()
316 igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY); in __test_output()
321 static void test_output(data_t *data) in test_output() function
349 igt_subtest_f("pipe-%s-bad-pixel-format", pipe_name) in for_each_pipe_static()
350 test_output(&data); in for_each_pipe_static()
353 igt_subtest_f("pipe-%s-bad-rotation-90", pipe_name) in for_each_pipe_static()
354 test_output(&data); in for_each_pipe_static()
357 igt_subtest_f("pipe-%s-crc-primary-basic", pipe_name) in for_each_pipe_static()
358 test_output(&data); in for_each_pipe_static()
361 igt_subtest_f("pipe-%s-crc-primary-rotation-180", pipe_name) in for_each_pipe_static()
362 test_output(&data); in for_each_pipe_static()
365 igt_subtest_f("pipe-%s-crc-sprite-planes-basic", pipe_name) { in for_each_pipe_static()
371 if (data.plane->type == DRM_PLANE_TYPE_PRIMARY) in for_each_pipe_static()
383 igt_subtest_f("pipe-%s-missing-ccs-buffer", pipe_name) in for_each_pipe_static()
384 test_output(&data); in for_each_pipe_static()
387 igt_subtest_f("pipe-%s-ccs-on-another-bo", pipe_name) in for_each_pipe_static()
388 test_output(&data); in for_each_pipe_static()
391 igt_subtest_f("pipe-%s-bad-aux-stride", pipe_name) in for_each_pipe_static()
392 test_output(&data); in for_each_pipe_static()