Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 1 | /* |
| 2 | * Copyright © 2013 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 | */ |
| 24 | |
| 25 | #include <errno.h> |
Ville Syrjälä | fee27cf | 2014-01-13 17:05:19 +0200 | [diff] [blame] | 26 | #include <limits.h> |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 27 | #include <stdbool.h> |
| 28 | #include <stdio.h> |
| 29 | #include <string.h> |
| 30 | |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 31 | #include "drmtest.h" |
| 32 | #include "igt_debugfs.h" |
Oscar Mateo | 37f26d1 | 2013-11-12 11:50:38 +0000 | [diff] [blame] | 33 | #include "igt_kms.h" |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 34 | |
Sagar Kamble | ba3a1a8 | 2014-03-18 15:59:43 +0530 | [diff] [blame] | 35 | #ifndef DRM_CAP_CURSOR_WIDTH |
| 36 | #define DRM_CAP_CURSOR_WIDTH 0x8 |
| 37 | #endif |
| 38 | #ifndef DRM_CAP_CURSOR_HEIGHT |
| 39 | #define DRM_CAP_CURSOR_HEIGHT 0x9 |
| 40 | #endif |
| 41 | |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 42 | typedef struct { |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 43 | int drm_fd; |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 44 | igt_display_t display; |
Daniel Vetter | 9aea7ae | 2014-03-26 09:18:11 +0100 | [diff] [blame] | 45 | struct igt_fb primary_fb; |
Antti Koskipaa | a593d61 | 2014-04-10 15:08:05 +0300 | [diff] [blame] | 46 | struct igt_fb fb; |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 47 | igt_output_t *output; |
| 48 | enum pipe pipe; |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 49 | igt_crc_t ref_crc; |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 50 | int left, right, top, bottom; |
Antti Koskipaa | 795eddc | 2014-04-10 15:08:09 +0300 | [diff] [blame] | 51 | int screenw, screenh; |
Antti Koskipaa | fe8041b | 2014-04-10 15:08:07 +0300 | [diff] [blame] | 52 | int curw, curh; /* cursor size */ |
Antti Koskipaa | 21fb118 | 2014-06-02 13:43:18 +0300 | [diff] [blame] | 53 | int cursor_max_size; |
Ville Syrjälä | f6e8697 | 2014-04-24 19:07:18 +0300 | [diff] [blame] | 54 | igt_pipe_crc_t *pipe_crc; |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 55 | } data_t; |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 56 | |
Antti Koskipaa | a593d61 | 2014-04-10 15:08:05 +0300 | [diff] [blame] | 57 | static void draw_cursor(cairo_t *cr, int x, int y, int w) |
| 58 | { |
| 59 | w /= 2; |
Antti Koskipaa | 795eddc | 2014-04-10 15:08:09 +0300 | [diff] [blame] | 60 | /* Cairo doesn't like to be fed numbers that are too wild */ |
| 61 | if ((x < SHRT_MIN) || (x > SHRT_MAX) || (y < SHRT_MIN) || (y > SHRT_MAX)) |
| 62 | return; |
Antti Koskipaa | a593d61 | 2014-04-10 15:08:05 +0300 | [diff] [blame] | 63 | cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE); |
| 64 | /* 4 color rectangles in the corners, RGBY */ |
| 65 | igt_paint_color_alpha(cr, x, y, w, w, 1.0, 0.0, 0.0, 1.0); |
| 66 | igt_paint_color_alpha(cr, x + w, y, w, w, 0.0, 1.0, 0.0, 1.0); |
| 67 | igt_paint_color_alpha(cr, x, y + w, w, w, 0.0, 0.0, 1.0, 1.0); |
| 68 | igt_paint_color_alpha(cr, x + w, y + w, w, w, 0.5, 0.5, 0.5, 1.0); |
| 69 | } |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 70 | |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 71 | static void cursor_enable(data_t *data) |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 72 | { |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 73 | igt_display_t *display = &data->display; |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 74 | igt_output_t *output = data->output; |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 75 | igt_plane_t *cursor; |
| 76 | |
Damien Lespiau | 2043e6b | 2014-02-11 17:45:48 +0000 | [diff] [blame] | 77 | cursor = igt_output_get_plane(output, IGT_PLANE_CURSOR); |
Antti Koskipaa | a593d61 | 2014-04-10 15:08:05 +0300 | [diff] [blame] | 78 | igt_plane_set_fb(cursor, &data->fb); |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 79 | igt_display_commit(display); |
| 80 | } |
| 81 | |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 82 | static void cursor_disable(data_t *data) |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 83 | { |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 84 | igt_display_t *display = &data->display; |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 85 | igt_output_t *output = data->output; |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 86 | igt_plane_t *cursor; |
| 87 | |
Damien Lespiau | 2043e6b | 2014-02-11 17:45:48 +0000 | [diff] [blame] | 88 | cursor = igt_output_get_plane(output, IGT_PLANE_CURSOR); |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 89 | igt_plane_set_fb(cursor, NULL); |
| 90 | igt_display_commit(display); |
| 91 | } |
| 92 | |
Antti Koskipaa | 7ec631c | 2014-04-10 15:08:06 +0300 | [diff] [blame] | 93 | |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 94 | static void do_single_test(data_t *data, int x, int y) |
Antti Koskipaa | 7ec631c | 2014-04-10 15:08:06 +0300 | [diff] [blame] | 95 | { |
Antti Koskipaa | 7ec631c | 2014-04-10 15:08:06 +0300 | [diff] [blame] | 96 | igt_display_t *display = &data->display; |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 97 | igt_pipe_crc_t *pipe_crc = data->pipe_crc; |
Antti Koskipaa | 795eddc | 2014-04-10 15:08:09 +0300 | [diff] [blame] | 98 | igt_crc_t crc, ref_crc; |
Antti Koskipaa | 7ec631c | 2014-04-10 15:08:06 +0300 | [diff] [blame] | 99 | igt_plane_t *cursor; |
Antti Koskipaa | 795eddc | 2014-04-10 15:08:09 +0300 | [diff] [blame] | 100 | cairo_t *cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb); |
Antti Koskipaa | 7ec631c | 2014-04-10 15:08:06 +0300 | [diff] [blame] | 101 | |
Daniel Vetter | e624fa8 | 2014-05-14 00:36:04 +0200 | [diff] [blame] | 102 | igt_info("."); fflush(stdout); |
Antti Koskipaa | 7ec631c | 2014-04-10 15:08:06 +0300 | [diff] [blame] | 103 | |
Antti Koskipaa | 795eddc | 2014-04-10 15:08:09 +0300 | [diff] [blame] | 104 | /* Hardware test */ |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 105 | igt_paint_test_pattern(cr, data->screenw, data->screenh); |
| 106 | cursor_enable(data); |
| 107 | cursor = igt_output_get_plane(data->output, IGT_PLANE_CURSOR); |
Antti Koskipaa | 7ec631c | 2014-04-10 15:08:06 +0300 | [diff] [blame] | 108 | igt_plane_set_position(cursor, x, y); |
| 109 | igt_display_commit(display); |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 110 | igt_wait_for_vblank(data->drm_fd, data->pipe); |
Antti Koskipaa | 7ec631c | 2014-04-10 15:08:06 +0300 | [diff] [blame] | 111 | igt_pipe_crc_collect_crc(pipe_crc, &crc); |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 112 | cursor_disable(data); |
Antti Koskipaa | 7ec631c | 2014-04-10 15:08:06 +0300 | [diff] [blame] | 113 | |
Antti Koskipaa | 795eddc | 2014-04-10 15:08:09 +0300 | [diff] [blame] | 114 | /* Now render the same in software and collect crc */ |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 115 | draw_cursor(cr, x, y, data->curw); |
Antti Koskipaa | 795eddc | 2014-04-10 15:08:09 +0300 | [diff] [blame] | 116 | igt_display_commit(display); |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 117 | igt_wait_for_vblank(data->drm_fd, data->pipe); |
Antti Koskipaa | 795eddc | 2014-04-10 15:08:09 +0300 | [diff] [blame] | 118 | igt_pipe_crc_collect_crc(pipe_crc, &ref_crc); |
| 119 | /* Clear screen afterwards */ |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 120 | igt_paint_color(cr, 0, 0, data->screenw, data->screenh, |
| 121 | 0.0, 0.0, 0.0); |
Antti Koskipaa | 795eddc | 2014-04-10 15:08:09 +0300 | [diff] [blame] | 122 | |
| 123 | igt_assert(igt_crc_equal(&crc, &ref_crc)); |
Antti Koskipaa | 7ec631c | 2014-04-10 15:08:06 +0300 | [diff] [blame] | 124 | } |
| 125 | |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 126 | static void do_test(data_t *data, |
Antti Koskipaa | 7ec631c | 2014-04-10 15:08:06 +0300 | [diff] [blame] | 127 | int left, int right, int top, int bottom) |
| 128 | { |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 129 | do_single_test(data, left, top); |
| 130 | do_single_test(data, right, top); |
| 131 | do_single_test(data, right, bottom); |
| 132 | do_single_test(data, left, bottom); |
Antti Koskipaa | 7ec631c | 2014-04-10 15:08:06 +0300 | [diff] [blame] | 133 | } |
| 134 | |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 135 | static void test_crc_onscreen(data_t *data) |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 136 | { |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 137 | int left = data->left; |
| 138 | int right = data->right; |
| 139 | int top = data->top; |
| 140 | int bottom = data->bottom; |
| 141 | int cursor_w = data->curw; |
| 142 | int cursor_h = data->curh; |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 143 | |
Antti Koskipaa | ead0173 | 2014-04-10 15:08:08 +0300 | [diff] [blame] | 144 | /* fully inside */ |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 145 | do_test(data, left, right, top, bottom); |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 146 | |
Antti Koskipaa | ead0173 | 2014-04-10 15:08:08 +0300 | [diff] [blame] | 147 | /* 2 pixels inside */ |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 148 | do_test(data, left - (cursor_w-2), right + (cursor_w-2), top , bottom ); |
| 149 | do_test(data, left , right , top - (cursor_h-2), bottom + (cursor_h-2)); |
| 150 | do_test(data, left - (cursor_w-2), right + (cursor_w-2), top - (cursor_h-2), bottom + (cursor_h-2)); |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 151 | |
Antti Koskipaa | ead0173 | 2014-04-10 15:08:08 +0300 | [diff] [blame] | 152 | /* 1 pixel inside */ |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 153 | do_test(data, left - (cursor_w-1), right + (cursor_w-1), top , bottom ); |
| 154 | do_test(data, left , right , top - (cursor_h-1), bottom + (cursor_h-1)); |
| 155 | do_test(data, left - (cursor_w-1), right + (cursor_w-1), top - (cursor_h-1), bottom + (cursor_h-1)); |
Antti Koskipaa | ead0173 | 2014-04-10 15:08:08 +0300 | [diff] [blame] | 156 | } |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 157 | |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 158 | static void test_crc_offscreen(data_t *data) |
Antti Koskipaa | ead0173 | 2014-04-10 15:08:08 +0300 | [diff] [blame] | 159 | { |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 160 | int left = data->left; |
| 161 | int right = data->right; |
| 162 | int top = data->top; |
| 163 | int bottom = data->bottom; |
| 164 | int cursor_w = data->curw; |
| 165 | int cursor_h = data->curh; |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 166 | |
Antti Koskipaa | ead0173 | 2014-04-10 15:08:08 +0300 | [diff] [blame] | 167 | /* fully outside */ |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 168 | do_test(data, left - (cursor_w), right + (cursor_w), top , bottom ); |
| 169 | do_test(data, left , right , top - (cursor_h), bottom + (cursor_h)); |
| 170 | do_test(data, left - (cursor_w), right + (cursor_w), top - (cursor_h), bottom + (cursor_h)); |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 171 | |
Antti Koskipaa | ead0173 | 2014-04-10 15:08:08 +0300 | [diff] [blame] | 172 | /* fully outside by 1 extra pixels */ |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 173 | do_test(data, left - (cursor_w+1), right + (cursor_w+1), top , bottom ); |
| 174 | do_test(data, left , right , top - (cursor_h+1), bottom + (cursor_h+1)); |
| 175 | do_test(data, left - (cursor_w+1), right + (cursor_w+1), top - (cursor_h+1), bottom + (cursor_h+1)); |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 176 | |
Antti Koskipaa | ead0173 | 2014-04-10 15:08:08 +0300 | [diff] [blame] | 177 | /* fully outside by 2 extra pixels */ |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 178 | do_test(data, left - (cursor_w+2), right + (cursor_w+2), top , bottom ); |
| 179 | do_test(data, left , right , top - (cursor_h+2), bottom + (cursor_h+2)); |
| 180 | do_test(data, left - (cursor_w+2), right + (cursor_w+2), top - (cursor_h+2), bottom + (cursor_h+2)); |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 181 | |
Antti Koskipaa | ead0173 | 2014-04-10 15:08:08 +0300 | [diff] [blame] | 182 | /* fully outside by a lot of extra pixels */ |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 183 | do_test(data, left - (cursor_w+512), right + (cursor_w+512), top , bottom ); |
| 184 | do_test(data, left , right , top - (cursor_h+512), bottom + (cursor_h+512)); |
| 185 | do_test(data, left - (cursor_w+512), right + (cursor_w+512), top - (cursor_h+512), bottom + (cursor_h+512)); |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 186 | |
Antti Koskipaa | ead0173 | 2014-04-10 15:08:08 +0300 | [diff] [blame] | 187 | /* go nuts */ |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 188 | do_test(data, INT_MIN, INT_MAX, INT_MIN, INT_MAX); |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 189 | } |
| 190 | |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 191 | static void test_crc_sliding(data_t *data) |
Antti Koskipaa | 470e5ce | 2014-04-10 15:08:10 +0300 | [diff] [blame] | 192 | { |
| 193 | int i; |
| 194 | |
| 195 | /* Make sure cursor moves smoothly and pixel-by-pixel, and that there are |
| 196 | * no alignment issues. Horizontal, vertical and diagonal test. |
| 197 | */ |
| 198 | for (i = 0; i < 16; i++) { |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 199 | do_single_test(data, i, 0); |
| 200 | do_single_test(data, 0, i); |
| 201 | do_single_test(data, i, i); |
Antti Koskipaa | 470e5ce | 2014-04-10 15:08:10 +0300 | [diff] [blame] | 202 | } |
| 203 | } |
| 204 | |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 205 | static void test_crc_random(data_t *data) |
Antti Koskipaa | fafcff9 | 2014-04-10 15:08:11 +0300 | [diff] [blame] | 206 | { |
| 207 | int i; |
| 208 | |
| 209 | /* Random cursor placement */ |
| 210 | for (i = 0; i < 50; i++) { |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 211 | int x = rand() % (data->screenw + data->curw * 2) - data->curw; |
| 212 | int y = rand() % (data->screenh + data->curh * 2) - data->curh; |
| 213 | do_single_test(data, x, y); |
Antti Koskipaa | fafcff9 | 2014-04-10 15:08:11 +0300 | [diff] [blame] | 214 | } |
| 215 | } |
| 216 | |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 217 | static bool prepare_crtc(data_t *data, igt_output_t *output, |
Sagar Kamble | ba3a1a8 | 2014-03-18 15:59:43 +0530 | [diff] [blame] | 218 | int cursor_w, int cursor_h) |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 219 | { |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 220 | drmModeModeInfo *mode; |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 221 | igt_display_t *display = &data->display; |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 222 | igt_plane_t *primary; |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 223 | |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 224 | /* select the pipe we want to use */ |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 225 | igt_output_set_pipe(output, data->pipe); |
Ville Syrjälä | a461515 | 2014-04-25 15:27:57 +0300 | [diff] [blame] | 226 | igt_display_commit(display); |
| 227 | |
| 228 | if (!output->valid) { |
| 229 | igt_output_set_pipe(output, PIPE_ANY); |
| 230 | igt_display_commit(display); |
| 231 | return false; |
| 232 | } |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 233 | |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 234 | /* create and set the primary plane fb */ |
| 235 | mode = igt_output_get_mode(output); |
Daniel Vetter | 9aea7ae | 2014-03-26 09:18:11 +0100 | [diff] [blame] | 236 | igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay, |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 237 | DRM_FORMAT_XRGB8888, |
| 238 | false, /* tiled */ |
| 239 | 0.0, 0.0, 0.0, |
| 240 | &data->primary_fb); |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 241 | |
Damien Lespiau | 2043e6b | 2014-02-11 17:45:48 +0000 | [diff] [blame] | 242 | primary = igt_output_get_plane(output, IGT_PLANE_PRIMARY); |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 243 | igt_plane_set_fb(primary, &data->primary_fb); |
Ville Syrjälä | 3d371a7 | 2013-11-22 23:46:32 +0200 | [diff] [blame] | 244 | |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 245 | igt_display_commit(display); |
| 246 | |
| 247 | /* create the pipe_crc object for this pipe */ |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 248 | if (data->pipe_crc) |
| 249 | igt_pipe_crc_free(data->pipe_crc); |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 250 | |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 251 | data->pipe_crc = igt_pipe_crc_new(data->pipe, |
| 252 | INTEL_PIPE_CRC_SOURCE_AUTO); |
| 253 | if (!data->pipe_crc) { |
Daniel Vetter | e624fa8 | 2014-05-14 00:36:04 +0200 | [diff] [blame] | 254 | igt_info("auto crc not supported on this connector with pipe %i\n", |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 255 | data->pipe); |
Daniel Vetter | 43def94 | 2013-10-31 16:06:40 +0100 | [diff] [blame] | 256 | return false; |
| 257 | } |
| 258 | |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 259 | /* x/y position where the cursor is still fully visible */ |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 260 | data->left = 0; |
| 261 | data->right = mode->hdisplay - cursor_w; |
| 262 | data->top = 0; |
| 263 | data->bottom = mode->vdisplay - cursor_h; |
| 264 | data->screenw = mode->hdisplay; |
| 265 | data->screenh = mode->vdisplay; |
| 266 | data->curw = cursor_w; |
| 267 | data->curh = cursor_h; |
| 268 | data->cursor_max_size = cursor_w; |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 269 | |
| 270 | /* make sure cursor is disabled */ |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 271 | cursor_disable(data); |
| 272 | igt_wait_for_vblank(data->drm_fd, data->pipe); |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 273 | |
| 274 | /* get reference crc w/o cursor */ |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 275 | igt_pipe_crc_collect_crc(data->pipe_crc, &data->ref_crc); |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 276 | |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 277 | return true; |
| 278 | } |
| 279 | |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 280 | static void cleanup_crtc(data_t *data, igt_output_t *output) |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 281 | { |
Ville Syrjälä | a461515 | 2014-04-25 15:27:57 +0300 | [diff] [blame] | 282 | igt_display_t *display = &data->display; |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 283 | igt_plane_t *primary; |
| 284 | |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 285 | igt_pipe_crc_free(data->pipe_crc); |
| 286 | data->pipe_crc = NULL; |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 287 | |
Daniel Vetter | 9aea7ae | 2014-03-26 09:18:11 +0100 | [diff] [blame] | 288 | igt_remove_fb(data->drm_fd, &data->primary_fb); |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 289 | |
Damien Lespiau | 2043e6b | 2014-02-11 17:45:48 +0000 | [diff] [blame] | 290 | primary = igt_output_get_plane(output, IGT_PLANE_PRIMARY); |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 291 | igt_plane_set_fb(primary, NULL); |
| 292 | |
| 293 | igt_output_set_pipe(output, PIPE_ANY); |
Ville Syrjälä | a461515 | 2014-04-25 15:27:57 +0300 | [diff] [blame] | 294 | igt_display_commit(display); |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 295 | } |
| 296 | |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 297 | static void run_test(data_t *data, void (*testfunc)(data_t *), int cursor_w, int cursor_h) |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 298 | { |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 299 | igt_display_t *display = &data->display; |
| 300 | igt_output_t *output; |
| 301 | enum pipe p; |
Daniel Vetter | 43def94 | 2013-10-31 16:06:40 +0100 | [diff] [blame] | 302 | int valid_tests = 0; |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 303 | |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 304 | for_each_connected_output(display, output) { |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 305 | data->output = output; |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 306 | for (p = 0; p < igt_display_get_n_pipes(display); p++) { |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 307 | data->pipe = p; |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 308 | |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 309 | if (!prepare_crtc(data, output, cursor_w, cursor_h)) |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 310 | continue; |
| 311 | |
Daniel Vetter | 43def94 | 2013-10-31 16:06:40 +0100 | [diff] [blame] | 312 | valid_tests++; |
| 313 | |
Daniel Vetter | e624fa8 | 2014-05-14 00:36:04 +0200 | [diff] [blame] | 314 | igt_info("Beginning %s on pipe %c, connector %s\n", |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 315 | igt_subtest_name(), pipe_name(data->pipe), |
Daniel Vetter | e624fa8 | 2014-05-14 00:36:04 +0200 | [diff] [blame] | 316 | igt_output_name(output)); |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 317 | |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 318 | testfunc(data); |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 319 | |
Daniel Vetter | e624fa8 | 2014-05-14 00:36:04 +0200 | [diff] [blame] | 320 | igt_info("\n%s on pipe %c, connector %s: PASSED\n\n", |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 321 | igt_subtest_name(), pipe_name(data->pipe), |
Daniel Vetter | e624fa8 | 2014-05-14 00:36:04 +0200 | [diff] [blame] | 322 | igt_output_name(output)); |
Daniel Vetter | 43def94 | 2013-10-31 16:06:40 +0100 | [diff] [blame] | 323 | |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 324 | /* cleanup what prepare_crtc() has done */ |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 325 | cleanup_crtc(data, output); |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 326 | } |
| 327 | } |
Daniel Vetter | 43def94 | 2013-10-31 16:06:40 +0100 | [diff] [blame] | 328 | |
| 329 | igt_require_f(valid_tests, "no valid crtc/connector combinations found\n"); |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 330 | } |
| 331 | |
Antti Koskipaa | a593d61 | 2014-04-10 15:08:05 +0300 | [diff] [blame] | 332 | static void create_cursor_fb(data_t *data, int cur_w, int cur_h) |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 333 | { |
| 334 | cairo_t *cr; |
Antti Koskipaa | a593d61 | 2014-04-10 15:08:05 +0300 | [diff] [blame] | 335 | uint32_t fb_id; |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 336 | |
Antti Koskipaa | a593d61 | 2014-04-10 15:08:05 +0300 | [diff] [blame] | 337 | fb_id = igt_create_fb(data->drm_fd, cur_w, cur_h, |
| 338 | DRM_FORMAT_ARGB8888, false, |
| 339 | &data->fb); |
| 340 | igt_assert(fb_id); |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 341 | |
Antti Koskipaa | a593d61 | 2014-04-10 15:08:05 +0300 | [diff] [blame] | 342 | cr = igt_get_cairo_ctx(data->drm_fd, &data->fb); |
| 343 | draw_cursor(cr, 0, 0, cur_w); |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 344 | igt_assert(cairo_status(cr) == 0); |
| 345 | } |
| 346 | |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 347 | static void test_cursor_size(data_t *data) |
Antti Koskipaa | 21fb118 | 2014-06-02 13:43:18 +0300 | [diff] [blame] | 348 | { |
Antti Koskipaa | 21fb118 | 2014-06-02 13:43:18 +0300 | [diff] [blame] | 349 | igt_display_t *display = &data->display; |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 350 | igt_pipe_crc_t *pipe_crc = data->pipe_crc; |
Antti Koskipaa | 21fb118 | 2014-06-02 13:43:18 +0300 | [diff] [blame] | 351 | igt_crc_t crc[10], ref_crc; |
| 352 | igt_plane_t *cursor; |
| 353 | cairo_t *cr; |
| 354 | uint32_t fb_id; |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 355 | int i, size, cursor_max_size = data->cursor_max_size; |
Antti Koskipaa | 21fb118 | 2014-06-02 13:43:18 +0300 | [diff] [blame] | 356 | |
| 357 | /* Create a maximum size cursor, then change the size in flight to |
| 358 | * smaller ones to see that the size is applied correctly |
| 359 | */ |
| 360 | fb_id = igt_create_fb(data->drm_fd, cursor_max_size, cursor_max_size, |
| 361 | DRM_FORMAT_ARGB8888, false, &data->fb); |
| 362 | igt_assert(fb_id); |
| 363 | |
| 364 | /* Use a solid white rectangle as the cursor */ |
| 365 | cr = igt_get_cairo_ctx(data->drm_fd, &data->fb); |
| 366 | igt_paint_color_alpha(cr, 0, 0, cursor_max_size, cursor_max_size, 1.0, 1.0, 1.0, 1.0); |
| 367 | |
| 368 | /* Hardware test loop */ |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 369 | cursor_enable(data); |
| 370 | cursor = igt_output_get_plane(data->output, IGT_PLANE_CURSOR); |
Antti Koskipaa | 21fb118 | 2014-06-02 13:43:18 +0300 | [diff] [blame] | 371 | igt_plane_set_position(cursor, 0, 0); |
| 372 | for (i = 0, size = cursor_max_size; size >= 64; size /= 2, i++) { |
| 373 | /* Change size in flight: */ |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 374 | int ret = drmModeSetCursor(data->drm_fd, data->output->config.crtc->crtc_id, |
Antti Koskipaa | 21fb118 | 2014-06-02 13:43:18 +0300 | [diff] [blame] | 375 | data->fb.gem_handle, size, size); |
| 376 | igt_assert(ret == 0); |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 377 | igt_wait_for_vblank(data->drm_fd, data->pipe); |
Antti Koskipaa | 21fb118 | 2014-06-02 13:43:18 +0300 | [diff] [blame] | 378 | igt_pipe_crc_collect_crc(pipe_crc, &crc[i]); |
| 379 | } |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 380 | cursor_disable(data); |
Antti Koskipaa | 21fb118 | 2014-06-02 13:43:18 +0300 | [diff] [blame] | 381 | /* Software test loop */ |
| 382 | cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb); |
| 383 | for (i = 0, size = cursor_max_size; size >= 64; size /= 2, i++) { |
| 384 | /* Now render the same in software and collect crc */ |
| 385 | igt_paint_color_alpha(cr, 0, 0, size, size, 1.0, 1.0, 1.0, 1.0); |
| 386 | igt_display_commit(display); |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 387 | igt_wait_for_vblank(data->drm_fd, data->pipe); |
Antti Koskipaa | 21fb118 | 2014-06-02 13:43:18 +0300 | [diff] [blame] | 388 | igt_pipe_crc_collect_crc(pipe_crc, &ref_crc); |
| 389 | /* Clear screen afterwards */ |
Matt Roper | 07087ad | 2014-06-30 16:44:29 -0700 | [diff] [blame^] | 390 | igt_paint_color(cr, 0, 0, data->screenw, data->screenh, |
Antti Koskipaa | 21fb118 | 2014-06-02 13:43:18 +0300 | [diff] [blame] | 391 | 0.0, 0.0, 0.0); |
| 392 | igt_assert(igt_crc_equal(&crc[i], &ref_crc)); |
| 393 | } |
| 394 | } |
| 395 | |
Sagar Kamble | ba3a1a8 | 2014-03-18 15:59:43 +0530 | [diff] [blame] | 396 | static void run_test_generic(data_t *data, int cursor_max_size) |
| 397 | { |
| 398 | int cursor_size; |
Ville Syrjälä | fb2ccb1 | 2014-04-25 13:50:59 +0300 | [diff] [blame] | 399 | for (cursor_size = 64; cursor_size <= 256; cursor_size *= 2) |
Sagar Kamble | ba3a1a8 | 2014-03-18 15:59:43 +0530 | [diff] [blame] | 400 | { |
Ville Syrjälä | 5b90833 | 2014-04-25 13:37:09 +0300 | [diff] [blame] | 401 | igt_fixture |
| 402 | igt_require(cursor_max_size >= cursor_size); |
Sagar Kamble | ba3a1a8 | 2014-03-18 15:59:43 +0530 | [diff] [blame] | 403 | |
Ville Syrjälä | f8e5a3f | 2014-04-25 13:49:11 +0300 | [diff] [blame] | 404 | igt_fixture |
| 405 | create_cursor_fb(data, cursor_size, cursor_size); |
Sagar Kamble | ba3a1a8 | 2014-03-18 15:59:43 +0530 | [diff] [blame] | 406 | |
| 407 | /* Using created cursor FBs to test cursor support */ |
Ville Syrjälä | f688a56 | 2014-04-25 13:38:31 +0300 | [diff] [blame] | 408 | igt_subtest_f("cursor-%d-onscreen", cursor_size) |
Antti Koskipaa | ead0173 | 2014-04-10 15:08:08 +0300 | [diff] [blame] | 409 | run_test(data, test_crc_onscreen, cursor_size, cursor_size); |
Ville Syrjälä | f688a56 | 2014-04-25 13:38:31 +0300 | [diff] [blame] | 410 | igt_subtest_f("cursor-%d-offscreen", cursor_size) |
Antti Koskipaa | ead0173 | 2014-04-10 15:08:08 +0300 | [diff] [blame] | 411 | run_test(data, test_crc_offscreen, cursor_size, cursor_size); |
Ville Syrjälä | f688a56 | 2014-04-25 13:38:31 +0300 | [diff] [blame] | 412 | igt_subtest_f("cursor-%d-sliding", cursor_size) |
Antti Koskipaa | 470e5ce | 2014-04-10 15:08:10 +0300 | [diff] [blame] | 413 | run_test(data, test_crc_sliding, cursor_size, cursor_size); |
Ville Syrjälä | f688a56 | 2014-04-25 13:38:31 +0300 | [diff] [blame] | 414 | igt_subtest_f("cursor-%d-random", cursor_size) |
Antti Koskipaa | fafcff9 | 2014-04-10 15:08:11 +0300 | [diff] [blame] | 415 | run_test(data, test_crc_random, cursor_size, cursor_size); |
Sagar Kamble | ba3a1a8 | 2014-03-18 15:59:43 +0530 | [diff] [blame] | 416 | |
Ville Syrjälä | f8e5a3f | 2014-04-25 13:49:11 +0300 | [diff] [blame] | 417 | igt_fixture |
| 418 | igt_remove_fb(data->drm_fd, &data->fb); |
| 419 | } |
Sagar Kamble | ba3a1a8 | 2014-03-18 15:59:43 +0530 | [diff] [blame] | 420 | } |
| 421 | |
Daniel Vetter | 071e9ca | 2013-10-31 16:23:26 +0100 | [diff] [blame] | 422 | igt_main |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 423 | { |
Ville Syrjälä | fb2ccb1 | 2014-04-25 13:50:59 +0300 | [diff] [blame] | 424 | uint64_t cursor_width = 64, cursor_height = 64; |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 425 | data_t data = {}; |
Daniel Vetter | 52edf3a | 2014-03-22 14:45:54 +0100 | [diff] [blame] | 426 | int ret; |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 427 | |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 428 | igt_skip_on_simulation(); |
| 429 | |
| 430 | igt_fixture { |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 431 | data.drm_fd = drm_open_any(); |
Daniel Vetter | 1f0cf2d | 2013-10-31 17:02:41 +0100 | [diff] [blame] | 432 | |
Sagar Kamble | ba3a1a8 | 2014-03-18 15:59:43 +0530 | [diff] [blame] | 433 | ret = drmGetCap(data.drm_fd, DRM_CAP_CURSOR_WIDTH, &cursor_width); |
Ville Syrjälä | fb2ccb1 | 2014-04-25 13:50:59 +0300 | [diff] [blame] | 434 | igt_assert(ret == 0 || errno == EINVAL); |
Sagar Kamble | ba3a1a8 | 2014-03-18 15:59:43 +0530 | [diff] [blame] | 435 | /* Not making use of cursor_height since it is same as width, still reading */ |
| 436 | ret = drmGetCap(data.drm_fd, DRM_CAP_CURSOR_HEIGHT, &cursor_height); |
Ville Syrjälä | fb2ccb1 | 2014-04-25 13:50:59 +0300 | [diff] [blame] | 437 | igt_assert(ret == 0 || errno == EINVAL); |
Sagar Kamble | ba3a1a8 | 2014-03-18 15:59:43 +0530 | [diff] [blame] | 438 | |
Sagar Kamble | ba3a1a8 | 2014-03-18 15:59:43 +0530 | [diff] [blame] | 439 | /* We assume width and height are same so max is assigned width */ |
Daniel Vetter | 701a755 | 2014-03-20 17:31:16 +0100 | [diff] [blame] | 440 | igt_assert_cmpint(cursor_width, ==, cursor_height); |
Sagar Kamble | ba3a1a8 | 2014-03-18 15:59:43 +0530 | [diff] [blame] | 441 | |
Daniel Vetter | 1f0cf2d | 2013-10-31 17:02:41 +0100 | [diff] [blame] | 442 | igt_set_vt_graphics_mode(); |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 443 | |
Daniel Vetter | f2e5dc0 | 2014-03-16 15:09:22 +0100 | [diff] [blame] | 444 | igt_require_pipe_crc(); |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 445 | |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 446 | igt_display_init(&data.display, data.drm_fd); |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 447 | } |
| 448 | |
Antti Koskipaa | 21fb118 | 2014-06-02 13:43:18 +0300 | [diff] [blame] | 449 | igt_subtest_f("cursor-size-change") |
| 450 | run_test(&data, test_cursor_size, cursor_width, cursor_height); |
| 451 | |
Daniel Vetter | 52edf3a | 2014-03-22 14:45:54 +0100 | [diff] [blame] | 452 | run_test_generic(&data, cursor_width); |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 453 | |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 454 | igt_fixture { |
Damien Lespiau | d435829 | 2014-02-05 17:14:12 +0000 | [diff] [blame] | 455 | igt_display_fini(&data.display); |
| 456 | } |
Ville Syrjälä | 08c27e3 | 2013-10-18 17:44:42 +0300 | [diff] [blame] | 457 | } |