1*d83cc019SAndroid Build Coastguard Worker /*
2*d83cc019SAndroid Build Coastguard Worker * Copyright © 2014 Intel Corporation
3*d83cc019SAndroid Build Coastguard Worker *
4*d83cc019SAndroid Build Coastguard Worker * Permission is hereby granted, free of charge, to any person obtaining a
5*d83cc019SAndroid Build Coastguard Worker * copy of this software and associated documentation files (the "Software"),
6*d83cc019SAndroid Build Coastguard Worker * to deal in the Software without restriction, including without limitation
7*d83cc019SAndroid Build Coastguard Worker * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8*d83cc019SAndroid Build Coastguard Worker * and/or sell copies of the Software, and to permit persons to whom the
9*d83cc019SAndroid Build Coastguard Worker * Software is furnished to do so, subject to the following conditions:
10*d83cc019SAndroid Build Coastguard Worker *
11*d83cc019SAndroid Build Coastguard Worker * The above copyright notice and this permission notice (including the next
12*d83cc019SAndroid Build Coastguard Worker * paragraph) shall be included in all copies or substantial portions of the
13*d83cc019SAndroid Build Coastguard Worker * Software.
14*d83cc019SAndroid Build Coastguard Worker *
15*d83cc019SAndroid Build Coastguard Worker * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16*d83cc019SAndroid Build Coastguard Worker * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17*d83cc019SAndroid Build Coastguard Worker * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18*d83cc019SAndroid Build Coastguard Worker * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19*d83cc019SAndroid Build Coastguard Worker * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20*d83cc019SAndroid Build Coastguard Worker * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21*d83cc019SAndroid Build Coastguard Worker * IN THE SOFTWARE.
22*d83cc019SAndroid Build Coastguard Worker *
23*d83cc019SAndroid Build Coastguard Worker * Authors:
24*d83cc019SAndroid Build Coastguard Worker * Ander Conselvan de Oliveira <[email protected]>
25*d83cc019SAndroid Build Coastguard Worker */
26*d83cc019SAndroid Build Coastguard Worker
27*d83cc019SAndroid Build Coastguard Worker #include "igt.h"
28*d83cc019SAndroid Build Coastguard Worker #include <errno.h>
29*d83cc019SAndroid Build Coastguard Worker #include <stdbool.h>
30*d83cc019SAndroid Build Coastguard Worker #include <stdio.h>
31*d83cc019SAndroid Build Coastguard Worker #include <string.h>
32*d83cc019SAndroid Build Coastguard Worker
33*d83cc019SAndroid Build Coastguard Worker IGT_TEST_DESCRIPTION("Test page flips and tiling scenarios");
34*d83cc019SAndroid Build Coastguard Worker
35*d83cc019SAndroid Build Coastguard Worker typedef struct {
36*d83cc019SAndroid Build Coastguard Worker int drm_fd;
37*d83cc019SAndroid Build Coastguard Worker igt_display_t display;
38*d83cc019SAndroid Build Coastguard Worker int gen;
39*d83cc019SAndroid Build Coastguard Worker } data_t;
40*d83cc019SAndroid Build Coastguard Worker
41*d83cc019SAndroid Build Coastguard Worker static igt_pipe_crc_t *_pipe_crc;
42*d83cc019SAndroid Build Coastguard Worker
pipe_crc_new(data_t * data,int pipe)43*d83cc019SAndroid Build Coastguard Worker static igt_pipe_crc_t *pipe_crc_new(data_t *data, int pipe)
44*d83cc019SAndroid Build Coastguard Worker {
45*d83cc019SAndroid Build Coastguard Worker if (_pipe_crc) {
46*d83cc019SAndroid Build Coastguard Worker igt_pipe_crc_free(_pipe_crc);
47*d83cc019SAndroid Build Coastguard Worker _pipe_crc = NULL;
48*d83cc019SAndroid Build Coastguard Worker }
49*d83cc019SAndroid Build Coastguard Worker
50*d83cc019SAndroid Build Coastguard Worker _pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
51*d83cc019SAndroid Build Coastguard Worker igt_assert(_pipe_crc);
52*d83cc019SAndroid Build Coastguard Worker
53*d83cc019SAndroid Build Coastguard Worker return _pipe_crc;
54*d83cc019SAndroid Build Coastguard Worker }
55*d83cc019SAndroid Build Coastguard Worker
pipe_crc_free(void)56*d83cc019SAndroid Build Coastguard Worker static void pipe_crc_free(void)
57*d83cc019SAndroid Build Coastguard Worker {
58*d83cc019SAndroid Build Coastguard Worker if (_pipe_crc) {
59*d83cc019SAndroid Build Coastguard Worker igt_pipe_crc_free(_pipe_crc);
60*d83cc019SAndroid Build Coastguard Worker _pipe_crc = NULL;
61*d83cc019SAndroid Build Coastguard Worker }
62*d83cc019SAndroid Build Coastguard Worker }
63*d83cc019SAndroid Build Coastguard Worker
64*d83cc019SAndroid Build Coastguard Worker static void
test_flip_tiling(data_t * data,enum pipe pipe,igt_output_t * output,uint64_t tiling[2])65*d83cc019SAndroid Build Coastguard Worker test_flip_tiling(data_t *data, enum pipe pipe, igt_output_t *output, uint64_t tiling[2])
66*d83cc019SAndroid Build Coastguard Worker {
67*d83cc019SAndroid Build Coastguard Worker drmModeModeInfo *mode;
68*d83cc019SAndroid Build Coastguard Worker igt_plane_t *primary;
69*d83cc019SAndroid Build Coastguard Worker struct igt_fb fb[2];
70*d83cc019SAndroid Build Coastguard Worker igt_pipe_crc_t *pipe_crc;
71*d83cc019SAndroid Build Coastguard Worker igt_crc_t reference_crc, crc;
72*d83cc019SAndroid Build Coastguard Worker int fb_id, ret, width;
73*d83cc019SAndroid Build Coastguard Worker
74*d83cc019SAndroid Build Coastguard Worker pipe_crc = pipe_crc_new(data, pipe);
75*d83cc019SAndroid Build Coastguard Worker igt_output_set_pipe(output, pipe);
76*d83cc019SAndroid Build Coastguard Worker
77*d83cc019SAndroid Build Coastguard Worker mode = igt_output_get_mode(output);
78*d83cc019SAndroid Build Coastguard Worker
79*d83cc019SAndroid Build Coastguard Worker /* Interlaced modes don't support Y/Yf tiling */
80*d83cc019SAndroid Build Coastguard Worker if (tiling[0] == LOCAL_I915_FORMAT_MOD_Y_TILED ||
81*d83cc019SAndroid Build Coastguard Worker tiling[0] == LOCAL_I915_FORMAT_MOD_Yf_TILED ||
82*d83cc019SAndroid Build Coastguard Worker tiling[1] == LOCAL_I915_FORMAT_MOD_Y_TILED ||
83*d83cc019SAndroid Build Coastguard Worker tiling[1] == LOCAL_I915_FORMAT_MOD_Yf_TILED)
84*d83cc019SAndroid Build Coastguard Worker igt_require(!(mode->flags & DRM_MODE_FLAG_INTERLACE));
85*d83cc019SAndroid Build Coastguard Worker
86*d83cc019SAndroid Build Coastguard Worker primary = igt_output_get_plane(output, 0);
87*d83cc019SAndroid Build Coastguard Worker
88*d83cc019SAndroid Build Coastguard Worker width = mode->hdisplay;
89*d83cc019SAndroid Build Coastguard Worker
90*d83cc019SAndroid Build Coastguard Worker if (tiling[0] != tiling[1] &&
91*d83cc019SAndroid Build Coastguard Worker (tiling[0] != LOCAL_DRM_FORMAT_MOD_NONE ||
92*d83cc019SAndroid Build Coastguard Worker tiling[1] != LOCAL_DRM_FORMAT_MOD_NONE)) {
93*d83cc019SAndroid Build Coastguard Worker /*
94*d83cc019SAndroid Build Coastguard Worker * Since a page flip to a buffer with different stride
95*d83cc019SAndroid Build Coastguard Worker * doesn't work, choose width so that the stride of both
96*d83cc019SAndroid Build Coastguard Worker * buffers is the same.
97*d83cc019SAndroid Build Coastguard Worker */
98*d83cc019SAndroid Build Coastguard Worker width = 512;
99*d83cc019SAndroid Build Coastguard Worker while (width < mode->hdisplay)
100*d83cc019SAndroid Build Coastguard Worker width *= 2;
101*d83cc019SAndroid Build Coastguard Worker }
102*d83cc019SAndroid Build Coastguard Worker
103*d83cc019SAndroid Build Coastguard Worker fb_id = igt_create_pattern_fb(data->drm_fd, width, mode->vdisplay,
104*d83cc019SAndroid Build Coastguard Worker DRM_FORMAT_XRGB8888, tiling[0],
105*d83cc019SAndroid Build Coastguard Worker &fb[0]);
106*d83cc019SAndroid Build Coastguard Worker igt_assert(fb_id);
107*d83cc019SAndroid Build Coastguard Worker
108*d83cc019SAndroid Build Coastguard Worker /* Second fb has different background so CRC does not match. */
109*d83cc019SAndroid Build Coastguard Worker fb_id = igt_create_color_pattern_fb(data->drm_fd, width, mode->vdisplay,
110*d83cc019SAndroid Build Coastguard Worker DRM_FORMAT_XRGB8888, tiling[1],
111*d83cc019SAndroid Build Coastguard Worker 0.5, 0.5, 0.5, &fb[1]);
112*d83cc019SAndroid Build Coastguard Worker igt_assert(fb_id);
113*d83cc019SAndroid Build Coastguard Worker
114*d83cc019SAndroid Build Coastguard Worker /* Set the crtc and generate a reference CRC. */
115*d83cc019SAndroid Build Coastguard Worker igt_plane_set_fb(primary, &fb[1]);
116*d83cc019SAndroid Build Coastguard Worker igt_display_commit(&data->display);
117*d83cc019SAndroid Build Coastguard Worker igt_pipe_crc_collect_crc(pipe_crc, &reference_crc);
118*d83cc019SAndroid Build Coastguard Worker
119*d83cc019SAndroid Build Coastguard Worker /* Commit the first fb. */
120*d83cc019SAndroid Build Coastguard Worker igt_plane_set_fb(primary, &fb[0]);
121*d83cc019SAndroid Build Coastguard Worker igt_display_commit(&data->display);
122*d83cc019SAndroid Build Coastguard Worker
123*d83cc019SAndroid Build Coastguard Worker /* Flip to the second fb. */
124*d83cc019SAndroid Build Coastguard Worker ret = drmModePageFlip(data->drm_fd, output->config.crtc->crtc_id,
125*d83cc019SAndroid Build Coastguard Worker fb[1].fb_id, DRM_MODE_PAGE_FLIP_EVENT, NULL);
126*d83cc019SAndroid Build Coastguard Worker /*
127*d83cc019SAndroid Build Coastguard Worker * Page flip should work but some transitions may be temporarily
128*d83cc019SAndroid Build Coastguard Worker * on some kernels.
129*d83cc019SAndroid Build Coastguard Worker */
130*d83cc019SAndroid Build Coastguard Worker igt_require(ret == 0);
131*d83cc019SAndroid Build Coastguard Worker
132*d83cc019SAndroid Build Coastguard Worker kmstest_wait_for_pageflip(data->drm_fd);
133*d83cc019SAndroid Build Coastguard Worker
134*d83cc019SAndroid Build Coastguard Worker /* Get a crc and compare with the reference. */
135*d83cc019SAndroid Build Coastguard Worker igt_pipe_crc_collect_crc(pipe_crc, &crc);
136*d83cc019SAndroid Build Coastguard Worker igt_assert_crc_equal(&reference_crc, &crc);
137*d83cc019SAndroid Build Coastguard Worker
138*d83cc019SAndroid Build Coastguard Worker /* Clean up. */
139*d83cc019SAndroid Build Coastguard Worker igt_plane_set_fb(primary, NULL);
140*d83cc019SAndroid Build Coastguard Worker pipe_crc_free();
141*d83cc019SAndroid Build Coastguard Worker igt_output_set_pipe(output, PIPE_ANY);
142*d83cc019SAndroid Build Coastguard Worker igt_display_commit(&data->display);
143*d83cc019SAndroid Build Coastguard Worker
144*d83cc019SAndroid Build Coastguard Worker igt_remove_fb(data->drm_fd, &fb[0]);
145*d83cc019SAndroid Build Coastguard Worker igt_remove_fb(data->drm_fd, &fb[1]);
146*d83cc019SAndroid Build Coastguard Worker }
147*d83cc019SAndroid Build Coastguard Worker
148*d83cc019SAndroid Build Coastguard Worker static data_t data;
149*d83cc019SAndroid Build Coastguard Worker igt_output_t *output;
150*d83cc019SAndroid Build Coastguard Worker
151*d83cc019SAndroid Build Coastguard Worker igt_main
152*d83cc019SAndroid Build Coastguard Worker {
153*d83cc019SAndroid Build Coastguard Worker igt_skip_on_simulation();
154*d83cc019SAndroid Build Coastguard Worker
155*d83cc019SAndroid Build Coastguard Worker igt_fixture {
156*d83cc019SAndroid Build Coastguard Worker data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
157*d83cc019SAndroid Build Coastguard Worker data.gen = intel_gen(intel_get_drm_devid(data.drm_fd));
158*d83cc019SAndroid Build Coastguard Worker
159*d83cc019SAndroid Build Coastguard Worker kmstest_set_vt_graphics_mode();
160*d83cc019SAndroid Build Coastguard Worker
161*d83cc019SAndroid Build Coastguard Worker igt_require_pipe_crc(data.drm_fd);
162*d83cc019SAndroid Build Coastguard Worker igt_display_require(&data.display, data.drm_fd);
163*d83cc019SAndroid Build Coastguard Worker }
164*d83cc019SAndroid Build Coastguard Worker
165*d83cc019SAndroid Build Coastguard Worker /*
166*d83cc019SAndroid Build Coastguard Worker * Test that a page flip from a tiled buffer to a linear one works
167*d83cc019SAndroid Build Coastguard Worker * correctly. First, it sets the crtc with the linear buffer and
168*d83cc019SAndroid Build Coastguard Worker * generates a reference crc for the pipe. Then, the crtc is set with
169*d83cc019SAndroid Build Coastguard Worker * the tiled one and page flip to the linear one issued. A new crc is
170*d83cc019SAndroid Build Coastguard Worker * generated and compared to the reference one.
171*d83cc019SAndroid Build Coastguard Worker */
172*d83cc019SAndroid Build Coastguard Worker
173*d83cc019SAndroid Build Coastguard Worker igt_subtest_f("flip-changes-tiling") {
174*d83cc019SAndroid Build Coastguard Worker uint64_t tiling[2] = { LOCAL_I915_FORMAT_MOD_X_TILED,
175*d83cc019SAndroid Build Coastguard Worker LOCAL_DRM_FORMAT_MOD_NONE };
176*d83cc019SAndroid Build Coastguard Worker enum pipe pipe;
177*d83cc019SAndroid Build Coastguard Worker
178*d83cc019SAndroid Build Coastguard Worker for_each_pipe_with_valid_output(&data.display, pipe, output)
179*d83cc019SAndroid Build Coastguard Worker test_flip_tiling(&data, pipe, output, tiling);
180*d83cc019SAndroid Build Coastguard Worker }
181*d83cc019SAndroid Build Coastguard Worker
182*d83cc019SAndroid Build Coastguard Worker igt_subtest_f("flip-changes-tiling-Y") {
183*d83cc019SAndroid Build Coastguard Worker uint64_t tiling[2] = { LOCAL_I915_FORMAT_MOD_Y_TILED,
184*d83cc019SAndroid Build Coastguard Worker LOCAL_DRM_FORMAT_MOD_NONE };
185*d83cc019SAndroid Build Coastguard Worker enum pipe pipe;
186*d83cc019SAndroid Build Coastguard Worker
187*d83cc019SAndroid Build Coastguard Worker igt_require_fb_modifiers(data.drm_fd);
188*d83cc019SAndroid Build Coastguard Worker igt_require(data.gen >= 9);
189*d83cc019SAndroid Build Coastguard Worker
190*d83cc019SAndroid Build Coastguard Worker for_each_pipe_with_valid_output(&data.display, pipe, output)
191*d83cc019SAndroid Build Coastguard Worker test_flip_tiling(&data, pipe, output, tiling);
192*d83cc019SAndroid Build Coastguard Worker }
193*d83cc019SAndroid Build Coastguard Worker
194*d83cc019SAndroid Build Coastguard Worker igt_subtest_f("flip-changes-tiling-Yf") {
195*d83cc019SAndroid Build Coastguard Worker uint64_t tiling[2] = { LOCAL_I915_FORMAT_MOD_Yf_TILED,
196*d83cc019SAndroid Build Coastguard Worker LOCAL_DRM_FORMAT_MOD_NONE };
197*d83cc019SAndroid Build Coastguard Worker enum pipe pipe;
198*d83cc019SAndroid Build Coastguard Worker
199*d83cc019SAndroid Build Coastguard Worker igt_require_fb_modifiers(data.drm_fd);
200*d83cc019SAndroid Build Coastguard Worker igt_require(data.gen >= 9);
201*d83cc019SAndroid Build Coastguard Worker
202*d83cc019SAndroid Build Coastguard Worker for_each_pipe_with_valid_output(&data.display, pipe, output)
203*d83cc019SAndroid Build Coastguard Worker test_flip_tiling(&data, pipe, output, tiling);
204*d83cc019SAndroid Build Coastguard Worker }
205*d83cc019SAndroid Build Coastguard Worker
206*d83cc019SAndroid Build Coastguard Worker /*
207*d83cc019SAndroid Build Coastguard Worker * Test that a page flip from a tiled buffer to another tiled one works
208*d83cc019SAndroid Build Coastguard Worker * correctly. First, it sets the crtc with the tiled buffer and
209*d83cc019SAndroid Build Coastguard Worker * generates a reference crc for the pipe. Then a page flip to second
210*d83cc019SAndroid Build Coastguard Worker * tiled buffer is issued. A new crc is generated and compared to the
211*d83cc019SAndroid Build Coastguard Worker * reference one.
212*d83cc019SAndroid Build Coastguard Worker */
213*d83cc019SAndroid Build Coastguard Worker
214*d83cc019SAndroid Build Coastguard Worker igt_subtest_f("flip-X-tiled") {
215*d83cc019SAndroid Build Coastguard Worker uint64_t tiling[2] = { LOCAL_I915_FORMAT_MOD_X_TILED,
216*d83cc019SAndroid Build Coastguard Worker LOCAL_I915_FORMAT_MOD_X_TILED };
217*d83cc019SAndroid Build Coastguard Worker enum pipe pipe;
218*d83cc019SAndroid Build Coastguard Worker
219*d83cc019SAndroid Build Coastguard Worker for_each_pipe_with_valid_output(&data.display, pipe, output)
220*d83cc019SAndroid Build Coastguard Worker test_flip_tiling(&data, pipe, output, tiling);
221*d83cc019SAndroid Build Coastguard Worker }
222*d83cc019SAndroid Build Coastguard Worker
223*d83cc019SAndroid Build Coastguard Worker igt_subtest_f("flip-Y-tiled") {
224*d83cc019SAndroid Build Coastguard Worker uint64_t tiling[2] = { LOCAL_I915_FORMAT_MOD_Y_TILED,
225*d83cc019SAndroid Build Coastguard Worker LOCAL_I915_FORMAT_MOD_Y_TILED };
226*d83cc019SAndroid Build Coastguard Worker enum pipe pipe;
227*d83cc019SAndroid Build Coastguard Worker
228*d83cc019SAndroid Build Coastguard Worker igt_require_fb_modifiers(data.drm_fd);
229*d83cc019SAndroid Build Coastguard Worker igt_require(data.gen >= 9);
230*d83cc019SAndroid Build Coastguard Worker
231*d83cc019SAndroid Build Coastguard Worker for_each_pipe_with_valid_output(&data.display, pipe, output)
232*d83cc019SAndroid Build Coastguard Worker test_flip_tiling(&data, pipe, output, tiling);
233*d83cc019SAndroid Build Coastguard Worker }
234*d83cc019SAndroid Build Coastguard Worker
235*d83cc019SAndroid Build Coastguard Worker igt_subtest_f("flip-Yf-tiled") {
236*d83cc019SAndroid Build Coastguard Worker uint64_t tiling[2] = { LOCAL_I915_FORMAT_MOD_Yf_TILED,
237*d83cc019SAndroid Build Coastguard Worker LOCAL_I915_FORMAT_MOD_Yf_TILED };
238*d83cc019SAndroid Build Coastguard Worker enum pipe pipe;
239*d83cc019SAndroid Build Coastguard Worker
240*d83cc019SAndroid Build Coastguard Worker igt_require_fb_modifiers(data.drm_fd);
241*d83cc019SAndroid Build Coastguard Worker igt_require(data.gen >= 9);
242*d83cc019SAndroid Build Coastguard Worker
243*d83cc019SAndroid Build Coastguard Worker for_each_pipe_with_valid_output(&data.display, pipe, output)
244*d83cc019SAndroid Build Coastguard Worker test_flip_tiling(&data, pipe, output, tiling);
245*d83cc019SAndroid Build Coastguard Worker }
246*d83cc019SAndroid Build Coastguard Worker
247*d83cc019SAndroid Build Coastguard Worker /*
248*d83cc019SAndroid Build Coastguard Worker * Test that a page flip from a linear buffer to a tiled one works
249*d83cc019SAndroid Build Coastguard Worker * correctly. First, it sets the crtc with the linear buffer and
250*d83cc019SAndroid Build Coastguard Worker * generates a reference crc for the pipe. Then a page flip to a tiled
251*d83cc019SAndroid Build Coastguard Worker * buffer is issued. A new crc is generated and compared to the
252*d83cc019SAndroid Build Coastguard Worker * reference one.
253*d83cc019SAndroid Build Coastguard Worker */
254*d83cc019SAndroid Build Coastguard Worker
255*d83cc019SAndroid Build Coastguard Worker igt_subtest_f("flip-to-X-tiled") {
256*d83cc019SAndroid Build Coastguard Worker uint64_t tiling[2] = { LOCAL_DRM_FORMAT_MOD_NONE,
257*d83cc019SAndroid Build Coastguard Worker LOCAL_I915_FORMAT_MOD_X_TILED };
258*d83cc019SAndroid Build Coastguard Worker enum pipe pipe;
259*d83cc019SAndroid Build Coastguard Worker
260*d83cc019SAndroid Build Coastguard Worker for_each_pipe_with_valid_output(&data.display, pipe, output)
261*d83cc019SAndroid Build Coastguard Worker test_flip_tiling(&data, pipe, output, tiling);
262*d83cc019SAndroid Build Coastguard Worker }
263*d83cc019SAndroid Build Coastguard Worker
264*d83cc019SAndroid Build Coastguard Worker igt_subtest_f("flip-to-Y-tiled") {
265*d83cc019SAndroid Build Coastguard Worker uint64_t tiling[2] = { LOCAL_DRM_FORMAT_MOD_NONE,
266*d83cc019SAndroid Build Coastguard Worker LOCAL_I915_FORMAT_MOD_Y_TILED };
267*d83cc019SAndroid Build Coastguard Worker enum pipe pipe;
268*d83cc019SAndroid Build Coastguard Worker
269*d83cc019SAndroid Build Coastguard Worker igt_require_fb_modifiers(data.drm_fd);
270*d83cc019SAndroid Build Coastguard Worker igt_require(data.gen >= 9);
271*d83cc019SAndroid Build Coastguard Worker
272*d83cc019SAndroid Build Coastguard Worker for_each_pipe_with_valid_output(&data.display, pipe, output)
273*d83cc019SAndroid Build Coastguard Worker test_flip_tiling(&data, pipe, output, tiling);
274*d83cc019SAndroid Build Coastguard Worker }
275*d83cc019SAndroid Build Coastguard Worker
276*d83cc019SAndroid Build Coastguard Worker igt_subtest_f("flip-to-Yf-tiled") {
277*d83cc019SAndroid Build Coastguard Worker uint64_t tiling[2] = { LOCAL_DRM_FORMAT_MOD_NONE,
278*d83cc019SAndroid Build Coastguard Worker LOCAL_I915_FORMAT_MOD_Yf_TILED };
279*d83cc019SAndroid Build Coastguard Worker enum pipe pipe;
280*d83cc019SAndroid Build Coastguard Worker
281*d83cc019SAndroid Build Coastguard Worker igt_require_fb_modifiers(data.drm_fd);
282*d83cc019SAndroid Build Coastguard Worker igt_require(data.gen >= 9);
283*d83cc019SAndroid Build Coastguard Worker
284*d83cc019SAndroid Build Coastguard Worker for_each_pipe_with_valid_output(&data.display, pipe, output)
285*d83cc019SAndroid Build Coastguard Worker test_flip_tiling(&data, pipe, output, tiling);
286*d83cc019SAndroid Build Coastguard Worker }
287*d83cc019SAndroid Build Coastguard Worker
288*d83cc019SAndroid Build Coastguard Worker igt_fixture {
289*d83cc019SAndroid Build Coastguard Worker igt_display_fini(&data.display);
290*d83cc019SAndroid Build Coastguard Worker }
291*d83cc019SAndroid Build Coastguard Worker }
292