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