* [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error
@ 2019-12-11 20:09 Juha-Pekka Heikkila
2019-12-11 21:11 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_cursor_crc: Fix user space read too slow error (rev4) Patchwork
` (3 more replies)
0 siblings, 4 replies; 19+ messages in thread
From: Juha-Pekka Heikkila @ 2019-12-11 20:09 UTC (permalink / raw)
To: igt-dev
Having crc running continuously cause this test sometime
fill crc buffer, fix this problem as well as do some generic
cleanups.
v2: Take out gem_sync()
v3: Use rendercopy if available, otherwise Cairo surface for restoring
test image
CC: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
Chris, about the comments on the previous patches for this test. On this
patch there's two paths, if you want to try see those random crc failures
I was getting disable on test fixture rendercopy part so this test will use
Cairo to restore test image. I'm testing this with ICL where rendercopy path
never fail but Cairo path fail roughly 1/10 run on random round for example
on pipe-A-cursor-128x128-onscreen test (and basically any similar test).
I also tried two fb version with flipping but using Cairo those crc
errors were happening.
Difference with those paths is rendercopy will have test image stored on
FB created during setup, Cairo path has Cairo surface. At restore_image()
then is used either to restore test image.
When using Cairo path if I wait for two vblanks instead of one after
restoring test image those random crc failures seem to go away.
Anyway, I'm thinking both Cairo and rendercopy path should result in same
outcome and most of the time they do. Then I have no idea where on Cairo
path those failures are coming from.
/Juha-Pekka
tests/kms_cursor_crc.c | 204 +++++++++++++++++++++++++++++++++----------------
1 file changed, 138 insertions(+), 66 deletions(-)
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 6475dea..76a2ef6 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -48,11 +48,10 @@ IGT_TEST_DESCRIPTION(
typedef struct {
int drm_fd;
igt_display_t display;
- struct igt_fb primary_fb;
+ struct igt_fb primary_fb[2];
struct igt_fb fb;
igt_output_t *output;
enum pipe pipe;
- igt_crc_t ref_crc;
int left, right, top, bottom;
int screenw, screenh;
int refresh;
@@ -60,11 +59,20 @@ typedef struct {
int cursor_max_w, cursor_max_h;
igt_pipe_crc_t *pipe_crc;
unsigned flags;
+ igt_plane_t *primary;
+ igt_plane_t *cursor;
+ cairo_surface_t *surface;
+ uint32_t devid;
+ drm_intel_bufmgr *bufmgr;
+ igt_render_copyfunc_t rendercopy;
} data_t;
#define TEST_DPMS (1<<0)
#define TEST_SUSPEND (1<<1)
+#define FRONTBUFFER 0
+#define RESTOREBUFFER 1
+
static void draw_cursor(cairo_t *cr, int x, int y, int cw, int ch, double a)
{
int wl, wr, ht, hb;
@@ -89,23 +97,15 @@ static void draw_cursor(cairo_t *cr, int x, int y, int cw, int ch, double a)
static void cursor_enable(data_t *data)
{
- igt_output_t *output = data->output;
- igt_plane_t *cursor =
- igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
-
- igt_plane_set_fb(cursor, &data->fb);
- igt_plane_set_size(cursor, data->curw, data->curh);
- igt_fb_set_size(&data->fb, cursor, data->curw, data->curh);
+ igt_plane_set_fb(data->cursor, &data->fb);
+ igt_plane_set_size(data->cursor, data->curw, data->curh);
+ igt_fb_set_size(&data->fb, data->cursor, data->curw, data->curh);
}
static void cursor_disable(data_t *data)
{
- igt_output_t *output = data->output;
- igt_plane_t *cursor =
- igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
-
- igt_plane_set_fb(cursor, NULL);
- igt_plane_set_position(cursor, 0, 0);
+ igt_plane_set_fb(data->cursor, NULL);
+ igt_plane_set_position(data->cursor, 0, 0);
}
static bool chv_cursor_broken(data_t *data, int x)
@@ -144,36 +144,81 @@ static bool cursor_visible(data_t *data, int x, int y)
return true;
}
+static void scratch_buf_init(struct igt_buf *buf, drm_intel_bo *bo,
+ struct igt_fb* fb)
+{
+ buf->bo = bo;
+ buf->stride = fb->strides[0];
+ buf->tiling = fb->modifier;
+ buf->size = fb->size;
+ buf->bpp = fb->plane_bpp[0];
+}
+
+static void restore_image(data_t *data)
+{
+ cairo_t *cr;
+ drm_intel_bo *src, *dst;
+ struct intel_batchbuffer *batch;
+ struct igt_buf src_buf = {0}, dst_buf = {0};
+
+ if (data->rendercopy != NULL) {
+ /* use rendercopy if available */
+ dst = gem_handle_to_libdrm_bo(data->bufmgr, data->drm_fd, "", data->primary_fb[FRONTBUFFER].gem_handle);
+ igt_assert(dst);
+
+ src = gem_handle_to_libdrm_bo(data->bufmgr, data->drm_fd, "", data->primary_fb[RESTOREBUFFER].gem_handle);
+ igt_assert(src);
+
+ scratch_buf_init(&src_buf, src, &data->primary_fb[RESTOREBUFFER]);
+ scratch_buf_init(&dst_buf, dst, &data->primary_fb[FRONTBUFFER]);
+
+ batch = intel_batchbuffer_alloc(data->bufmgr, data->devid);
+ igt_assert(batch);
+
+ data->rendercopy(batch, NULL,
+ &src_buf, 0, 0, data->primary_fb[RESTOREBUFFER].width, data->primary_fb[RESTOREBUFFER].height,
+ &dst_buf, 0, 0);
+
+ intel_batchbuffer_free(batch);
+ } else {
+ /* if rendercopy not implemented in igt use cairo */
+ cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
+ cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
+ cairo_set_source_surface(cr, data->surface, 0, 0);
+ cairo_rectangle(cr, 0, 0, data->screenw, data->screenh);
+ cairo_fill(cr);
+ igt_put_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER], cr);
+ }
+ igt_dirty_fb(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
+}
+
static void do_single_test(data_t *data, int x, int y)
{
igt_display_t *display = &data->display;
igt_pipe_crc_t *pipe_crc = data->pipe_crc;
igt_crc_t crc, ref_crc;
- igt_plane_t *cursor =
- igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_CURSOR);
cairo_t *cr;
int ret = 0;
igt_print_activity();
/* Hardware test */
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
- igt_paint_test_pattern(cr, data->screenw, data->screenh);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
+ restore_image(data);
+ igt_plane_set_position(data->cursor, x, y);
cursor_enable(data);
- igt_plane_set_position(cursor, x, y);
if (chv_cursor_broken(data, x) && cursor_visible(data, x, y)) {
ret = igt_display_try_commit2(display, COMMIT_LEGACY);
igt_assert_eq(ret, -EINVAL);
- igt_plane_set_position(cursor, 0, y);
+ igt_plane_set_position(data->cursor, 0, y);
return;
}
igt_display_commit(display);
+ /* Extra vblank wait is because nonblocking cursor ioctl */
igt_wait_for_vblank(data->drm_fd, data->pipe);
igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &crc);
@@ -205,45 +250,35 @@ static void do_single_test(data_t *data, int x, int y)
}
cursor_disable(data);
- igt_display_commit(display);
/* Now render the same in software and collect crc */
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
+ cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
draw_cursor(cr, x, y, data->curw, data->curh, 1.0);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
+ igt_put_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER], cr);
igt_display_commit(display);
-
+ igt_dirty_fb(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
+ /* Extra vblank wait is because nonblocking cursor ioctl */
igt_wait_for_vblank(data->drm_fd, data->pipe);
- igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
+ igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
igt_assert_crc_equal(&crc, &ref_crc);
-
- /* Clear screen afterwards */
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
- igt_paint_color(cr, 0, 0, data->screenw, data->screenh, 0.0, 0.0, 0.0);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
}
static void do_fail_test(data_t *data, int x, int y, int expect)
{
igt_display_t *display = &data->display;
- igt_plane_t *cursor =
- igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_CURSOR);
- cairo_t *cr;
int ret;
igt_print_activity();
/* Hardware test */
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
- igt_paint_test_pattern(cr, data->screenw, data->screenh);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
+ restore_image(data);
cursor_enable(data);
- igt_plane_set_position(cursor, x, y);
+ igt_plane_set_position(data->cursor, x, y);
ret = igt_display_try_commit2(display, COMMIT_LEGACY);
- igt_plane_set_position(cursor, 0, 0);
+ igt_plane_set_position(data->cursor, 0, 0);
cursor_disable(data);
igt_display_commit(display);
@@ -355,7 +390,13 @@ static void cleanup_crtc(data_t *data)
igt_pipe_crc_free(data->pipe_crc);
data->pipe_crc = NULL;
- igt_remove_fb(data->drm_fd, &data->primary_fb);
+ cairo_surface_destroy(data->surface);
+
+ igt_plane_set_fb(data->primary, NULL);
+ igt_display_commit(display);
+
+ igt_remove_fb(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
+ igt_remove_fb(data->drm_fd, &data->primary_fb[RESTOREBUFFER]);
igt_display_reset(display);
}
@@ -365,21 +406,29 @@ static void prepare_crtc(data_t *data, igt_output_t *output,
{
drmModeModeInfo *mode;
igt_display_t *display = &data->display;
- igt_plane_t *primary;
+ cairo_t *cr;
/* select the pipe we want to use */
igt_output_set_pipe(output, data->pipe);
- /* create and set the primary plane fb */
+ /* create and set the primary plane fbs */
mode = igt_output_get_mode(output);
igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
LOCAL_DRM_FORMAT_MOD_NONE,
0.0, 0.0, 0.0,
- &data->primary_fb);
+ &data->primary_fb[FRONTBUFFER]);
+
+ igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
+ DRM_FORMAT_XRGB8888,
+ LOCAL_DRM_FORMAT_MOD_NONE,
+ 0.0, 0.0, 0.0,
+ &data->primary_fb[RESTOREBUFFER]);
+
+ data->primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+ data->cursor = igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
- primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
- igt_plane_set_fb(primary, &data->primary_fb);
+ igt_plane_set_fb(data->primary, &data->primary_fb[FRONTBUFFER]);
igt_display_commit(display);
@@ -398,9 +447,23 @@ static void prepare_crtc(data_t *data, igt_output_t *output,
data->curh = cursor_h;
data->refresh = mode->vrefresh;
- /* get reference crc w/o cursor */
+ data->surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24, data->screenw, data->screenh);
+
+ if (data->rendercopy == NULL) {
+ /* store test image as cairo surface */
+ cr = cairo_create(data->surface);
+ cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
+ igt_paint_test_pattern(cr, data->screenw, data->screenh);
+ cairo_destroy(cr);
+ } else {
+ /* store test image as fb if rendercopy is available */
+ cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb[RESTOREBUFFER]);
+ cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
+ igt_paint_test_pattern(cr, data->screenw, data->screenh);
+ igt_put_cairo_ctx(data->drm_fd, &data->primary_fb[RESTOREBUFFER], cr);
+ }
+
igt_pipe_crc_start(data->pipe_crc);
- igt_pipe_crc_get_current(data->drm_fd, data->pipe_crc, &data->ref_crc);
}
static void test_cursor_alpha(data_t *data, double a)
@@ -432,9 +495,9 @@ static void test_cursor_alpha(data_t *data, double a)
igt_remove_fb(data->drm_fd, &data->fb);
/*Software Test*/
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
+ cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
igt_paint_color_alpha(cr, 0, 0, curw, curh, 1.0, 1.0, 1.0, a);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
+ igt_put_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER], cr);
igt_display_commit(display);
igt_wait_for_vblank(data->drm_fd, data->pipe);
@@ -442,10 +505,10 @@ static void test_cursor_alpha(data_t *data, double a)
igt_assert_crc_equal(&crc, &ref_crc);
/*Clear Screen*/
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
+ cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
igt_paint_color(cr, 0, 0, data->screenw, data->screenh,
0.0, 0.0, 0.0);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
+ igt_put_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER], cr);
}
static void test_cursor_transparent(data_t *data)
@@ -521,8 +584,6 @@ static void test_cursor_size(data_t *data)
uint32_t fb_id;
int i, size;
int cursor_max_size = data->cursor_max_w;
- igt_plane_t *cursor =
- igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_CURSOR);
/* Create a maximum size cursor, then change the size in flight to
* smaller ones to see that the size is applied correctly
@@ -541,8 +602,8 @@ static void test_cursor_size(data_t *data)
cursor_enable(data);
for (i = 0, size = cursor_max_size; size >= 64; size /= 2, i++) {
/* Change size in flight: */
- igt_plane_set_size(cursor, size, size);
- igt_fb_set_size(&data->fb, cursor, size, size);
+ igt_plane_set_size(data->cursor, size, size);
+ igt_fb_set_size(&data->fb, data->cursor, size, size);
igt_display_commit(display);
igt_wait_for_vblank(data->drm_fd, data->pipe);
igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &crc[i]);
@@ -553,18 +614,18 @@ static void test_cursor_size(data_t *data)
/* Software test loop */
for (i = 0, size = cursor_max_size; size >= 64; size /= 2, i++) {
/* Now render the same in software and collect crc */
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
+ cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
igt_paint_color_alpha(cr, 0, 0, size, size, 1.0, 1.0, 1.0, 1.0);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
+ igt_put_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER], cr);
igt_display_commit(display);
igt_wait_for_vblank(data->drm_fd, data->pipe);
igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
/* Clear screen afterwards */
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
+ cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
igt_paint_color(cr, 0, 0, data->screenw, data->screenh,
0.0, 0.0, 0.0);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
+ igt_put_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER], cr);
igt_assert_crc_equal(&crc[i], &ref_crc);
}
}
@@ -575,26 +636,24 @@ static void test_rapid_movement(data_t *data)
int x = 0, y = 0;
long usec;
igt_display_t *display = &data->display;
- igt_plane_t *cursor =
- igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_CURSOR);
cursor_enable(data);
gettimeofday(&start, NULL);
for ( ; x < 100; x++) {
- igt_plane_set_position(cursor, x, y);
+ igt_plane_set_position(data->cursor, x, y);
igt_display_commit(display);
}
for ( ; y < 100; y++) {
- igt_plane_set_position(cursor, x, y);
+ igt_plane_set_position(data->cursor, x, y);
igt_display_commit(display);
}
for ( ; x > 0; x--) {
- igt_plane_set_position(cursor, x, y);
+ igt_plane_set_position(data->cursor, x, y);
igt_display_commit(display);
}
for ( ; y > 0; y--) {
- igt_plane_set_position(cursor, x, y);
+ igt_plane_set_position(data->cursor, x, y);
igt_display_commit(display);
}
gettimeofday(&end, NULL);
@@ -736,6 +795,16 @@ igt_main
igt_require_pipe_crc(data.drm_fd);
igt_display_require(&data.display, data.drm_fd);
+
+ if (is_i915_device(data.drm_fd)) {
+ data.bufmgr = drm_intel_bufmgr_gem_init(data.drm_fd, 4096);
+ igt_assert(data.bufmgr);
+ drm_intel_bufmgr_gem_enable_reuse(data.bufmgr);
+
+ data.devid = intel_get_drm_devid(data.drm_fd);
+ data.rendercopy = igt_get_render_copyfunc(data.devid);
+ igt_assert(data.rendercopy != NULL);
+ }
}
data.cursor_max_w = cursor_width;
@@ -746,6 +815,9 @@ igt_main
run_tests_on_pipe(&data, pipe);
igt_fixture {
+ if (data.bufmgr != NULL)
+ drm_intel_bufmgr_destroy(data.bufmgr);
+
igt_display_fini(&data.display);
}
}
--
2.7.4
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 19+ messages in thread* [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_cursor_crc: Fix user space read too slow error (rev4)
2019-12-11 20:09 [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error Juha-Pekka Heikkila
@ 2019-12-11 21:11 ` Patchwork
2019-12-12 7:19 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
` (2 subsequent siblings)
3 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2019-12-11 21:11 UTC (permalink / raw)
To: Juha-Pekka Heikkila; +Cc: igt-dev
== Series Details ==
Series: tests/kms_cursor_crc: Fix user space read too slow error (rev4)
URL : https://patchwork.freedesktop.org/series/70218/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_7543 -> IGTPW_3849
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/index.html
Known issues
------------
Here are the changes found in IGTPW_3849 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live_gem_contexts:
- fi-hsw-peppy: [PASS][1] -> [DMESG-FAIL][2] ([i915#722])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html
* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [PASS][3] -> [DMESG-WARN][4] ([i915#44])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html
#### Possible fixes ####
* igt@i915_selftest@live_gem_contexts:
- fi-byt-n2820: [DMESG-FAIL][5] ([i915#722]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html
* igt@i915_selftest@live_requests:
- fi-ivb-3770: [INCOMPLETE][7] ([i915#773]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/fi-ivb-3770/igt@i915_selftest@live_requests.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/fi-ivb-3770/igt@i915_selftest@live_requests.html
- fi-hsw-4770: [INCOMPLETE][9] ([i915#773]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/fi-hsw-4770/igt@i915_selftest@live_requests.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/fi-hsw-4770/igt@i915_selftest@live_requests.html
* igt@kms_busy@basic-flip-pipe-a:
- fi-kbl-soraka: [DMESG-WARN][11] ([i915#95]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/fi-kbl-soraka/igt@kms_busy@basic-flip-pipe-a.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/fi-kbl-soraka/igt@kms_busy@basic-flip-pipe-a.html
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][13] ([fdo#111096] / [i915#323]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
#### Warnings ####
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- fi-kbl-x1275: [DMESG-WARN][15] ([i915#62] / [i915#92]) -> [DMESG-WARN][16] ([i915#62] / [i915#92] / [i915#95]) +5 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/fi-kbl-x1275/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/fi-kbl-x1275/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-kbl-x1275: [DMESG-WARN][17] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][18] ([i915#62] / [i915#92]) +5 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/fi-kbl-x1275/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/fi-kbl-x1275/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323
[i915#44]: https://gitlab.freedesktop.org/drm/intel/issues/44
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
[i915#722]: https://gitlab.freedesktop.org/drm/intel/issues/722
[i915#773]: https://gitlab.freedesktop.org/drm/intel/issues/773
[i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (51 -> 47)
------------------------------
Additional (3): fi-hsw-4770r fi-tgl-guc fi-tgl-y
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_5345 -> IGTPW_3849
CI-20190529: 20190529
CI_DRM_7543: 91752f80df9b582561be6bbac12ef780b12f606c @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3849: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/index.html
IGT_5345: 9e0c82b6d70065db894ececf2be8de372e983cf0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 19+ messages in thread* [igt-dev] ✗ Fi.CI.IGT: failure for tests/kms_cursor_crc: Fix user space read too slow error (rev4)
2019-12-11 20:09 [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error Juha-Pekka Heikkila
2019-12-11 21:11 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_cursor_crc: Fix user space read too slow error (rev4) Patchwork
@ 2019-12-12 7:19 ` Patchwork
2019-12-12 11:38 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
2019-12-18 11:44 ` [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error Kahola, Mika
3 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2019-12-12 7:19 UTC (permalink / raw)
To: Juha-Pekka Heikkila; +Cc: igt-dev
== Series Details ==
Series: tests/kms_cursor_crc: Fix user space read too slow error (rev4)
URL : https://patchwork.freedesktop.org/series/70218/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_7543_full -> IGTPW_3849_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_3849_full absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_3849_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_3849_full:
### IGT changes ###
#### Possible regressions ####
* igt@gem_exec_balancer@bonded-slice:
- shard-kbl: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-kbl1/igt@gem_exec_balancer@bonded-slice.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-kbl4/igt@gem_exec_balancer@bonded-slice.html
- shard-tglb: NOTRUN -> [FAIL][3]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb1/igt@gem_exec_balancer@bonded-slice.html
Known issues
------------
Here are the changes found in IGTPW_3849_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_isolation@vcs1-s3:
- shard-tglb: [PASS][4] -> [INCOMPLETE][5] ([i915#456])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb4/igt@gem_ctx_isolation@vcs1-s3.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb1/igt@gem_ctx_isolation@vcs1-s3.html
* igt@gem_ctx_persistence@vcs0-mixed-process:
- shard-glk: [PASS][6] -> [FAIL][7] ([i915#679])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-glk2/igt@gem_ctx_persistence@vcs0-mixed-process.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-glk7/igt@gem_ctx_persistence@vcs0-mixed-process.html
* igt@gem_exec_schedule@preempt-queue-contexts-bsd1:
- shard-iclb: [PASS][8] -> [SKIP][9] ([fdo#109276]) +4 similar issues
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-iclb1/igt@gem_exec_schedule@preempt-queue-contexts-bsd1.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-iclb8/igt@gem_exec_schedule@preempt-queue-contexts-bsd1.html
* igt@gem_persistent_relocs@forked-interruptible-thrash-inactive:
- shard-hsw: [PASS][10] -> [TIMEOUT][11] ([i915#530])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-hsw4/igt@gem_persistent_relocs@forked-interruptible-thrash-inactive.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-hsw2/igt@gem_persistent_relocs@forked-interruptible-thrash-inactive.html
* igt@gem_ppgtt@flink-and-close-vma-leak:
- shard-iclb: [PASS][12] -> [FAIL][13] ([i915#644])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-iclb5/igt@gem_ppgtt@flink-and-close-vma-leak.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-iclb8/igt@gem_ppgtt@flink-and-close-vma-leak.html
* igt@gem_userptr_blits@dmabuf-sync:
- shard-snb: [PASS][14] -> [DMESG-WARN][15] ([fdo#111870]) +2 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-snb5/igt@gem_userptr_blits@dmabuf-sync.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-snb4/igt@gem_userptr_blits@dmabuf-sync.html
* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [PASS][16] -> [FAIL][17] ([i915#454])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-iclb2/igt@i915_pm_dc@dc6-psr.html
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-iclb2/igt@i915_pm_dc@dc6-psr.html
* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-draw-mmap-gtt:
- shard-glk: [PASS][18] -> [FAIL][19] ([i915#49])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-glk8/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-draw-mmap-gtt.html
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-glk9/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-draw-mmap-gtt.html
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-tglb: [PASS][20] -> [INCOMPLETE][21] ([i915#456] / [i915#460] / [i915#474])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb3/igt@kms_frontbuffer_tracking@fbc-suspend.html
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb8/igt@kms_frontbuffer_tracking@fbc-suspend.html
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-pwrite:
- shard-tglb: [PASS][22] -> [INCOMPLETE][23] ([fdo#112393] / [i915#667])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb4/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-pwrite.html
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb2/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-pwrite.html
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-wc:
- shard-tglb: [PASS][24] -> [INCOMPLETE][25] ([i915#474] / [i915#667])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb1/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-wc.html
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb7/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-wc.html
* igt@kms_plane@pixel-format-pipe-b-planes-source-clamping:
- shard-kbl: [PASS][26] -> [INCOMPLETE][27] ([fdo#103665] / [i915#435] / [i915#648] / [i915#667])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-kbl4/igt@kms_plane@pixel-format-pipe-b-planes-source-clamping.html
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-kbl6/igt@kms_plane@pixel-format-pipe-b-planes-source-clamping.html
* igt@kms_psr@psr2_sprite_plane_move:
- shard-iclb: [PASS][28] -> [SKIP][29] ([fdo#109441]) +1 similar issue
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-iclb3/igt@kms_psr@psr2_sprite_plane_move.html
* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-kbl: [PASS][30] -> [DMESG-WARN][31] ([i915#180]) +1 similar issue
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-kbl7/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-kbl2/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
- shard-apl: [PASS][32] -> [DMESG-WARN][33] ([i915#180]) +1 similar issue
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-apl3/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-apl6/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
* igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend:
- shard-tglb: [PASS][34] -> [INCOMPLETE][35] ([i915#460])
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb7/igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend.html
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb8/igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend.html
* igt@perf_pmu@semaphore-wait-vcs1:
- shard-iclb: [PASS][36] -> [SKIP][37] ([fdo#112080]) +1 similar issue
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-iclb4/igt@perf_pmu@semaphore-wait-vcs1.html
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-iclb8/igt@perf_pmu@semaphore-wait-vcs1.html
#### Possible fixes ####
* igt@gem_busy@extended-parallel-vcs1:
- shard-iclb: [SKIP][38] ([fdo#112080]) -> [PASS][39] +3 similar issues
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-iclb3/igt@gem_busy@extended-parallel-vcs1.html
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-iclb1/igt@gem_busy@extended-parallel-vcs1.html
* igt@gem_ctx_isolation@vcs1-dirty-create:
- shard-iclb: [SKIP][40] ([fdo#109276] / [fdo#112080]) -> [PASS][41]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-iclb3/igt@gem_ctx_isolation@vcs1-dirty-create.html
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-iclb1/igt@gem_ctx_isolation@vcs1-dirty-create.html
* igt@gem_exec_parallel@basic:
- shard-tglb: [INCOMPLETE][42] ([i915#476]) -> [PASS][43]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb3/igt@gem_exec_parallel@basic.html
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb2/igt@gem_exec_parallel@basic.html
* igt@gem_exec_schedule@deep-bsd2:
- shard-iclb: [SKIP][44] ([fdo#109276]) -> [PASS][45]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-iclb7/igt@gem_exec_schedule@deep-bsd2.html
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-iclb2/igt@gem_exec_schedule@deep-bsd2.html
* igt@gem_exec_schedule@in-order-bsd:
- shard-iclb: [SKIP][46] ([fdo#112146]) -> [PASS][47] +1 similar issue
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-iclb2/igt@gem_exec_schedule@in-order-bsd.html
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-iclb8/igt@gem_exec_schedule@in-order-bsd.html
* {igt@gem_exec_schedule@pi-userfault-bsd}:
- shard-iclb: [SKIP][48] ([i915#677]) -> [PASS][49]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-iclb2/igt@gem_exec_schedule@pi-userfault-bsd.html
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-iclb6/igt@gem_exec_schedule@pi-userfault-bsd.html
* igt@gem_exec_suspend@basic-s3:
- shard-kbl: [INCOMPLETE][50] ([fdo#103665]) -> [PASS][51]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-kbl3/igt@gem_exec_suspend@basic-s3.html
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-kbl6/igt@gem_exec_suspend@basic-s3.html
* igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrash-inactive:
- shard-snb: [TIMEOUT][52] ([i915#530]) -> [PASS][53]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-snb1/igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrash-inactive.html
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-snb6/igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrash-inactive.html
* igt@gem_userptr_blits@map-fixed-invalidate-busy:
- shard-snb: [DMESG-WARN][54] ([fdo#110789] / [fdo#111870]) -> [PASS][55]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-snb2/igt@gem_userptr_blits@map-fixed-invalidate-busy.html
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-snb5/igt@gem_userptr_blits@map-fixed-invalidate-busy.html
* igt@gem_userptr_blits@sync-unmap-cycles:
- shard-snb: [DMESG-WARN][56] ([fdo#111870]) -> [PASS][57] +1 similar issue
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-snb7/igt@gem_userptr_blits@sync-unmap-cycles.html
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-snb7/igt@gem_userptr_blits@sync-unmap-cycles.html
* igt@i915_pm_rps@reset:
- shard-tglb: [FAIL][58] ([i915#413]) -> [PASS][59]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb6/igt@i915_pm_rps@reset.html
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb8/igt@i915_pm_rps@reset.html
* igt@i915_selftest@live_gt_timelines:
- shard-tglb: [INCOMPLETE][60] ([i915#455]) -> [PASS][61]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb3/igt@i915_selftest@live_gt_timelines.html
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb1/igt@i915_selftest@live_gt_timelines.html
* igt@i915_suspend@sysfs-reader:
- shard-apl: [DMESG-WARN][62] ([i915#180]) -> [PASS][63] +3 similar issues
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-apl6/igt@i915_suspend@sysfs-reader.html
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-apl1/igt@i915_suspend@sysfs-reader.html
* igt@kms_draw_crc@draw-method-rgb565-blt-xtiled:
- shard-tglb: [INCOMPLETE][64] ([i915#667]) -> [PASS][65]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb9/igt@kms_draw_crc@draw-method-rgb565-blt-xtiled.html
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb3/igt@kms_draw_crc@draw-method-rgb565-blt-xtiled.html
* igt@kms_draw_crc@draw-method-xrgb8888-render-ytiled:
- shard-tglb: [INCOMPLETE][66] ([fdo#112393] / [i915#667]) -> [PASS][67]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb8/igt@kms_draw_crc@draw-method-xrgb8888-render-ytiled.html
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb1/igt@kms_draw_crc@draw-method-xrgb8888-render-ytiled.html
* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
- shard-glk: [FAIL][68] ([i915#79]) -> [PASS][69]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-glk8/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-glk9/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-kbl: [DMESG-WARN][70] ([i915#180]) -> [PASS][71] +9 similar issues
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-kbl6/igt@kms_frontbuffer_tracking@fbc-suspend.html
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-kbl6/igt@kms_frontbuffer_tracking@fbc-suspend.html
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-blt:
- shard-tglb: [INCOMPLETE][72] ([i915#474] / [i915#667]) -> [PASS][73]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-blt.html
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-blt.html
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-pwrite:
- shard-tglb: [FAIL][74] ([i915#49]) -> [PASS][75]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-pwrite.html
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb8/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-pwrite.html
* igt@kms_setmode@basic:
- shard-apl: [FAIL][76] ([i915#31]) -> [PASS][77]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-apl3/igt@kms_setmode@basic.html
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-apl7/igt@kms_setmode@basic.html
#### Warnings ####
* igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy:
- shard-snb: [DMESG-WARN][78] ([fdo#111870]) -> [DMESG-WARN][79] ([fdo#110789] / [fdo#111870])
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-snb6/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-snb7/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110789]: https://bugs.freedesktop.org/show_bug.cgi?id=110789
[fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870
[fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
[fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
[fdo#112393]: https://bugs.freedesktop.org/show_bug.cgi?id=112393
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#413]: https://gitlab.freedesktop.org/drm/intel/issues/413
[i915#435]: https://gitlab.freedesktop.org/drm/intel/issues/435
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#455]: https://gitlab.freedesktop.org/drm/intel/issues/455
[i915#456]: https://gitlab.freedesktop.org/drm/intel/issues/456
[i915#460]: https://gitlab.freedesktop.org/drm/intel/issues/460
[i915#474]: https://gitlab.freedesktop.org/drm/intel/issues/474
[i915#476]: https://gitlab.freedesktop.org/drm/intel/issues/476
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#530]: https://gitlab.freedesktop.org/drm/intel/issues/530
[i915#644]: https://gitlab.freedesktop.org/drm/intel/issues/644
[i915#648]: https://gitlab.freedesktop.org/drm/intel/issues/648
[i915#667]: https://gitlab.freedesktop.org/drm/intel/issues/667
[i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
[i915#679]: https://gitlab.freedesktop.org/drm/intel/issues/679
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
Participating hosts (11 -> 8)
------------------------------
Missing (3): pig-skl-6260u pig-glk-j5005 pig-hsw-4770r
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_5345 -> IGTPW_3849
* Piglit: piglit_4509 -> None
CI-20190529: 20190529
CI_DRM_7543: 91752f80df9b582561be6bbac12ef780b12f606c @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3849: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/index.html
IGT_5345: 9e0c82b6d70065db894ececf2be8de372e983cf0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 19+ messages in thread* [igt-dev] ✓ Fi.CI.IGT: success for tests/kms_cursor_crc: Fix user space read too slow error (rev4)
2019-12-11 20:09 [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error Juha-Pekka Heikkila
2019-12-11 21:11 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_cursor_crc: Fix user space read too slow error (rev4) Patchwork
2019-12-12 7:19 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
@ 2019-12-12 11:38 ` Patchwork
2019-12-18 11:44 ` [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error Kahola, Mika
3 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2019-12-12 11:38 UTC (permalink / raw)
To: Juha-Pekka Heikkila; +Cc: igt-dev
== Series Details ==
Series: tests/kms_cursor_crc: Fix user space read too slow error (rev4)
URL : https://patchwork.freedesktop.org/series/70218/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_7543_full -> IGTPW_3849_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/index.html
Known issues
------------
Here are the changes found in IGTPW_3849_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_isolation@vcs1-s3:
- shard-tglb: [PASS][1] -> [INCOMPLETE][2] ([i915#456])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb4/igt@gem_ctx_isolation@vcs1-s3.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb1/igt@gem_ctx_isolation@vcs1-s3.html
* igt@gem_ctx_persistence@vcs0-mixed-process:
- shard-glk: [PASS][3] -> [FAIL][4] ([i915#679])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-glk2/igt@gem_ctx_persistence@vcs0-mixed-process.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-glk7/igt@gem_ctx_persistence@vcs0-mixed-process.html
* igt@gem_exec_balancer@bonded-slice:
- shard-kbl: [PASS][5] -> [FAIL][6] ([i915#800])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-kbl1/igt@gem_exec_balancer@bonded-slice.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-kbl4/igt@gem_exec_balancer@bonded-slice.html
* igt@gem_exec_schedule@preempt-queue-contexts-bsd1:
- shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#109276]) +4 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-iclb1/igt@gem_exec_schedule@preempt-queue-contexts-bsd1.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-iclb8/igt@gem_exec_schedule@preempt-queue-contexts-bsd1.html
* igt@gem_persistent_relocs@forked-interruptible-thrash-inactive:
- shard-hsw: [PASS][9] -> [TIMEOUT][10] ([i915#530])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-hsw4/igt@gem_persistent_relocs@forked-interruptible-thrash-inactive.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-hsw2/igt@gem_persistent_relocs@forked-interruptible-thrash-inactive.html
* igt@gem_ppgtt@flink-and-close-vma-leak:
- shard-iclb: [PASS][11] -> [FAIL][12] ([i915#644])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-iclb5/igt@gem_ppgtt@flink-and-close-vma-leak.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-iclb8/igt@gem_ppgtt@flink-and-close-vma-leak.html
* igt@gem_userptr_blits@dmabuf-sync:
- shard-snb: [PASS][13] -> [DMESG-WARN][14] ([fdo#111870]) +2 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-snb5/igt@gem_userptr_blits@dmabuf-sync.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-snb4/igt@gem_userptr_blits@dmabuf-sync.html
* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [PASS][15] -> [FAIL][16] ([i915#454])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-iclb2/igt@i915_pm_dc@dc6-psr.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-iclb2/igt@i915_pm_dc@dc6-psr.html
* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-draw-mmap-gtt:
- shard-glk: [PASS][17] -> [FAIL][18] ([i915#49])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-glk8/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-draw-mmap-gtt.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-glk9/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-draw-mmap-gtt.html
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-tglb: [PASS][19] -> [INCOMPLETE][20] ([i915#456] / [i915#460] / [i915#474])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb3/igt@kms_frontbuffer_tracking@fbc-suspend.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb8/igt@kms_frontbuffer_tracking@fbc-suspend.html
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-pwrite:
- shard-tglb: [PASS][21] -> [INCOMPLETE][22] ([fdo#112393] / [i915#667])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb4/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-pwrite.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb2/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-pwrite.html
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-wc:
- shard-tglb: [PASS][23] -> [INCOMPLETE][24] ([i915#474] / [i915#667])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb1/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-wc.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb7/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-wc.html
* igt@kms_plane@pixel-format-pipe-b-planes-source-clamping:
- shard-kbl: [PASS][25] -> [INCOMPLETE][26] ([fdo#103665] / [i915#435] / [i915#648] / [i915#667])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-kbl4/igt@kms_plane@pixel-format-pipe-b-planes-source-clamping.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-kbl6/igt@kms_plane@pixel-format-pipe-b-planes-source-clamping.html
* igt@kms_psr@psr2_sprite_plane_move:
- shard-iclb: [PASS][27] -> [SKIP][28] ([fdo#109441]) +1 similar issue
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-iclb3/igt@kms_psr@psr2_sprite_plane_move.html
* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-kbl: [PASS][29] -> [DMESG-WARN][30] ([i915#180]) +1 similar issue
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-kbl7/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-kbl2/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
- shard-apl: [PASS][31] -> [DMESG-WARN][32] ([i915#180]) +1 similar issue
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-apl3/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-apl6/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
* igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend:
- shard-tglb: [PASS][33] -> [INCOMPLETE][34] ([i915#460])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb7/igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb8/igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend.html
* igt@perf_pmu@semaphore-wait-vcs1:
- shard-iclb: [PASS][35] -> [SKIP][36] ([fdo#112080]) +1 similar issue
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-iclb4/igt@perf_pmu@semaphore-wait-vcs1.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-iclb8/igt@perf_pmu@semaphore-wait-vcs1.html
#### Possible fixes ####
* igt@gem_busy@extended-parallel-vcs1:
- shard-iclb: [SKIP][37] ([fdo#112080]) -> [PASS][38] +3 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-iclb3/igt@gem_busy@extended-parallel-vcs1.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-iclb1/igt@gem_busy@extended-parallel-vcs1.html
* igt@gem_ctx_isolation@vcs1-dirty-create:
- shard-iclb: [SKIP][39] ([fdo#109276] / [fdo#112080]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-iclb3/igt@gem_ctx_isolation@vcs1-dirty-create.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-iclb1/igt@gem_ctx_isolation@vcs1-dirty-create.html
* igt@gem_exec_parallel@basic:
- shard-tglb: [INCOMPLETE][41] ([i915#476]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb3/igt@gem_exec_parallel@basic.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb2/igt@gem_exec_parallel@basic.html
* igt@gem_exec_schedule@deep-bsd2:
- shard-iclb: [SKIP][43] ([fdo#109276]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-iclb7/igt@gem_exec_schedule@deep-bsd2.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-iclb2/igt@gem_exec_schedule@deep-bsd2.html
* igt@gem_exec_schedule@in-order-bsd:
- shard-iclb: [SKIP][45] ([fdo#112146]) -> [PASS][46] +1 similar issue
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-iclb2/igt@gem_exec_schedule@in-order-bsd.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-iclb8/igt@gem_exec_schedule@in-order-bsd.html
* {igt@gem_exec_schedule@pi-userfault-bsd}:
- shard-iclb: [SKIP][47] ([i915#677]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-iclb2/igt@gem_exec_schedule@pi-userfault-bsd.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-iclb6/igt@gem_exec_schedule@pi-userfault-bsd.html
* igt@gem_exec_suspend@basic-s3:
- shard-kbl: [INCOMPLETE][49] ([fdo#103665]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-kbl3/igt@gem_exec_suspend@basic-s3.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-kbl6/igt@gem_exec_suspend@basic-s3.html
* igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrash-inactive:
- shard-snb: [TIMEOUT][51] ([i915#530]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-snb1/igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrash-inactive.html
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-snb6/igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrash-inactive.html
* igt@gem_userptr_blits@map-fixed-invalidate-busy:
- shard-snb: [DMESG-WARN][53] ([fdo#110789] / [fdo#111870]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-snb2/igt@gem_userptr_blits@map-fixed-invalidate-busy.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-snb5/igt@gem_userptr_blits@map-fixed-invalidate-busy.html
* igt@gem_userptr_blits@sync-unmap-cycles:
- shard-snb: [DMESG-WARN][55] ([fdo#111870]) -> [PASS][56] +1 similar issue
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-snb7/igt@gem_userptr_blits@sync-unmap-cycles.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-snb7/igt@gem_userptr_blits@sync-unmap-cycles.html
* igt@i915_pm_rps@reset:
- shard-tglb: [FAIL][57] ([i915#413]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb6/igt@i915_pm_rps@reset.html
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb8/igt@i915_pm_rps@reset.html
* igt@i915_selftest@live_gt_timelines:
- shard-tglb: [INCOMPLETE][59] ([i915#455]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb3/igt@i915_selftest@live_gt_timelines.html
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb1/igt@i915_selftest@live_gt_timelines.html
* igt@i915_suspend@sysfs-reader:
- shard-apl: [DMESG-WARN][61] ([i915#180]) -> [PASS][62] +3 similar issues
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-apl6/igt@i915_suspend@sysfs-reader.html
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-apl1/igt@i915_suspend@sysfs-reader.html
* igt@kms_draw_crc@draw-method-rgb565-blt-xtiled:
- shard-tglb: [INCOMPLETE][63] ([i915#667]) -> [PASS][64]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb9/igt@kms_draw_crc@draw-method-rgb565-blt-xtiled.html
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb3/igt@kms_draw_crc@draw-method-rgb565-blt-xtiled.html
* igt@kms_draw_crc@draw-method-xrgb8888-render-ytiled:
- shard-tglb: [INCOMPLETE][65] ([fdo#112393] / [i915#667]) -> [PASS][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb8/igt@kms_draw_crc@draw-method-xrgb8888-render-ytiled.html
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb1/igt@kms_draw_crc@draw-method-xrgb8888-render-ytiled.html
* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
- shard-glk: [FAIL][67] ([i915#79]) -> [PASS][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-glk8/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-glk9/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-kbl: [DMESG-WARN][69] ([i915#180]) -> [PASS][70] +9 similar issues
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-kbl6/igt@kms_frontbuffer_tracking@fbc-suspend.html
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-kbl6/igt@kms_frontbuffer_tracking@fbc-suspend.html
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-blt:
- shard-tglb: [INCOMPLETE][71] ([i915#474] / [i915#667]) -> [PASS][72]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-blt.html
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-blt.html
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-pwrite:
- shard-tglb: [FAIL][73] ([i915#49]) -> [PASS][74]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-tglb1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-pwrite.html
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-tglb8/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-pwrite.html
* igt@kms_setmode@basic:
- shard-apl: [FAIL][75] ([i915#31]) -> [PASS][76]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-apl3/igt@kms_setmode@basic.html
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-apl7/igt@kms_setmode@basic.html
#### Warnings ####
* igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy:
- shard-snb: [DMESG-WARN][77] ([fdo#111870]) -> [DMESG-WARN][78] ([fdo#110789] / [fdo#111870])
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7543/shard-snb6/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/shard-snb7/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110789]: https://bugs.freedesktop.org/show_bug.cgi?id=110789
[fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870
[fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
[fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
[fdo#112393]: https://bugs.freedesktop.org/show_bug.cgi?id=112393
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#413]: https://gitlab.freedesktop.org/drm/intel/issues/413
[i915#435]: https://gitlab.freedesktop.org/drm/intel/issues/435
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#455]: https://gitlab.freedesktop.org/drm/intel/issues/455
[i915#456]: https://gitlab.freedesktop.org/drm/intel/issues/456
[i915#460]: https://gitlab.freedesktop.org/drm/intel/issues/460
[i915#474]: https://gitlab.freedesktop.org/drm/intel/issues/474
[i915#476]: https://gitlab.freedesktop.org/drm/intel/issues/476
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#530]: https://gitlab.freedesktop.org/drm/intel/issues/530
[i915#644]: https://gitlab.freedesktop.org/drm/intel/issues/644
[i915#648]: https://gitlab.freedesktop.org/drm/intel/issues/648
[i915#667]: https://gitlab.freedesktop.org/drm/intel/issues/667
[i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
[i915#679]: https://gitlab.freedesktop.org/drm/intel/issues/679
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#800]: https://gitlab.freedesktop.org/drm/intel/issues/800
Participating hosts (11 -> 8)
------------------------------
Missing (3): pig-skl-6260u pig-glk-j5005 pig-hsw-4770r
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_5345 -> IGTPW_3849
* Piglit: piglit_4509 -> None
CI-20190529: 20190529
CI_DRM_7543: 91752f80df9b582561be6bbac12ef780b12f606c @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3849: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/index.html
IGT_5345: 9e0c82b6d70065db894ececf2be8de372e983cf0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3849/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error
2019-12-11 20:09 [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error Juha-Pekka Heikkila
` (2 preceding siblings ...)
2019-12-12 11:38 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
@ 2019-12-18 11:44 ` Kahola, Mika
3 siblings, 0 replies; 19+ messages in thread
From: Kahola, Mika @ 2019-12-18 11:44 UTC (permalink / raw)
To: juhapekka.heikkila@gmail.com, igt-dev@lists.freedesktop.org
On Wed, 2019-12-11 at 22:09 +0200, Juha-Pekka Heikkila wrote:
> Having crc running continuously cause this test sometime
> fill crc buffer, fix this problem as well as do some generic
> cleanups.
>
> v2: Take out gem_sync()
>
> v3: Use rendercopy if available, otherwise Cairo surface for
> restoring
> test image
>
> CC: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
> Chris, about the comments on the previous patches for this test. On
> this
> patch there's two paths, if you want to try see those random crc
> failures
> I was getting disable on test fixture rendercopy part so this test
> will use
> Cairo to restore test image. I'm testing this with ICL where
> rendercopy path
> never fail but Cairo path fail roughly 1/10 run on random round for
> example
> on pipe-A-cursor-128x128-onscreen test (and basically any similar
> test).
>
> I also tried two fb version with flipping but using Cairo those crc
> errors were happening.
>
> Difference with those paths is rendercopy will have test image stored
> on
> FB created during setup, Cairo path has Cairo surface. At
> restore_image()
> then is used either to restore test image.
>
> When using Cairo path if I wait for two vblanks instead of one after
> restoring test image those random crc failures seem to go away.
>
> Anyway, I'm thinking both Cairo and rendercopy path should result in
> same
> outcome and most of the time they do. Then I have no idea where on
> Cairo
> path those failures are coming from.
>
> /Juha-Pekka
>
> tests/kms_cursor_crc.c | 204 +++++++++++++++++++++++++++++++++----
> ------------
> 1 file changed, 138 insertions(+), 66 deletions(-)
>
> diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
> index 6475dea..76a2ef6 100644
> --- a/tests/kms_cursor_crc.c
> +++ b/tests/kms_cursor_crc.c
> @@ -48,11 +48,10 @@ IGT_TEST_DESCRIPTION(
> typedef struct {
> int drm_fd;
> igt_display_t display;
> - struct igt_fb primary_fb;
> + struct igt_fb primary_fb[2];
> struct igt_fb fb;
> igt_output_t *output;
> enum pipe pipe;
> - igt_crc_t ref_crc;
> int left, right, top, bottom;
> int screenw, screenh;
> int refresh;
> @@ -60,11 +59,20 @@ typedef struct {
> int cursor_max_w, cursor_max_h;
> igt_pipe_crc_t *pipe_crc;
> unsigned flags;
> + igt_plane_t *primary;
> + igt_plane_t *cursor;
> + cairo_surface_t *surface;
> + uint32_t devid;
> + drm_intel_bufmgr *bufmgr;
> + igt_render_copyfunc_t rendercopy;
> } data_t;
>
> #define TEST_DPMS (1<<0)
> #define TEST_SUSPEND (1<<1)
>
> +#define FRONTBUFFER 0
> +#define RESTOREBUFFER 1
> +
> static void draw_cursor(cairo_t *cr, int x, int y, int cw, int ch,
> double a)
> {
> int wl, wr, ht, hb;
> @@ -89,23 +97,15 @@ static void draw_cursor(cairo_t *cr, int x, int
> y, int cw, int ch, double a)
>
> static void cursor_enable(data_t *data)
> {
> - igt_output_t *output = data->output;
> - igt_plane_t *cursor =
> - igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_CURSOR);
> -
> - igt_plane_set_fb(cursor, &data->fb);
> - igt_plane_set_size(cursor, data->curw, data->curh);
> - igt_fb_set_size(&data->fb, cursor, data->curw, data->curh);
> + igt_plane_set_fb(data->cursor, &data->fb);
> + igt_plane_set_size(data->cursor, data->curw, data->curh);
> + igt_fb_set_size(&data->fb, data->cursor, data->curw, data-
> >curh);
> }
>
> static void cursor_disable(data_t *data)
> {
> - igt_output_t *output = data->output;
> - igt_plane_t *cursor =
> - igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_CURSOR);
> -
> - igt_plane_set_fb(cursor, NULL);
> - igt_plane_set_position(cursor, 0, 0);
> + igt_plane_set_fb(data->cursor, NULL);
> + igt_plane_set_position(data->cursor, 0, 0);
> }
>
> static bool chv_cursor_broken(data_t *data, int x)
> @@ -144,36 +144,81 @@ static bool cursor_visible(data_t *data, int x,
> int y)
> return true;
> }
>
> +static void scratch_buf_init(struct igt_buf *buf, drm_intel_bo *bo,
> + struct igt_fb* fb)
> +{
> + buf->bo = bo;
> + buf->stride = fb->strides[0];
> + buf->tiling = fb->modifier;
> + buf->size = fb->size;
> + buf->bpp = fb->plane_bpp[0];
> +}
> +
> +static void restore_image(data_t *data)
> +{
> + cairo_t *cr;
> + drm_intel_bo *src, *dst;
> + struct intel_batchbuffer *batch;
> + struct igt_buf src_buf = {0}, dst_buf = {0};
> +
> + if (data->rendercopy != NULL) {
> + /* use rendercopy if available */
> + dst = gem_handle_to_libdrm_bo(data->bufmgr, data-
> >drm_fd, "", data->primary_fb[FRONTBUFFER].gem_handle);
> + igt_assert(dst);
> +
> + src = gem_handle_to_libdrm_bo(data->bufmgr, data-
> >drm_fd, "", data->primary_fb[RESTOREBUFFER].gem_handle);
> + igt_assert(src);
> +
> + scratch_buf_init(&src_buf, src, &data-
> >primary_fb[RESTOREBUFFER]);
> + scratch_buf_init(&dst_buf, dst, &data-
> >primary_fb[FRONTBUFFER]);
> +
> + batch = intel_batchbuffer_alloc(data->bufmgr, data-
> >devid);
> + igt_assert(batch);
> +
> + data->rendercopy(batch, NULL,
> + &src_buf, 0, 0, data-
> >primary_fb[RESTOREBUFFER].width, data-
> >primary_fb[RESTOREBUFFER].height,
> + &dst_buf, 0, 0);
> +
> + intel_batchbuffer_free(batch);
> + } else {
> + /* if rendercopy not implemented in igt use cairo */
> + cr = igt_get_cairo_ctx(data->drm_fd, &data-
> >primary_fb[FRONTBUFFER]);
> + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
> + cairo_set_source_surface(cr, data->surface, 0, 0);
> + cairo_rectangle(cr, 0, 0, data->screenw, data-
> >screenh);
> + cairo_fill(cr);
> + igt_put_cairo_ctx(data->drm_fd, &data-
> >primary_fb[FRONTBUFFER], cr);
> + }
> + igt_dirty_fb(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
> +}
> +
> static void do_single_test(data_t *data, int x, int y)
> {
> igt_display_t *display = &data->display;
> igt_pipe_crc_t *pipe_crc = data->pipe_crc;
> igt_crc_t crc, ref_crc;
> - igt_plane_t *cursor =
> - igt_output_get_plane_type(data->output,
> DRM_PLANE_TYPE_CURSOR);
> cairo_t *cr;
> int ret = 0;
>
> igt_print_activity();
>
> /* Hardware test */
> - cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> - igt_paint_test_pattern(cr, data->screenw, data->screenh);
> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> + restore_image(data);
>
> + igt_plane_set_position(data->cursor, x, y);
> cursor_enable(data);
> - igt_plane_set_position(cursor, x, y);
>
> if (chv_cursor_broken(data, x) && cursor_visible(data, x, y)) {
> ret = igt_display_try_commit2(display, COMMIT_LEGACY);
> igt_assert_eq(ret, -EINVAL);
> - igt_plane_set_position(cursor, 0, y);
> + igt_plane_set_position(data->cursor, 0, y);
>
> return;
> }
>
> igt_display_commit(display);
>
> + /* Extra vblank wait is because nonblocking cursor ioctl */
> igt_wait_for_vblank(data->drm_fd, data->pipe);
> igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &crc);
>
> @@ -205,45 +250,35 @@ static void do_single_test(data_t *data, int x,
> int y)
> }
>
> cursor_disable(data);
> - igt_display_commit(display);
>
> /* Now render the same in software and collect crc */
> - cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> + cr = igt_get_cairo_ctx(data->drm_fd, &data-
> >primary_fb[FRONTBUFFER]);
> draw_cursor(cr, x, y, data->curw, data->curh, 1.0);
> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> + igt_put_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER],
> cr);
> igt_display_commit(display);
> -
> + igt_dirty_fb(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
> + /* Extra vblank wait is because nonblocking cursor ioctl */
> igt_wait_for_vblank(data->drm_fd, data->pipe);
> - igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
>
> + igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
> igt_assert_crc_equal(&crc, &ref_crc);
> -
> - /* Clear screen afterwards */
> - cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> - igt_paint_color(cr, 0, 0, data->screenw, data->screenh, 0.0,
> 0.0, 0.0);
> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> }
>
> static void do_fail_test(data_t *data, int x, int y, int expect)
> {
> igt_display_t *display = &data->display;
> - igt_plane_t *cursor =
> - igt_output_get_plane_type(data->output,
> DRM_PLANE_TYPE_CURSOR);
> - cairo_t *cr;
> int ret;
>
> igt_print_activity();
>
> /* Hardware test */
> - cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> - igt_paint_test_pattern(cr, data->screenw, data->screenh);
> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> + restore_image(data);
>
> cursor_enable(data);
> - igt_plane_set_position(cursor, x, y);
> + igt_plane_set_position(data->cursor, x, y);
> ret = igt_display_try_commit2(display, COMMIT_LEGACY);
>
> - igt_plane_set_position(cursor, 0, 0);
> + igt_plane_set_position(data->cursor, 0, 0);
> cursor_disable(data);
> igt_display_commit(display);
>
> @@ -355,7 +390,13 @@ static void cleanup_crtc(data_t *data)
> igt_pipe_crc_free(data->pipe_crc);
> data->pipe_crc = NULL;
>
> - igt_remove_fb(data->drm_fd, &data->primary_fb);
> + cairo_surface_destroy(data->surface);
> +
> + igt_plane_set_fb(data->primary, NULL);
> + igt_display_commit(display);
> +
> + igt_remove_fb(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
> + igt_remove_fb(data->drm_fd, &data->primary_fb[RESTOREBUFFER]);
>
> igt_display_reset(display);
> }
> @@ -365,21 +406,29 @@ static void prepare_crtc(data_t *data,
> igt_output_t *output,
> {
> drmModeModeInfo *mode;
> igt_display_t *display = &data->display;
> - igt_plane_t *primary;
> + cairo_t *cr;
>
> /* select the pipe we want to use */
> igt_output_set_pipe(output, data->pipe);
>
> - /* create and set the primary plane fb */
> + /* create and set the primary plane fbs */
> mode = igt_output_get_mode(output);
> igt_create_color_fb(data->drm_fd, mode->hdisplay, mode-
> >vdisplay,
> DRM_FORMAT_XRGB8888,
> LOCAL_DRM_FORMAT_MOD_NONE,
> 0.0, 0.0, 0.0,
> - &data->primary_fb);
> + &data->primary_fb[FRONTBUFFER]);
> +
> + igt_create_color_fb(data->drm_fd, mode->hdisplay, mode-
> >vdisplay,
> + DRM_FORMAT_XRGB8888,
> + LOCAL_DRM_FORMAT_MOD_NONE,
> + 0.0, 0.0, 0.0,
> + &data->primary_fb[RESTOREBUFFER]);
> +
> + data->primary = igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_PRIMARY);
> + data->cursor = igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_CURSOR);
>
> - primary = igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_PRIMARY);
> - igt_plane_set_fb(primary, &data->primary_fb);
> + igt_plane_set_fb(data->primary, &data-
> >primary_fb[FRONTBUFFER]);
>
> igt_display_commit(display);
>
> @@ -398,9 +447,23 @@ static void prepare_crtc(data_t *data,
> igt_output_t *output,
> data->curh = cursor_h;
> data->refresh = mode->vrefresh;
>
> - /* get reference crc w/o cursor */
> + data->surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24,
> data->screenw, data->screenh);
> +
> + if (data->rendercopy == NULL) {
> + /* store test image as cairo surface */
> + cr = cairo_create(data->surface);
> + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
> + igt_paint_test_pattern(cr, data->screenw, data-
> >screenh);
> + cairo_destroy(cr);
> + } else {
> + /* store test image as fb if rendercopy is available */
> + cr = igt_get_cairo_ctx(data->drm_fd, &data-
> >primary_fb[RESTOREBUFFER]);
> + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
> + igt_paint_test_pattern(cr, data->screenw, data-
> >screenh);
> + igt_put_cairo_ctx(data->drm_fd, &data-
> >primary_fb[RESTOREBUFFER], cr);
> + }
> +
> igt_pipe_crc_start(data->pipe_crc);
> - igt_pipe_crc_get_current(data->drm_fd, data->pipe_crc, &data-
> >ref_crc);
> }
>
> static void test_cursor_alpha(data_t *data, double a)
> @@ -432,9 +495,9 @@ static void test_cursor_alpha(data_t *data,
> double a)
> igt_remove_fb(data->drm_fd, &data->fb);
>
> /*Software Test*/
> - cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> + cr = igt_get_cairo_ctx(data->drm_fd, &data-
> >primary_fb[FRONTBUFFER]);
> igt_paint_color_alpha(cr, 0, 0, curw, curh, 1.0, 1.0, 1.0, a);
> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> + igt_put_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER],
> cr);
>
> igt_display_commit(display);
> igt_wait_for_vblank(data->drm_fd, data->pipe);
> @@ -442,10 +505,10 @@ static void test_cursor_alpha(data_t *data,
> double a)
> igt_assert_crc_equal(&crc, &ref_crc);
>
> /*Clear Screen*/
> - cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> + cr = igt_get_cairo_ctx(data->drm_fd, &data-
> >primary_fb[FRONTBUFFER]);
> igt_paint_color(cr, 0, 0, data->screenw, data->screenh,
> 0.0, 0.0, 0.0);
> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> + igt_put_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER],
> cr);
> }
>
> static void test_cursor_transparent(data_t *data)
> @@ -521,8 +584,6 @@ static void test_cursor_size(data_t *data)
> uint32_t fb_id;
> int i, size;
> int cursor_max_size = data->cursor_max_w;
> - igt_plane_t *cursor =
> - igt_output_get_plane_type(data->output,
> DRM_PLANE_TYPE_CURSOR);
>
> /* Create a maximum size cursor, then change the size in flight
> to
> * smaller ones to see that the size is applied correctly
> @@ -541,8 +602,8 @@ static void test_cursor_size(data_t *data)
> cursor_enable(data);
> for (i = 0, size = cursor_max_size; size >= 64; size /= 2, i++)
> {
> /* Change size in flight: */
> - igt_plane_set_size(cursor, size, size);
> - igt_fb_set_size(&data->fb, cursor, size, size);
> + igt_plane_set_size(data->cursor, size, size);
> + igt_fb_set_size(&data->fb, data->cursor, size, size);
> igt_display_commit(display);
> igt_wait_for_vblank(data->drm_fd, data->pipe);
> igt_pipe_crc_get_current(data->drm_fd, pipe_crc,
> &crc[i]);
> @@ -553,18 +614,18 @@ static void test_cursor_size(data_t *data)
> /* Software test loop */
> for (i = 0, size = cursor_max_size; size >= 64; size /= 2, i++)
> {
> /* Now render the same in software and collect crc */
> - cr = igt_get_cairo_ctx(data->drm_fd, &data-
> >primary_fb);
> + cr = igt_get_cairo_ctx(data->drm_fd, &data-
> >primary_fb[FRONTBUFFER]);
> igt_paint_color_alpha(cr, 0, 0, size, size, 1.0, 1.0,
> 1.0, 1.0);
> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> + igt_put_cairo_ctx(data->drm_fd, &data-
> >primary_fb[FRONTBUFFER], cr);
>
> igt_display_commit(display);
> igt_wait_for_vblank(data->drm_fd, data->pipe);
> igt_pipe_crc_get_current(data->drm_fd, pipe_crc,
> &ref_crc);
> /* Clear screen afterwards */
> - cr = igt_get_cairo_ctx(data->drm_fd, &data-
> >primary_fb);
> + cr = igt_get_cairo_ctx(data->drm_fd, &data-
> >primary_fb[FRONTBUFFER]);
> igt_paint_color(cr, 0, 0, data->screenw, data->screenh,
> 0.0, 0.0, 0.0);
> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> + igt_put_cairo_ctx(data->drm_fd, &data-
> >primary_fb[FRONTBUFFER], cr);
> igt_assert_crc_equal(&crc[i], &ref_crc);
> }
> }
> @@ -575,26 +636,24 @@ static void test_rapid_movement(data_t *data)
> int x = 0, y = 0;
> long usec;
> igt_display_t *display = &data->display;
> - igt_plane_t *cursor =
> - igt_output_get_plane_type(data->output,
> DRM_PLANE_TYPE_CURSOR);
>
> cursor_enable(data);
>
> gettimeofday(&start, NULL);
> for ( ; x < 100; x++) {
> - igt_plane_set_position(cursor, x, y);
> + igt_plane_set_position(data->cursor, x, y);
> igt_display_commit(display);
> }
> for ( ; y < 100; y++) {
> - igt_plane_set_position(cursor, x, y);
> + igt_plane_set_position(data->cursor, x, y);
> igt_display_commit(display);
> }
> for ( ; x > 0; x--) {
> - igt_plane_set_position(cursor, x, y);
> + igt_plane_set_position(data->cursor, x, y);
> igt_display_commit(display);
> }
> for ( ; y > 0; y--) {
> - igt_plane_set_position(cursor, x, y);
> + igt_plane_set_position(data->cursor, x, y);
> igt_display_commit(display);
> }
> gettimeofday(&end, NULL);
> @@ -736,6 +795,16 @@ igt_main
> igt_require_pipe_crc(data.drm_fd);
>
> igt_display_require(&data.display, data.drm_fd);
> +
> + if (is_i915_device(data.drm_fd)) {
> + data.bufmgr =
> drm_intel_bufmgr_gem_init(data.drm_fd, 4096);
> + igt_assert(data.bufmgr);
> + drm_intel_bufmgr_gem_enable_reuse(data.bufmgr);
> +
> + data.devid = intel_get_drm_devid(data.drm_fd);
> + data.rendercopy =
> igt_get_render_copyfunc(data.devid);
> + igt_assert(data.rendercopy != NULL);
It seems that this assert is unnecessary. In the patch we use
rendercopy, if available, otherwise Cairo is in use.
-Mika-
> + }
> }
>
> data.cursor_max_w = cursor_width;
> @@ -746,6 +815,9 @@ igt_main
> run_tests_on_pipe(&data, pipe);
>
> igt_fixture {
> + if (data.bufmgr != NULL)
> + drm_intel_bufmgr_destroy(data.bufmgr);
> +
> igt_display_fini(&data.display);
> }
> }
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 19+ messages in thread
* [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error
@ 2019-12-18 14:53 Juha-Pekka Heikkila
2019-12-30 10:02 ` Lisovskiy, Stanislav
0 siblings, 1 reply; 19+ messages in thread
From: Juha-Pekka Heikkila @ 2019-12-18 14:53 UTC (permalink / raw)
To: igt-dev
Having crc running continuously cause this test sometime
fill crc buffer, fix this problem as well as do some generic
cleanups.
v2: Take out gem_sync()
v3: Use rendercopy if available, otherwise Cairo surface for restoring
test image
v4: take out useless assert and restructure a bit
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
tests/kms_cursor_crc.c | 220 ++++++++++++++++++++++++++++++++++---------------
1 file changed, 154 insertions(+), 66 deletions(-)
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 6475dea..630b9be 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -48,11 +48,10 @@ IGT_TEST_DESCRIPTION(
typedef struct {
int drm_fd;
igt_display_t display;
- struct igt_fb primary_fb;
+ struct igt_fb primary_fb[2];
struct igt_fb fb;
igt_output_t *output;
enum pipe pipe;
- igt_crc_t ref_crc;
int left, right, top, bottom;
int screenw, screenh;
int refresh;
@@ -60,11 +59,24 @@ typedef struct {
int cursor_max_w, cursor_max_h;
igt_pipe_crc_t *pipe_crc;
unsigned flags;
+ igt_plane_t *primary;
+ igt_plane_t *cursor;
+ cairo_surface_t *surface;
+ uint32_t devid;
+ drm_intel_bufmgr *bufmgr;
+ igt_render_copyfunc_t rendercopy;
+ drm_intel_bo * drmibo[2];
+ struct intel_batchbuffer *batch;
+ struct igt_buf igtbo[2];
+
} data_t;
#define TEST_DPMS (1<<0)
#define TEST_SUSPEND (1<<1)
+#define FRONTBUFFER 0
+#define RESTOREBUFFER 1
+
static void draw_cursor(cairo_t *cr, int x, int y, int cw, int ch, double a)
{
int wl, wr, ht, hb;
@@ -89,23 +101,15 @@ static void draw_cursor(cairo_t *cr, int x, int y, int cw, int ch, double a)
static void cursor_enable(data_t *data)
{
- igt_output_t *output = data->output;
- igt_plane_t *cursor =
- igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
-
- igt_plane_set_fb(cursor, &data->fb);
- igt_plane_set_size(cursor, data->curw, data->curh);
- igt_fb_set_size(&data->fb, cursor, data->curw, data->curh);
+ igt_plane_set_fb(data->cursor, &data->fb);
+ igt_plane_set_size(data->cursor, data->curw, data->curh);
+ igt_fb_set_size(&data->fb, data->cursor, data->curw, data->curh);
}
static void cursor_disable(data_t *data)
{
- igt_output_t *output = data->output;
- igt_plane_t *cursor =
- igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
-
- igt_plane_set_fb(cursor, NULL);
- igt_plane_set_position(cursor, 0, 0);
+ igt_plane_set_fb(data->cursor, NULL);
+ igt_plane_set_position(data->cursor, 0, 0);
}
static bool chv_cursor_broken(data_t *data, int x)
@@ -144,36 +148,58 @@ static bool cursor_visible(data_t *data, int x, int y)
return true;
}
+static void restore_image(data_t *data)
+{
+ cairo_t *cr;
+
+ if (data->rendercopy != NULL) {
+ /* use rendercopy if available */
+ data->rendercopy(data->batch, NULL,
+ &data->igtbo[RESTOREBUFFER], 0, 0,
+ data->primary_fb[RESTOREBUFFER].width,
+ data->primary_fb[RESTOREBUFFER].height,
+ &data->igtbo[FRONTBUFFER], 0, 0);
+ } else {
+ /* if rendercopy not implemented in igt use cairo */
+ cr = igt_get_cairo_ctx(data->drm_fd,
+ &data->primary_fb[FRONTBUFFER]);
+ cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
+ cairo_set_source_surface(cr, data->surface, 0, 0);
+ cairo_rectangle(cr, 0, 0, data->screenw, data->screenh);
+ cairo_fill(cr);
+ igt_put_cairo_ctx(data->drm_fd,
+ &data->primary_fb[FRONTBUFFER], cr);
+ }
+ igt_dirty_fb(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
+}
+
static void do_single_test(data_t *data, int x, int y)
{
igt_display_t *display = &data->display;
igt_pipe_crc_t *pipe_crc = data->pipe_crc;
igt_crc_t crc, ref_crc;
- igt_plane_t *cursor =
- igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_CURSOR);
cairo_t *cr;
int ret = 0;
igt_print_activity();
/* Hardware test */
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
- igt_paint_test_pattern(cr, data->screenw, data->screenh);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
+ restore_image(data);
+ igt_plane_set_position(data->cursor, x, y);
cursor_enable(data);
- igt_plane_set_position(cursor, x, y);
if (chv_cursor_broken(data, x) && cursor_visible(data, x, y)) {
ret = igt_display_try_commit2(display, COMMIT_LEGACY);
igt_assert_eq(ret, -EINVAL);
- igt_plane_set_position(cursor, 0, y);
+ igt_plane_set_position(data->cursor, 0, y);
return;
}
igt_display_commit(display);
+ /* Extra vblank wait is because nonblocking cursor ioctl */
igt_wait_for_vblank(data->drm_fd, data->pipe);
igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &crc);
@@ -205,45 +231,35 @@ static void do_single_test(data_t *data, int x, int y)
}
cursor_disable(data);
- igt_display_commit(display);
/* Now render the same in software and collect crc */
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
+ cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
draw_cursor(cr, x, y, data->curw, data->curh, 1.0);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
+ igt_put_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER], cr);
igt_display_commit(display);
-
+ igt_dirty_fb(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
+ /* Extra vblank wait is because nonblocking cursor ioctl */
igt_wait_for_vblank(data->drm_fd, data->pipe);
- igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
+ igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
igt_assert_crc_equal(&crc, &ref_crc);
-
- /* Clear screen afterwards */
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
- igt_paint_color(cr, 0, 0, data->screenw, data->screenh, 0.0, 0.0, 0.0);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
}
static void do_fail_test(data_t *data, int x, int y, int expect)
{
igt_display_t *display = &data->display;
- igt_plane_t *cursor =
- igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_CURSOR);
- cairo_t *cr;
int ret;
igt_print_activity();
/* Hardware test */
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
- igt_paint_test_pattern(cr, data->screenw, data->screenh);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
+ restore_image(data);
cursor_enable(data);
- igt_plane_set_position(cursor, x, y);
+ igt_plane_set_position(data->cursor, x, y);
ret = igt_display_try_commit2(display, COMMIT_LEGACY);
- igt_plane_set_position(cursor, 0, 0);
+ igt_plane_set_position(data->cursor, 0, 0);
cursor_disable(data);
igt_display_commit(display);
@@ -355,31 +371,54 @@ static void cleanup_crtc(data_t *data)
igt_pipe_crc_free(data->pipe_crc);
data->pipe_crc = NULL;
- igt_remove_fb(data->drm_fd, &data->primary_fb);
+ cairo_surface_destroy(data->surface);
+
+ igt_plane_set_fb(data->primary, NULL);
+ igt_display_commit(display);
+
+ igt_remove_fb(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
+ igt_remove_fb(data->drm_fd, &data->primary_fb[RESTOREBUFFER]);
igt_display_reset(display);
}
+static void scratch_buf_init(data_t *data, int buffer)
+{
+ data->igtbo[buffer].bo = data->drmibo[buffer];
+ data->igtbo[buffer].stride = data->primary_fb[buffer].strides[0];
+ data->igtbo[buffer].tiling = data->primary_fb[buffer].modifier;
+ data->igtbo[buffer].size = data->primary_fb[buffer].size;
+ data->igtbo[buffer].bpp = data->primary_fb[buffer].plane_bpp[0];
+}
+
static void prepare_crtc(data_t *data, igt_output_t *output,
int cursor_w, int cursor_h)
{
drmModeModeInfo *mode;
igt_display_t *display = &data->display;
- igt_plane_t *primary;
+ cairo_t *cr;
/* select the pipe we want to use */
igt_output_set_pipe(output, data->pipe);
- /* create and set the primary plane fb */
+ /* create and set the primary plane fbs */
mode = igt_output_get_mode(output);
igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
LOCAL_DRM_FORMAT_MOD_NONE,
0.0, 0.0, 0.0,
- &data->primary_fb);
+ &data->primary_fb[FRONTBUFFER]);
+
+ igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
+ DRM_FORMAT_XRGB8888,
+ LOCAL_DRM_FORMAT_MOD_NONE,
+ 0.0, 0.0, 0.0,
+ &data->primary_fb[RESTOREBUFFER]);
- primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
- igt_plane_set_fb(primary, &data->primary_fb);
+ data->primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+ data->cursor = igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
+
+ igt_plane_set_fb(data->primary, &data->primary_fb[FRONTBUFFER]);
igt_display_commit(display);
@@ -398,9 +437,42 @@ static void prepare_crtc(data_t *data, igt_output_t *output,
data->curh = cursor_h;
data->refresh = mode->vrefresh;
- /* get reference crc w/o cursor */
+ data->surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24, data->screenw, data->screenh);
+
+ if (data->rendercopy == NULL) {
+ /* store test image as cairo surface */
+ cr = cairo_create(data->surface);
+ cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
+ igt_paint_test_pattern(cr, data->screenw, data->screenh);
+ cairo_destroy(cr);
+ } else {
+ /* store test image as fb if rendercopy is available */
+ cr = igt_get_cairo_ctx(data->drm_fd,
+ &data->primary_fb[RESTOREBUFFER]);
+ cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
+ igt_paint_test_pattern(cr, data->screenw, data->screenh);
+ igt_put_cairo_ctx(data->drm_fd,
+ &data->primary_fb[RESTOREBUFFER], cr);
+
+ data->drmibo[FRONTBUFFER] = gem_handle_to_libdrm_bo(data->bufmgr,
+ data->drm_fd,
+ "", data->primary_fb[FRONTBUFFER].gem_handle);
+ igt_assert(data->drmibo[FRONTBUFFER]);
+
+ data->drmibo[RESTOREBUFFER] = gem_handle_to_libdrm_bo(data->bufmgr,
+ data->drm_fd,
+ "", data->primary_fb[RESTOREBUFFER].gem_handle);
+ igt_assert(data->drmibo[RESTOREBUFFER]);
+
+ scratch_buf_init(data, RESTOREBUFFER);
+ scratch_buf_init(data, FRONTBUFFER);
+
+ data->batch = intel_batchbuffer_alloc(data->bufmgr,
+ data->devid);
+ igt_assert(data->batch);
+ }
+
igt_pipe_crc_start(data->pipe_crc);
- igt_pipe_crc_get_current(data->drm_fd, data->pipe_crc, &data->ref_crc);
}
static void test_cursor_alpha(data_t *data, double a)
@@ -432,9 +504,9 @@ static void test_cursor_alpha(data_t *data, double a)
igt_remove_fb(data->drm_fd, &data->fb);
/*Software Test*/
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
+ cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
igt_paint_color_alpha(cr, 0, 0, curw, curh, 1.0, 1.0, 1.0, a);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
+ igt_put_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER], cr);
igt_display_commit(display);
igt_wait_for_vblank(data->drm_fd, data->pipe);
@@ -442,10 +514,10 @@ static void test_cursor_alpha(data_t *data, double a)
igt_assert_crc_equal(&crc, &ref_crc);
/*Clear Screen*/
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
+ cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
igt_paint_color(cr, 0, 0, data->screenw, data->screenh,
0.0, 0.0, 0.0);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
+ igt_put_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER], cr);
}
static void test_cursor_transparent(data_t *data)
@@ -521,8 +593,6 @@ static void test_cursor_size(data_t *data)
uint32_t fb_id;
int i, size;
int cursor_max_size = data->cursor_max_w;
- igt_plane_t *cursor =
- igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_CURSOR);
/* Create a maximum size cursor, then change the size in flight to
* smaller ones to see that the size is applied correctly
@@ -541,8 +611,8 @@ static void test_cursor_size(data_t *data)
cursor_enable(data);
for (i = 0, size = cursor_max_size; size >= 64; size /= 2, i++) {
/* Change size in flight: */
- igt_plane_set_size(cursor, size, size);
- igt_fb_set_size(&data->fb, cursor, size, size);
+ igt_plane_set_size(data->cursor, size, size);
+ igt_fb_set_size(&data->fb, data->cursor, size, size);
igt_display_commit(display);
igt_wait_for_vblank(data->drm_fd, data->pipe);
igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &crc[i]);
@@ -553,18 +623,18 @@ static void test_cursor_size(data_t *data)
/* Software test loop */
for (i = 0, size = cursor_max_size; size >= 64; size /= 2, i++) {
/* Now render the same in software and collect crc */
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
+ cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
igt_paint_color_alpha(cr, 0, 0, size, size, 1.0, 1.0, 1.0, 1.0);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
+ igt_put_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER], cr);
igt_display_commit(display);
igt_wait_for_vblank(data->drm_fd, data->pipe);
igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
/* Clear screen afterwards */
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
+ cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
igt_paint_color(cr, 0, 0, data->screenw, data->screenh,
0.0, 0.0, 0.0);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
+ igt_put_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER], cr);
igt_assert_crc_equal(&crc[i], &ref_crc);
}
}
@@ -575,26 +645,24 @@ static void test_rapid_movement(data_t *data)
int x = 0, y = 0;
long usec;
igt_display_t *display = &data->display;
- igt_plane_t *cursor =
- igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_CURSOR);
cursor_enable(data);
gettimeofday(&start, NULL);
for ( ; x < 100; x++) {
- igt_plane_set_position(cursor, x, y);
+ igt_plane_set_position(data->cursor, x, y);
igt_display_commit(display);
}
for ( ; y < 100; y++) {
- igt_plane_set_position(cursor, x, y);
+ igt_plane_set_position(data->cursor, x, y);
igt_display_commit(display);
}
for ( ; x > 0; x--) {
- igt_plane_set_position(cursor, x, y);
+ igt_plane_set_position(data->cursor, x, y);
igt_display_commit(display);
}
for ( ; y > 0; y--) {
- igt_plane_set_position(cursor, x, y);
+ igt_plane_set_position(data->cursor, x, y);
igt_display_commit(display);
}
gettimeofday(&end, NULL);
@@ -736,6 +804,16 @@ igt_main
igt_require_pipe_crc(data.drm_fd);
igt_display_require(&data.display, data.drm_fd);
+
+ if (is_i915_device(data.drm_fd)) {
+ data.bufmgr = drm_intel_bufmgr_gem_init(data.drm_fd, 4096);
+ igt_assert(data.bufmgr);
+ drm_intel_bufmgr_gem_enable_reuse(data.bufmgr);
+
+ data.devid = intel_get_drm_devid(data.drm_fd);
+ data.rendercopy = igt_get_render_copyfunc(data.devid);
+ }
+ igt_debug("Using %s for restoring test image\n", (data.rendercopy == NULL)?"Cairo":"rendercopy");
}
data.cursor_max_w = cursor_width;
@@ -746,6 +824,16 @@ igt_main
run_tests_on_pipe(&data, pipe);
igt_fixture {
+ if (data.pipe_crc != NULL) {
+ igt_pipe_crc_stop(data.pipe_crc);
+ igt_pipe_crc_free(data.pipe_crc);
+ }
+
+ if (data.bufmgr != NULL) {
+ intel_batchbuffer_free(data.batch);
+ drm_intel_bufmgr_destroy(data.bufmgr);
+ }
+
igt_display_fini(&data.display);
}
}
--
2.7.4
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error
2019-12-18 14:53 Juha-Pekka Heikkila
@ 2019-12-30 10:02 ` Lisovskiy, Stanislav
0 siblings, 0 replies; 19+ messages in thread
From: Lisovskiy, Stanislav @ 2019-12-30 10:02 UTC (permalink / raw)
To: juhapekka.heikkila@gmail.com, igt-dev@lists.freedesktop.org
On Wed, 2019-12-18 at 16:53 +0200, Juha-Pekka Heikkila wrote:
> Having crc running continuously cause this test sometime
> fill crc buffer, fix this problem as well as do some generic
> cleanups.
>
> v2: Take out gem_sync()
>
> v3: Use rendercopy if available, otherwise Cairo surface for
> restoring
> test image
>
> v4: take out useless assert and restructure a bit
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> ---
> tests/kms_cursor_crc.c | 220 ++++++++++++++++++++++++++++++++++-----
> ----------
> 1 file changed, 154 insertions(+), 66 deletions(-)
>
> diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
> index 6475dea..630b9be 100644
> --- a/tests/kms_cursor_crc.c
> +++ b/tests/kms_cursor_crc.c
> @@ -48,11 +48,10 @@ IGT_TEST_DESCRIPTION(
> typedef struct {
> int drm_fd;
> igt_display_t display;
> - struct igt_fb primary_fb;
> + struct igt_fb primary_fb[2];
> struct igt_fb fb;
> igt_output_t *output;
> enum pipe pipe;
> - igt_crc_t ref_crc;
> int left, right, top, bottom;
> int screenw, screenh;
> int refresh;
> @@ -60,11 +59,24 @@ typedef struct {
> int cursor_max_w, cursor_max_h;
> igt_pipe_crc_t *pipe_crc;
> unsigned flags;
> + igt_plane_t *primary;
> + igt_plane_t *cursor;
> + cairo_surface_t *surface;
> + uint32_t devid;
> + drm_intel_bufmgr *bufmgr;
> + igt_render_copyfunc_t rendercopy;
> + drm_intel_bo * drmibo[2];
> + struct intel_batchbuffer *batch;
> + struct igt_buf igtbo[2];
> +
> } data_t;
>
> #define TEST_DPMS (1<<0)
> #define TEST_SUSPEND (1<<1)
>
> +#define FRONTBUFFER 0
> +#define RESTOREBUFFER 1
> +
> static void draw_cursor(cairo_t *cr, int x, int y, int cw, int ch,
> double a)
> {
> int wl, wr, ht, hb;
> @@ -89,23 +101,15 @@ static void draw_cursor(cairo_t *cr, int x, int
> y, int cw, int ch, double a)
>
> static void cursor_enable(data_t *data)
> {
> - igt_output_t *output = data->output;
> - igt_plane_t *cursor =
> - igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_CURSOR);
> -
> - igt_plane_set_fb(cursor, &data->fb);
> - igt_plane_set_size(cursor, data->curw, data->curh);
> - igt_fb_set_size(&data->fb, cursor, data->curw, data->curh);
> + igt_plane_set_fb(data->cursor, &data->fb);
> + igt_plane_set_size(data->cursor, data->curw, data->curh);
> + igt_fb_set_size(&data->fb, data->cursor, data->curw, data-
> >curh);
> }
>
> static void cursor_disable(data_t *data)
> {
> - igt_output_t *output = data->output;
> - igt_plane_t *cursor =
> - igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_CURSOR);
> -
> - igt_plane_set_fb(cursor, NULL);
> - igt_plane_set_position(cursor, 0, 0);
> + igt_plane_set_fb(data->cursor, NULL);
> + igt_plane_set_position(data->cursor, 0, 0);
> }
>
> static bool chv_cursor_broken(data_t *data, int x)
> @@ -144,36 +148,58 @@ static bool cursor_visible(data_t *data, int x,
> int y)
> return true;
> }
>
> +static void restore_image(data_t *data)
> +{
> + cairo_t *cr;
> +
> + if (data->rendercopy != NULL) {
> + /* use rendercopy if available */
> + data->rendercopy(data->batch, NULL,
> + &data->igtbo[RESTOREBUFFER], 0, 0,
> + data->primary_fb[RESTOREBUFFER].width,
> + data-
> >primary_fb[RESTOREBUFFER].height,
> + &data->igtbo[FRONTBUFFER], 0, 0);
> + } else {
> + /* if rendercopy not implemented in igt use cairo */
> + cr = igt_get_cairo_ctx(data->drm_fd,
> + &data->primary_fb[FRONTBUFFER]);
> + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
> + cairo_set_source_surface(cr, data->surface, 0, 0);
> + cairo_rectangle(cr, 0, 0, data->screenw, data-
> >screenh);
> + cairo_fill(cr);
> + igt_put_cairo_ctx(data->drm_fd,
> + &data->primary_fb[FRONTBUFFER], cr);
> + }
> + igt_dirty_fb(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
> +}
> +
> static void do_single_test(data_t *data, int x, int y)
> {
> igt_display_t *display = &data->display;
> igt_pipe_crc_t *pipe_crc = data->pipe_crc;
> igt_crc_t crc, ref_crc;
> - igt_plane_t *cursor =
> - igt_output_get_plane_type(data->output,
> DRM_PLANE_TYPE_CURSOR);
> cairo_t *cr;
> int ret = 0;
>
> igt_print_activity();
>
> /* Hardware test */
> - cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> - igt_paint_test_pattern(cr, data->screenw, data->screenh);
> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> + restore_image(data);
>
> + igt_plane_set_position(data->cursor, x, y);
> cursor_enable(data);
> - igt_plane_set_position(cursor, x, y);
>
> if (chv_cursor_broken(data, x) && cursor_visible(data, x, y)) {
> ret = igt_display_try_commit2(display, COMMIT_LEGACY);
> igt_assert_eq(ret, -EINVAL);
> - igt_plane_set_position(cursor, 0, y);
> + igt_plane_set_position(data->cursor, 0, y);
>
> return;
> }
>
> igt_display_commit(display);
>
> + /* Extra vblank wait is because nonblocking cursor ioctl */
> igt_wait_for_vblank(data->drm_fd, data->pipe);
> igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &crc);
>
> @@ -205,45 +231,35 @@ static void do_single_test(data_t *data, int x,
> int y)
> }
>
> cursor_disable(data);
> - igt_display_commit(display);
>
> /* Now render the same in software and collect crc */
> - cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> + cr = igt_get_cairo_ctx(data->drm_fd, &data-
> >primary_fb[FRONTBUFFER]);
> draw_cursor(cr, x, y, data->curw, data->curh, 1.0);
> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> + igt_put_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER],
> cr);
> igt_display_commit(display);
> -
> + igt_dirty_fb(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
> + /* Extra vblank wait is because nonblocking cursor ioctl */
> igt_wait_for_vblank(data->drm_fd, data->pipe);
> - igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
>
> + igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
> igt_assert_crc_equal(&crc, &ref_crc);
> -
> - /* Clear screen afterwards */
> - cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> - igt_paint_color(cr, 0, 0, data->screenw, data->screenh, 0.0,
> 0.0, 0.0);
> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> }
>
> static void do_fail_test(data_t *data, int x, int y, int expect)
> {
> igt_display_t *display = &data->display;
> - igt_plane_t *cursor =
> - igt_output_get_plane_type(data->output,
> DRM_PLANE_TYPE_CURSOR);
> - cairo_t *cr;
> int ret;
>
> igt_print_activity();
>
> /* Hardware test */
> - cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> - igt_paint_test_pattern(cr, data->screenw, data->screenh);
> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> + restore_image(data);
>
> cursor_enable(data);
> - igt_plane_set_position(cursor, x, y);
> + igt_plane_set_position(data->cursor, x, y);
> ret = igt_display_try_commit2(display, COMMIT_LEGACY);
>
> - igt_plane_set_position(cursor, 0, 0);
> + igt_plane_set_position(data->cursor, 0, 0);
> cursor_disable(data);
> igt_display_commit(display);
>
> @@ -355,31 +371,54 @@ static void cleanup_crtc(data_t *data)
> igt_pipe_crc_free(data->pipe_crc);
> data->pipe_crc = NULL;
>
> - igt_remove_fb(data->drm_fd, &data->primary_fb);
> + cairo_surface_destroy(data->surface);
> +
> + igt_plane_set_fb(data->primary, NULL);
> + igt_display_commit(display);
> +
> + igt_remove_fb(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
> + igt_remove_fb(data->drm_fd, &data->primary_fb[RESTOREBUFFER]);
>
> igt_display_reset(display);
> }
>
> +static void scratch_buf_init(data_t *data, int buffer)
> +{
> + data->igtbo[buffer].bo = data->drmibo[buffer];
> + data->igtbo[buffer].stride = data-
> >primary_fb[buffer].strides[0];
> + data->igtbo[buffer].tiling = data->primary_fb[buffer].modifier;
> + data->igtbo[buffer].size = data->primary_fb[buffer].size;
> + data->igtbo[buffer].bpp = data-
> >primary_fb[buffer].plane_bpp[0];
> +}
> +
> static void prepare_crtc(data_t *data, igt_output_t *output,
> int cursor_w, int cursor_h)
> {
> drmModeModeInfo *mode;
> igt_display_t *display = &data->display;
> - igt_plane_t *primary;
> + cairo_t *cr;
>
> /* select the pipe we want to use */
> igt_output_set_pipe(output, data->pipe);
>
> - /* create and set the primary plane fb */
> + /* create and set the primary plane fbs */
> mode = igt_output_get_mode(output);
> igt_create_color_fb(data->drm_fd, mode->hdisplay, mode-
> >vdisplay,
> DRM_FORMAT_XRGB8888,
> LOCAL_DRM_FORMAT_MOD_NONE,
> 0.0, 0.0, 0.0,
> - &data->primary_fb);
> + &data->primary_fb[FRONTBUFFER]);
> +
> + igt_create_color_fb(data->drm_fd, mode->hdisplay, mode-
> >vdisplay,
> + DRM_FORMAT_XRGB8888,
> + LOCAL_DRM_FORMAT_MOD_NONE,
> + 0.0, 0.0, 0.0,
> + &data->primary_fb[RESTOREBUFFER]);
>
> - primary = igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_PRIMARY);
> - igt_plane_set_fb(primary, &data->primary_fb);
> + data->primary = igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_PRIMARY);
> + data->cursor = igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_CURSOR);
> +
> + igt_plane_set_fb(data->primary, &data-
> >primary_fb[FRONTBUFFER]);
>
> igt_display_commit(display);
>
> @@ -398,9 +437,42 @@ static void prepare_crtc(data_t *data,
> igt_output_t *output,
> data->curh = cursor_h;
> data->refresh = mode->vrefresh;
>
> - /* get reference crc w/o cursor */
> + data->surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24,
> data->screenw, data->screenh);
> +
> + if (data->rendercopy == NULL) {
> + /* store test image as cairo surface */
> + cr = cairo_create(data->surface);
> + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
> + igt_paint_test_pattern(cr, data->screenw, data-
> >screenh);
> + cairo_destroy(cr);
> + } else {
> + /* store test image as fb if rendercopy is available */
> + cr = igt_get_cairo_ctx(data->drm_fd,
> + &data-
> >primary_fb[RESTOREBUFFER]);
> + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
> + igt_paint_test_pattern(cr, data->screenw, data-
> >screenh);
> + igt_put_cairo_ctx(data->drm_fd,
> + &data->primary_fb[RESTOREBUFFER],
> cr);
> +
> + data->drmibo[FRONTBUFFER] =
> gem_handle_to_libdrm_bo(data->bufmgr,
> + dat
> a->drm_fd,
> + "",
> data->primary_fb[FRONTBUFFER].gem_handle);
> + igt_assert(data->drmibo[FRONTBUFFER]);
> +
> + data->drmibo[RESTOREBUFFER] =
> gem_handle_to_libdrm_bo(data->bufmgr,
> + d
> ata->drm_fd,
> + "
> ", data->primary_fb[RESTOREBUFFER].gem_handle);
> + igt_assert(data->drmibo[RESTOREBUFFER]);
> +
> + scratch_buf_init(data, RESTOREBUFFER);
> + scratch_buf_init(data, FRONTBUFFER);
> +
> + data->batch = intel_batchbuffer_alloc(data->bufmgr,
> + data->devid);
> + igt_assert(data->batch);
> + }
> +
> igt_pipe_crc_start(data->pipe_crc);
> - igt_pipe_crc_get_current(data->drm_fd, data->pipe_crc, &data-
> >ref_crc);
> }
>
> static void test_cursor_alpha(data_t *data, double a)
> @@ -432,9 +504,9 @@ static void test_cursor_alpha(data_t *data,
> double a)
> igt_remove_fb(data->drm_fd, &data->fb);
>
> /*Software Test*/
> - cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> + cr = igt_get_cairo_ctx(data->drm_fd, &data-
> >primary_fb[FRONTBUFFER]);
> igt_paint_color_alpha(cr, 0, 0, curw, curh, 1.0, 1.0, 1.0, a);
> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> + igt_put_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER],
> cr);
>
> igt_display_commit(display);
> igt_wait_for_vblank(data->drm_fd, data->pipe);
> @@ -442,10 +514,10 @@ static void test_cursor_alpha(data_t *data,
> double a)
> igt_assert_crc_equal(&crc, &ref_crc);
>
> /*Clear Screen*/
> - cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> + cr = igt_get_cairo_ctx(data->drm_fd, &data-
> >primary_fb[FRONTBUFFER]);
> igt_paint_color(cr, 0, 0, data->screenw, data->screenh,
> 0.0, 0.0, 0.0);
> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> + igt_put_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER],
> cr);
> }
>
> static void test_cursor_transparent(data_t *data)
> @@ -521,8 +593,6 @@ static void test_cursor_size(data_t *data)
> uint32_t fb_id;
> int i, size;
> int cursor_max_size = data->cursor_max_w;
> - igt_plane_t *cursor =
> - igt_output_get_plane_type(data->output,
> DRM_PLANE_TYPE_CURSOR);
>
> /* Create a maximum size cursor, then change the size in flight
> to
> * smaller ones to see that the size is applied correctly
> @@ -541,8 +611,8 @@ static void test_cursor_size(data_t *data)
> cursor_enable(data);
> for (i = 0, size = cursor_max_size; size >= 64; size /= 2, i++)
> {
> /* Change size in flight: */
> - igt_plane_set_size(cursor, size, size);
> - igt_fb_set_size(&data->fb, cursor, size, size);
> + igt_plane_set_size(data->cursor, size, size);
> + igt_fb_set_size(&data->fb, data->cursor, size, size);
> igt_display_commit(display);
> igt_wait_for_vblank(data->drm_fd, data->pipe);
> igt_pipe_crc_get_current(data->drm_fd, pipe_crc,
> &crc[i]);
> @@ -553,18 +623,18 @@ static void test_cursor_size(data_t *data)
> /* Software test loop */
> for (i = 0, size = cursor_max_size; size >= 64; size /= 2, i++)
> {
> /* Now render the same in software and collect crc */
> - cr = igt_get_cairo_ctx(data->drm_fd, &data-
> >primary_fb);
> + cr = igt_get_cairo_ctx(data->drm_fd, &data-
> >primary_fb[FRONTBUFFER]);
> igt_paint_color_alpha(cr, 0, 0, size, size, 1.0, 1.0,
> 1.0, 1.0);
> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> + igt_put_cairo_ctx(data->drm_fd, &data-
> >primary_fb[FRONTBUFFER], cr);
>
> igt_display_commit(display);
> igt_wait_for_vblank(data->drm_fd, data->pipe);
> igt_pipe_crc_get_current(data->drm_fd, pipe_crc,
> &ref_crc);
> /* Clear screen afterwards */
> - cr = igt_get_cairo_ctx(data->drm_fd, &data-
> >primary_fb);
> + cr = igt_get_cairo_ctx(data->drm_fd, &data-
> >primary_fb[FRONTBUFFER]);
> igt_paint_color(cr, 0, 0, data->screenw, data->screenh,
> 0.0, 0.0, 0.0);
> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> + igt_put_cairo_ctx(data->drm_fd, &data-
> >primary_fb[FRONTBUFFER], cr);
> igt_assert_crc_equal(&crc[i], &ref_crc);
> }
> }
> @@ -575,26 +645,24 @@ static void test_rapid_movement(data_t *data)
> int x = 0, y = 0;
> long usec;
> igt_display_t *display = &data->display;
> - igt_plane_t *cursor =
> - igt_output_get_plane_type(data->output,
> DRM_PLANE_TYPE_CURSOR);
>
> cursor_enable(data);
>
> gettimeofday(&start, NULL);
> for ( ; x < 100; x++) {
> - igt_plane_set_position(cursor, x, y);
> + igt_plane_set_position(data->cursor, x, y);
> igt_display_commit(display);
> }
> for ( ; y < 100; y++) {
> - igt_plane_set_position(cursor, x, y);
> + igt_plane_set_position(data->cursor, x, y);
> igt_display_commit(display);
> }
> for ( ; x > 0; x--) {
> - igt_plane_set_position(cursor, x, y);
> + igt_plane_set_position(data->cursor, x, y);
> igt_display_commit(display);
> }
> for ( ; y > 0; y--) {
> - igt_plane_set_position(cursor, x, y);
> + igt_plane_set_position(data->cursor, x, y);
> igt_display_commit(display);
> }
> gettimeofday(&end, NULL);
> @@ -736,6 +804,16 @@ igt_main
> igt_require_pipe_crc(data.drm_fd);
>
> igt_display_require(&data.display, data.drm_fd);
> +
> + if (is_i915_device(data.drm_fd)) {
> + data.bufmgr =
> drm_intel_bufmgr_gem_init(data.drm_fd, 4096);
> + igt_assert(data.bufmgr);
> + drm_intel_bufmgr_gem_enable_reuse(data.bufmgr);
> +
> + data.devid = intel_get_drm_devid(data.drm_fd);
> + data.rendercopy =
> igt_get_render_copyfunc(data.devid);
> + }
> + igt_debug("Using %s for restoring test image\n",
> (data.rendercopy == NULL)?"Cairo":"rendercopy");
> }
>
> data.cursor_max_w = cursor_width;
> @@ -746,6 +824,16 @@ igt_main
> run_tests_on_pipe(&data, pipe);
>
> igt_fixture {
> + if (data.pipe_crc != NULL) {
> + igt_pipe_crc_stop(data.pipe_crc);
> + igt_pipe_crc_free(data.pipe_crc);
> + }
> +
> + if (data.bufmgr != NULL) {
> + intel_batchbuffer_free(data.batch);
> + drm_intel_bufmgr_destroy(data.bufmgr);
> + }
> +
> igt_display_fini(&data.display);
> }
> }
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 19+ messages in thread
* [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error
@ 2019-12-09 13:19 Juha-Pekka Heikkila
2019-12-10 11:53 ` Kahola, Mika
0 siblings, 1 reply; 19+ messages in thread
From: Juha-Pekka Heikkila @ 2019-12-09 13:19 UTC (permalink / raw)
To: igt-dev
Having crc running continuously cause this test sometime
fill crc buffer, fix this problem as well as do some generic
cleanups.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
tests/kms_cursor_crc.c | 109 +++++++++++++++++++++++++------------------------
1 file changed, 56 insertions(+), 53 deletions(-)
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 6475dea..9542141 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -52,7 +52,6 @@ typedef struct {
struct igt_fb fb;
igt_output_t *output;
enum pipe pipe;
- igt_crc_t ref_crc;
int left, right, top, bottom;
int screenw, screenh;
int refresh;
@@ -60,6 +59,9 @@ typedef struct {
int cursor_max_w, cursor_max_h;
igt_pipe_crc_t *pipe_crc;
unsigned flags;
+ igt_plane_t *primary;
+ igt_plane_t *cursor;
+ cairo_surface_t *surface;
} data_t;
#define TEST_DPMS (1<<0)
@@ -89,23 +91,15 @@ static void draw_cursor(cairo_t *cr, int x, int y, int cw, int ch, double a)
static void cursor_enable(data_t *data)
{
- igt_output_t *output = data->output;
- igt_plane_t *cursor =
- igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
-
- igt_plane_set_fb(cursor, &data->fb);
- igt_plane_set_size(cursor, data->curw, data->curh);
- igt_fb_set_size(&data->fb, cursor, data->curw, data->curh);
+ igt_plane_set_fb(data->cursor, &data->fb);
+ igt_plane_set_size(data->cursor, data->curw, data->curh);
+ igt_fb_set_size(&data->fb, data->cursor, data->curw, data->curh);
}
static void cursor_disable(data_t *data)
{
- igt_output_t *output = data->output;
- igt_plane_t *cursor =
- igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
-
- igt_plane_set_fb(cursor, NULL);
- igt_plane_set_position(cursor, 0, 0);
+ igt_plane_set_fb(data->cursor, NULL);
+ igt_plane_set_position(data->cursor, 0, 0);
}
static bool chv_cursor_broken(data_t *data, int x)
@@ -144,37 +138,47 @@ static bool cursor_visible(data_t *data, int x, int y)
return true;
}
+static void restore_image(data_t *data)
+{
+ cairo_t *cr;
+
+ cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
+ cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
+ cairo_set_source_surface(cr, data->surface, 0, 0);
+ cairo_rectangle(cr, 0, 0, data->screenw, data->screenh);
+ cairo_fill(cr);
+ igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
+ igt_dirty_fb(data->drm_fd, &data->primary_fb);
+}
+
static void do_single_test(data_t *data, int x, int y)
{
igt_display_t *display = &data->display;
igt_pipe_crc_t *pipe_crc = data->pipe_crc;
igt_crc_t crc, ref_crc;
- igt_plane_t *cursor =
- igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_CURSOR);
cairo_t *cr;
int ret = 0;
igt_print_activity();
/* Hardware test */
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
- igt_paint_test_pattern(cr, data->screenw, data->screenh);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
+ restore_image(data);
+ igt_plane_set_position(data->cursor, x, y);
cursor_enable(data);
- igt_plane_set_position(cursor, x, y);
if (chv_cursor_broken(data, x) && cursor_visible(data, x, y)) {
ret = igt_display_try_commit2(display, COMMIT_LEGACY);
igt_assert_eq(ret, -EINVAL);
- igt_plane_set_position(cursor, 0, y);
+ igt_plane_set_position(data->cursor, 0, y);
return;
}
igt_display_commit(display);
- igt_wait_for_vblank(data->drm_fd, data->pipe);
+ /* Extra vblank wait is because nonblocking cursor ioctl */
+ igt_wait_for_vblank_count(data->drm_fd, data->pipe, 2);
igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &crc);
if (data->flags & (TEST_DPMS | TEST_SUSPEND)) {
@@ -211,39 +215,29 @@ static void do_single_test(data_t *data, int x, int y)
cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
draw_cursor(cr, x, y, data->curw, data->curh, 1.0);
igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
- igt_display_commit(display);
-
+ igt_dirty_fb(data->drm_fd, &data->primary_fb);
+ /* Extra vblank wait is because nonblocking cursor ioctl */
igt_wait_for_vblank(data->drm_fd, data->pipe);
- igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
+ igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
igt_assert_crc_equal(&crc, &ref_crc);
-
- /* Clear screen afterwards */
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
- igt_paint_color(cr, 0, 0, data->screenw, data->screenh, 0.0, 0.0, 0.0);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
}
static void do_fail_test(data_t *data, int x, int y, int expect)
{
igt_display_t *display = &data->display;
- igt_plane_t *cursor =
- igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_CURSOR);
- cairo_t *cr;
int ret;
igt_print_activity();
/* Hardware test */
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
- igt_paint_test_pattern(cr, data->screenw, data->screenh);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
+ restore_image(data);
cursor_enable(data);
- igt_plane_set_position(cursor, x, y);
+ igt_plane_set_position(data->cursor, x, y);
ret = igt_display_try_commit2(display, COMMIT_LEGACY);
- igt_plane_set_position(cursor, 0, 0);
+ igt_plane_set_position(data->cursor, 0, 0);
cursor_disable(data);
igt_display_commit(display);
@@ -355,6 +349,11 @@ static void cleanup_crtc(data_t *data)
igt_pipe_crc_free(data->pipe_crc);
data->pipe_crc = NULL;
+ cairo_surface_destroy(data->surface);
+
+ igt_plane_set_fb(data->primary, NULL);
+ igt_display_commit(display);
+
igt_remove_fb(data->drm_fd, &data->primary_fb);
igt_display_reset(display);
@@ -365,7 +364,7 @@ static void prepare_crtc(data_t *data, igt_output_t *output,
{
drmModeModeInfo *mode;
igt_display_t *display = &data->display;
- igt_plane_t *primary;
+ cairo_t *cr;
/* select the pipe we want to use */
igt_output_set_pipe(output, data->pipe);
@@ -378,8 +377,10 @@ static void prepare_crtc(data_t *data, igt_output_t *output,
0.0, 0.0, 0.0,
&data->primary_fb);
- primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
- igt_plane_set_fb(primary, &data->primary_fb);
+ data->primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+ data->cursor = igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
+
+ igt_plane_set_fb(data->primary, &data->primary_fb);
igt_display_commit(display);
@@ -398,9 +399,15 @@ static void prepare_crtc(data_t *data, igt_output_t *output,
data->curh = cursor_h;
data->refresh = mode->vrefresh;
- /* get reference crc w/o cursor */
+ /* store test image as cairo surface */
+ data->surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24, data->screenw, data->screenh);
+
+ cr = cairo_create(data->surface);
+ cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
+ igt_paint_test_pattern(cr, data->screenw, data->screenh);
+ cairo_destroy(cr);
+
igt_pipe_crc_start(data->pipe_crc);
- igt_pipe_crc_get_current(data->drm_fd, data->pipe_crc, &data->ref_crc);
}
static void test_cursor_alpha(data_t *data, double a)
@@ -521,8 +528,6 @@ static void test_cursor_size(data_t *data)
uint32_t fb_id;
int i, size;
int cursor_max_size = data->cursor_max_w;
- igt_plane_t *cursor =
- igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_CURSOR);
/* Create a maximum size cursor, then change the size in flight to
* smaller ones to see that the size is applied correctly
@@ -541,8 +546,8 @@ static void test_cursor_size(data_t *data)
cursor_enable(data);
for (i = 0, size = cursor_max_size; size >= 64; size /= 2, i++) {
/* Change size in flight: */
- igt_plane_set_size(cursor, size, size);
- igt_fb_set_size(&data->fb, cursor, size, size);
+ igt_plane_set_size(data->cursor, size, size);
+ igt_fb_set_size(&data->fb, data->cursor, size, size);
igt_display_commit(display);
igt_wait_for_vblank(data->drm_fd, data->pipe);
igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &crc[i]);
@@ -575,26 +580,24 @@ static void test_rapid_movement(data_t *data)
int x = 0, y = 0;
long usec;
igt_display_t *display = &data->display;
- igt_plane_t *cursor =
- igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_CURSOR);
cursor_enable(data);
gettimeofday(&start, NULL);
for ( ; x < 100; x++) {
- igt_plane_set_position(cursor, x, y);
+ igt_plane_set_position(data->cursor, x, y);
igt_display_commit(display);
}
for ( ; y < 100; y++) {
- igt_plane_set_position(cursor, x, y);
+ igt_plane_set_position(data->cursor, x, y);
igt_display_commit(display);
}
for ( ; x > 0; x--) {
- igt_plane_set_position(cursor, x, y);
+ igt_plane_set_position(data->cursor, x, y);
igt_display_commit(display);
}
for ( ; y > 0; y--) {
- igt_plane_set_position(cursor, x, y);
+ igt_plane_set_position(data->cursor, x, y);
igt_display_commit(display);
}
gettimeofday(&end, NULL);
--
2.7.4
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error
2019-12-09 13:19 Juha-Pekka Heikkila
@ 2019-12-10 11:53 ` Kahola, Mika
2019-12-10 12:54 ` Juha-Pekka Heikkila
0 siblings, 1 reply; 19+ messages in thread
From: Kahola, Mika @ 2019-12-10 11:53 UTC (permalink / raw)
To: juhapekka.heikkila@gmail.com, igt-dev@lists.freedesktop.org
On Mon, 2019-12-09 at 15:19 +0200, Juha-Pekka Heikkila wrote:
> Having crc running continuously cause this test sometime
> fill crc buffer, fix this problem as well as do some generic
> cleanups.
The difference between this and the previous one is removed gem_sync()
function from restore_image()?
Maybe we could add note on changes in commit message.
Cheers,
Mika
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
> tests/kms_cursor_crc.c | 109 +++++++++++++++++++++++++------------
> ------------
> 1 file changed, 56 insertions(+), 53 deletions(-)
>
> diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
> index 6475dea..9542141 100644
> --- a/tests/kms_cursor_crc.c
> +++ b/tests/kms_cursor_crc.c
> @@ -52,7 +52,6 @@ typedef struct {
> struct igt_fb fb;
> igt_output_t *output;
> enum pipe pipe;
> - igt_crc_t ref_crc;
> int left, right, top, bottom;
> int screenw, screenh;
> int refresh;
> @@ -60,6 +59,9 @@ typedef struct {
> int cursor_max_w, cursor_max_h;
> igt_pipe_crc_t *pipe_crc;
> unsigned flags;
> + igt_plane_t *primary;
> + igt_plane_t *cursor;
> + cairo_surface_t *surface;
> } data_t;
>
> #define TEST_DPMS (1<<0)
> @@ -89,23 +91,15 @@ static void draw_cursor(cairo_t *cr, int x, int
> y, int cw, int ch, double a)
>
> static void cursor_enable(data_t *data)
> {
> - igt_output_t *output = data->output;
> - igt_plane_t *cursor =
> - igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_CURSOR);
> -
> - igt_plane_set_fb(cursor, &data->fb);
> - igt_plane_set_size(cursor, data->curw, data->curh);
> - igt_fb_set_size(&data->fb, cursor, data->curw, data->curh);
> + igt_plane_set_fb(data->cursor, &data->fb);
> + igt_plane_set_size(data->cursor, data->curw, data->curh);
> + igt_fb_set_size(&data->fb, data->cursor, data->curw, data-
> >curh);
> }
>
> static void cursor_disable(data_t *data)
> {
> - igt_output_t *output = data->output;
> - igt_plane_t *cursor =
> - igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_CURSOR);
> -
> - igt_plane_set_fb(cursor, NULL);
> - igt_plane_set_position(cursor, 0, 0);
> + igt_plane_set_fb(data->cursor, NULL);
> + igt_plane_set_position(data->cursor, 0, 0);
> }
>
> static bool chv_cursor_broken(data_t *data, int x)
> @@ -144,37 +138,47 @@ static bool cursor_visible(data_t *data, int x,
> int y)
> return true;
> }
>
> +static void restore_image(data_t *data)
> +{
> + cairo_t *cr;
> +
> + cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
> + cairo_set_source_surface(cr, data->surface, 0, 0);
> + cairo_rectangle(cr, 0, 0, data->screenw, data->screenh);
> + cairo_fill(cr);
> + igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> + igt_dirty_fb(data->drm_fd, &data->primary_fb);
> +}
> +
> static void do_single_test(data_t *data, int x, int y)
> {
> igt_display_t *display = &data->display;
> igt_pipe_crc_t *pipe_crc = data->pipe_crc;
> igt_crc_t crc, ref_crc;
> - igt_plane_t *cursor =
> - igt_output_get_plane_type(data->output,
> DRM_PLANE_TYPE_CURSOR);
> cairo_t *cr;
> int ret = 0;
>
> igt_print_activity();
>
> /* Hardware test */
> - cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> - igt_paint_test_pattern(cr, data->screenw, data->screenh);
> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> + restore_image(data);
>
> + igt_plane_set_position(data->cursor, x, y);
> cursor_enable(data);
> - igt_plane_set_position(cursor, x, y);
>
> if (chv_cursor_broken(data, x) && cursor_visible(data, x, y)) {
> ret = igt_display_try_commit2(display, COMMIT_LEGACY);
> igt_assert_eq(ret, -EINVAL);
> - igt_plane_set_position(cursor, 0, y);
> + igt_plane_set_position(data->cursor, 0, y);
>
> return;
> }
>
> igt_display_commit(display);
>
> - igt_wait_for_vblank(data->drm_fd, data->pipe);
> + /* Extra vblank wait is because nonblocking cursor ioctl */
> + igt_wait_for_vblank_count(data->drm_fd, data->pipe, 2);
> igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &crc);
>
> if (data->flags & (TEST_DPMS | TEST_SUSPEND)) {
> @@ -211,39 +215,29 @@ static void do_single_test(data_t *data, int x,
> int y)
> cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> draw_cursor(cr, x, y, data->curw, data->curh, 1.0);
> igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> - igt_display_commit(display);
> -
> + igt_dirty_fb(data->drm_fd, &data->primary_fb);
> + /* Extra vblank wait is because nonblocking cursor ioctl */
> igt_wait_for_vblank(data->drm_fd, data->pipe);
> - igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
>
> + igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
> igt_assert_crc_equal(&crc, &ref_crc);
> -
> - /* Clear screen afterwards */
> - cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> - igt_paint_color(cr, 0, 0, data->screenw, data->screenh, 0.0,
> 0.0, 0.0);
> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> }
>
> static void do_fail_test(data_t *data, int x, int y, int expect)
> {
> igt_display_t *display = &data->display;
> - igt_plane_t *cursor =
> - igt_output_get_plane_type(data->output,
> DRM_PLANE_TYPE_CURSOR);
> - cairo_t *cr;
> int ret;
>
> igt_print_activity();
>
> /* Hardware test */
> - cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> - igt_paint_test_pattern(cr, data->screenw, data->screenh);
> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> + restore_image(data);
>
> cursor_enable(data);
> - igt_plane_set_position(cursor, x, y);
> + igt_plane_set_position(data->cursor, x, y);
> ret = igt_display_try_commit2(display, COMMIT_LEGACY);
>
> - igt_plane_set_position(cursor, 0, 0);
> + igt_plane_set_position(data->cursor, 0, 0);
> cursor_disable(data);
> igt_display_commit(display);
>
> @@ -355,6 +349,11 @@ static void cleanup_crtc(data_t *data)
> igt_pipe_crc_free(data->pipe_crc);
> data->pipe_crc = NULL;
>
> + cairo_surface_destroy(data->surface);
> +
> + igt_plane_set_fb(data->primary, NULL);
> + igt_display_commit(display);
> +
> igt_remove_fb(data->drm_fd, &data->primary_fb);
>
> igt_display_reset(display);
> @@ -365,7 +364,7 @@ static void prepare_crtc(data_t *data,
> igt_output_t *output,
> {
> drmModeModeInfo *mode;
> igt_display_t *display = &data->display;
> - igt_plane_t *primary;
> + cairo_t *cr;
>
> /* select the pipe we want to use */
> igt_output_set_pipe(output, data->pipe);
> @@ -378,8 +377,10 @@ static void prepare_crtc(data_t *data,
> igt_output_t *output,
> 0.0, 0.0, 0.0,
> &data->primary_fb);
>
> - primary = igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_PRIMARY);
> - igt_plane_set_fb(primary, &data->primary_fb);
> + data->primary = igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_PRIMARY);
> + data->cursor = igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_CURSOR);
> +
> + igt_plane_set_fb(data->primary, &data->primary_fb);
>
> igt_display_commit(display);
>
> @@ -398,9 +399,15 @@ static void prepare_crtc(data_t *data,
> igt_output_t *output,
> data->curh = cursor_h;
> data->refresh = mode->vrefresh;
>
> - /* get reference crc w/o cursor */
> + /* store test image as cairo surface */
> + data->surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24,
> data->screenw, data->screenh);
> +
> + cr = cairo_create(data->surface);
> + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
> + igt_paint_test_pattern(cr, data->screenw, data->screenh);
> + cairo_destroy(cr);
> +
> igt_pipe_crc_start(data->pipe_crc);
> - igt_pipe_crc_get_current(data->drm_fd, data->pipe_crc, &data-
> >ref_crc);
> }
>
> static void test_cursor_alpha(data_t *data, double a)
> @@ -521,8 +528,6 @@ static void test_cursor_size(data_t *data)
> uint32_t fb_id;
> int i, size;
> int cursor_max_size = data->cursor_max_w;
> - igt_plane_t *cursor =
> - igt_output_get_plane_type(data->output,
> DRM_PLANE_TYPE_CURSOR);
>
> /* Create a maximum size cursor, then change the size in flight
> to
> * smaller ones to see that the size is applied correctly
> @@ -541,8 +546,8 @@ static void test_cursor_size(data_t *data)
> cursor_enable(data);
> for (i = 0, size = cursor_max_size; size >= 64; size /= 2, i++)
> {
> /* Change size in flight: */
> - igt_plane_set_size(cursor, size, size);
> - igt_fb_set_size(&data->fb, cursor, size, size);
> + igt_plane_set_size(data->cursor, size, size);
> + igt_fb_set_size(&data->fb, data->cursor, size, size);
> igt_display_commit(display);
> igt_wait_for_vblank(data->drm_fd, data->pipe);
> igt_pipe_crc_get_current(data->drm_fd, pipe_crc,
> &crc[i]);
> @@ -575,26 +580,24 @@ static void test_rapid_movement(data_t *data)
> int x = 0, y = 0;
> long usec;
> igt_display_t *display = &data->display;
> - igt_plane_t *cursor =
> - igt_output_get_plane_type(data->output,
> DRM_PLANE_TYPE_CURSOR);
>
> cursor_enable(data);
>
> gettimeofday(&start, NULL);
> for ( ; x < 100; x++) {
> - igt_plane_set_position(cursor, x, y);
> + igt_plane_set_position(data->cursor, x, y);
> igt_display_commit(display);
> }
> for ( ; y < 100; y++) {
> - igt_plane_set_position(cursor, x, y);
> + igt_plane_set_position(data->cursor, x, y);
> igt_display_commit(display);
> }
> for ( ; x > 0; x--) {
> - igt_plane_set_position(cursor, x, y);
> + igt_plane_set_position(data->cursor, x, y);
> igt_display_commit(display);
> }
> for ( ; y > 0; y--) {
> - igt_plane_set_position(cursor, x, y);
> + igt_plane_set_position(data->cursor, x, y);
> igt_display_commit(display);
> }
> gettimeofday(&end, NULL);
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error
2019-12-10 11:53 ` Kahola, Mika
@ 2019-12-10 12:54 ` Juha-Pekka Heikkila
2019-12-10 14:19 ` Kahola, Mika
0 siblings, 1 reply; 19+ messages in thread
From: Juha-Pekka Heikkila @ 2019-12-10 12:54 UTC (permalink / raw)
To: Kahola, Mika, igt-dev@lists.freedesktop.org
On 10.12.2019 13.53, Kahola, Mika wrote:
> On Mon, 2019-12-09 at 15:19 +0200, Juha-Pekka Heikkila wrote:
>> Having crc running continuously cause this test sometime
>> fill crc buffer, fix this problem as well as do some generic
>> cleanups.
> The difference between this and the previous one is removed gem_sync()
> function from restore_image()?
>
> Maybe we could add note on changes in commit message.
You mean difference between previous version that was on patchwork?
Those were never committed into IGT. THB I don't know would that make a
difference for anyone looking at gitlog later on?
/Juha-Pekka
>
> Cheers,
> Mika
>
>>
>> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
>> ---
>> tests/kms_cursor_crc.c | 109 +++++++++++++++++++++++++------------
>> ------------
>> 1 file changed, 56 insertions(+), 53 deletions(-)
>>
>> diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
>> index 6475dea..9542141 100644
>> --- a/tests/kms_cursor_crc.c
>> +++ b/tests/kms_cursor_crc.c
>> @@ -52,7 +52,6 @@ typedef struct {
>> struct igt_fb fb;
>> igt_output_t *output;
>> enum pipe pipe;
>> - igt_crc_t ref_crc;
>> int left, right, top, bottom;
>> int screenw, screenh;
>> int refresh;
>> @@ -60,6 +59,9 @@ typedef struct {
>> int cursor_max_w, cursor_max_h;
>> igt_pipe_crc_t *pipe_crc;
>> unsigned flags;
>> + igt_plane_t *primary;
>> + igt_plane_t *cursor;
>> + cairo_surface_t *surface;
>> } data_t;
>>
>> #define TEST_DPMS (1<<0)
>> @@ -89,23 +91,15 @@ static void draw_cursor(cairo_t *cr, int x, int
>> y, int cw, int ch, double a)
>>
>> static void cursor_enable(data_t *data)
>> {
>> - igt_output_t *output = data->output;
>> - igt_plane_t *cursor =
>> - igt_output_get_plane_type(output,
>> DRM_PLANE_TYPE_CURSOR);
>> -
>> - igt_plane_set_fb(cursor, &data->fb);
>> - igt_plane_set_size(cursor, data->curw, data->curh);
>> - igt_fb_set_size(&data->fb, cursor, data->curw, data->curh);
>> + igt_plane_set_fb(data->cursor, &data->fb);
>> + igt_plane_set_size(data->cursor, data->curw, data->curh);
>> + igt_fb_set_size(&data->fb, data->cursor, data->curw, data-
>>> curh);
>> }
>>
>> static void cursor_disable(data_t *data)
>> {
>> - igt_output_t *output = data->output;
>> - igt_plane_t *cursor =
>> - igt_output_get_plane_type(output,
>> DRM_PLANE_TYPE_CURSOR);
>> -
>> - igt_plane_set_fb(cursor, NULL);
>> - igt_plane_set_position(cursor, 0, 0);
>> + igt_plane_set_fb(data->cursor, NULL);
>> + igt_plane_set_position(data->cursor, 0, 0);
>> }
>>
>> static bool chv_cursor_broken(data_t *data, int x)
>> @@ -144,37 +138,47 @@ static bool cursor_visible(data_t *data, int x,
>> int y)
>> return true;
>> }
>>
>> +static void restore_image(data_t *data)
>> +{
>> + cairo_t *cr;
>> +
>> + cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
>> + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
>> + cairo_set_source_surface(cr, data->surface, 0, 0);
>> + cairo_rectangle(cr, 0, 0, data->screenw, data->screenh);
>> + cairo_fill(cr);
>> + igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
>> + igt_dirty_fb(data->drm_fd, &data->primary_fb);
>> +}
>> +
>> static void do_single_test(data_t *data, int x, int y)
>> {
>> igt_display_t *display = &data->display;
>> igt_pipe_crc_t *pipe_crc = data->pipe_crc;
>> igt_crc_t crc, ref_crc;
>> - igt_plane_t *cursor =
>> - igt_output_get_plane_type(data->output,
>> DRM_PLANE_TYPE_CURSOR);
>> cairo_t *cr;
>> int ret = 0;
>>
>> igt_print_activity();
>>
>> /* Hardware test */
>> - cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
>> - igt_paint_test_pattern(cr, data->screenw, data->screenh);
>> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
>> + restore_image(data);
>>
>> + igt_plane_set_position(data->cursor, x, y);
>> cursor_enable(data);
>> - igt_plane_set_position(cursor, x, y);
>>
>> if (chv_cursor_broken(data, x) && cursor_visible(data, x, y)) {
>> ret = igt_display_try_commit2(display, COMMIT_LEGACY);
>> igt_assert_eq(ret, -EINVAL);
>> - igt_plane_set_position(cursor, 0, y);
>> + igt_plane_set_position(data->cursor, 0, y);
>>
>> return;
>> }
>>
>> igt_display_commit(display);
>>
>> - igt_wait_for_vblank(data->drm_fd, data->pipe);
>> + /* Extra vblank wait is because nonblocking cursor ioctl */
>> + igt_wait_for_vblank_count(data->drm_fd, data->pipe, 2);
>> igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &crc);
>>
>> if (data->flags & (TEST_DPMS | TEST_SUSPEND)) {
>> @@ -211,39 +215,29 @@ static void do_single_test(data_t *data, int x,
>> int y)
>> cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
>> draw_cursor(cr, x, y, data->curw, data->curh, 1.0);
>> igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
>> - igt_display_commit(display);
>> -
>> + igt_dirty_fb(data->drm_fd, &data->primary_fb);
>> + /* Extra vblank wait is because nonblocking cursor ioctl */
>> igt_wait_for_vblank(data->drm_fd, data->pipe);
>> - igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
>>
>> + igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
>> igt_assert_crc_equal(&crc, &ref_crc);
>> -
>> - /* Clear screen afterwards */
>> - cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
>> - igt_paint_color(cr, 0, 0, data->screenw, data->screenh, 0.0,
>> 0.0, 0.0);
>> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
>> }
>>
>> static void do_fail_test(data_t *data, int x, int y, int expect)
>> {
>> igt_display_t *display = &data->display;
>> - igt_plane_t *cursor =
>> - igt_output_get_plane_type(data->output,
>> DRM_PLANE_TYPE_CURSOR);
>> - cairo_t *cr;
>> int ret;
>>
>> igt_print_activity();
>>
>> /* Hardware test */
>> - cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
>> - igt_paint_test_pattern(cr, data->screenw, data->screenh);
>> - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
>> + restore_image(data);
>>
>> cursor_enable(data);
>> - igt_plane_set_position(cursor, x, y);
>> + igt_plane_set_position(data->cursor, x, y);
>> ret = igt_display_try_commit2(display, COMMIT_LEGACY);
>>
>> - igt_plane_set_position(cursor, 0, 0);
>> + igt_plane_set_position(data->cursor, 0, 0);
>> cursor_disable(data);
>> igt_display_commit(display);
>>
>> @@ -355,6 +349,11 @@ static void cleanup_crtc(data_t *data)
>> igt_pipe_crc_free(data->pipe_crc);
>> data->pipe_crc = NULL;
>>
>> + cairo_surface_destroy(data->surface);
>> +
>> + igt_plane_set_fb(data->primary, NULL);
>> + igt_display_commit(display);
>> +
>> igt_remove_fb(data->drm_fd, &data->primary_fb);
>>
>> igt_display_reset(display);
>> @@ -365,7 +364,7 @@ static void prepare_crtc(data_t *data,
>> igt_output_t *output,
>> {
>> drmModeModeInfo *mode;
>> igt_display_t *display = &data->display;
>> - igt_plane_t *primary;
>> + cairo_t *cr;
>>
>> /* select the pipe we want to use */
>> igt_output_set_pipe(output, data->pipe);
>> @@ -378,8 +377,10 @@ static void prepare_crtc(data_t *data,
>> igt_output_t *output,
>> 0.0, 0.0, 0.0,
>> &data->primary_fb);
>>
>> - primary = igt_output_get_plane_type(output,
>> DRM_PLANE_TYPE_PRIMARY);
>> - igt_plane_set_fb(primary, &data->primary_fb);
>> + data->primary = igt_output_get_plane_type(output,
>> DRM_PLANE_TYPE_PRIMARY);
>> + data->cursor = igt_output_get_plane_type(output,
>> DRM_PLANE_TYPE_CURSOR);
>> +
>> + igt_plane_set_fb(data->primary, &data->primary_fb);
>>
>> igt_display_commit(display);
>>
>> @@ -398,9 +399,15 @@ static void prepare_crtc(data_t *data,
>> igt_output_t *output,
>> data->curh = cursor_h;
>> data->refresh = mode->vrefresh;
>>
>> - /* get reference crc w/o cursor */
>> + /* store test image as cairo surface */
>> + data->surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24,
>> data->screenw, data->screenh);
>> +
>> + cr = cairo_create(data->surface);
>> + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
>> + igt_paint_test_pattern(cr, data->screenw, data->screenh);
>> + cairo_destroy(cr);
>> +
>> igt_pipe_crc_start(data->pipe_crc);
>> - igt_pipe_crc_get_current(data->drm_fd, data->pipe_crc, &data-
>>> ref_crc);
>> }
>>
>> static void test_cursor_alpha(data_t *data, double a)
>> @@ -521,8 +528,6 @@ static void test_cursor_size(data_t *data)
>> uint32_t fb_id;
>> int i, size;
>> int cursor_max_size = data->cursor_max_w;
>> - igt_plane_t *cursor =
>> - igt_output_get_plane_type(data->output,
>> DRM_PLANE_TYPE_CURSOR);
>>
>> /* Create a maximum size cursor, then change the size in flight
>> to
>> * smaller ones to see that the size is applied correctly
>> @@ -541,8 +546,8 @@ static void test_cursor_size(data_t *data)
>> cursor_enable(data);
>> for (i = 0, size = cursor_max_size; size >= 64; size /= 2, i++)
>> {
>> /* Change size in flight: */
>> - igt_plane_set_size(cursor, size, size);
>> - igt_fb_set_size(&data->fb, cursor, size, size);
>> + igt_plane_set_size(data->cursor, size, size);
>> + igt_fb_set_size(&data->fb, data->cursor, size, size);
>> igt_display_commit(display);
>> igt_wait_for_vblank(data->drm_fd, data->pipe);
>> igt_pipe_crc_get_current(data->drm_fd, pipe_crc,
>> &crc[i]);
>> @@ -575,26 +580,24 @@ static void test_rapid_movement(data_t *data)
>> int x = 0, y = 0;
>> long usec;
>> igt_display_t *display = &data->display;
>> - igt_plane_t *cursor =
>> - igt_output_get_plane_type(data->output,
>> DRM_PLANE_TYPE_CURSOR);
>>
>> cursor_enable(data);
>>
>> gettimeofday(&start, NULL);
>> for ( ; x < 100; x++) {
>> - igt_plane_set_position(cursor, x, y);
>> + igt_plane_set_position(data->cursor, x, y);
>> igt_display_commit(display);
>> }
>> for ( ; y < 100; y++) {
>> - igt_plane_set_position(cursor, x, y);
>> + igt_plane_set_position(data->cursor, x, y);
>> igt_display_commit(display);
>> }
>> for ( ; x > 0; x--) {
>> - igt_plane_set_position(cursor, x, y);
>> + igt_plane_set_position(data->cursor, x, y);
>> igt_display_commit(display);
>> }
>> for ( ; y > 0; y--) {
>> - igt_plane_set_position(cursor, x, y);
>> + igt_plane_set_position(data->cursor, x, y);
>> igt_display_commit(display);
>> }
>> gettimeofday(&end, NULL);
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error
2019-12-10 12:54 ` Juha-Pekka Heikkila
@ 2019-12-10 14:19 ` Kahola, Mika
0 siblings, 0 replies; 19+ messages in thread
From: Kahola, Mika @ 2019-12-10 14:19 UTC (permalink / raw)
To: juhapekka.heikkila@gmail.com, igt-dev@lists.freedesktop.org
On Tue, 2019-12-10 at 14:54 +0200, Juha-Pekka Heikkila wrote:
> On 10.12.2019 13.53, Kahola, Mika wrote:
> > On Mon, 2019-12-09 at 15:19 +0200, Juha-Pekka Heikkila wrote:
> > > Having crc running continuously cause this test sometime
> > > fill crc buffer, fix this problem as well as do some generic
> > > cleanups.
> >
> > The difference between this and the previous one is removed
> > gem_sync()
> > function from restore_image()?
> >
> > Maybe we could add note on changes in commit message.
>
> You mean difference between previous version that was on patchwork?
> Those were never committed into IGT. THB I don't know would that make
> a
> difference for anyone looking at gitlog later on?
Yes, that's what I meant. I thought, if this patch is an evolution of
the previous one, we should make a note about the progress of the
patch.
Cheers,
Mika
>
> /Juha-Pekka
>
> >
> > Cheers,
> > Mika
> >
> > >
> > > Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> > > ---
> > > tests/kms_cursor_crc.c | 109 +++++++++++++++++++++++++---------
> > > ---
> > > ------------
> > > 1 file changed, 56 insertions(+), 53 deletions(-)
> > >
> > > diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
> > > index 6475dea..9542141 100644
> > > --- a/tests/kms_cursor_crc.c
> > > +++ b/tests/kms_cursor_crc.c
> > > @@ -52,7 +52,6 @@ typedef struct {
> > > struct igt_fb fb;
> > > igt_output_t *output;
> > > enum pipe pipe;
> > > - igt_crc_t ref_crc;
> > > int left, right, top, bottom;
> > > int screenw, screenh;
> > > int refresh;
> > > @@ -60,6 +59,9 @@ typedef struct {
> > > int cursor_max_w, cursor_max_h;
> > > igt_pipe_crc_t *pipe_crc;
> > > unsigned flags;
> > > + igt_plane_t *primary;
> > > + igt_plane_t *cursor;
> > > + cairo_surface_t *surface;
> > > } data_t;
> > >
> > > #define TEST_DPMS (1<<0)
> > > @@ -89,23 +91,15 @@ static void draw_cursor(cairo_t *cr, int x,
> > > int
> > > y, int cw, int ch, double a)
> > >
> > > static void cursor_enable(data_t *data)
> > > {
> > > - igt_output_t *output = data->output;
> > > - igt_plane_t *cursor =
> > > - igt_output_get_plane_type(output,
> > > DRM_PLANE_TYPE_CURSOR);
> > > -
> > > - igt_plane_set_fb(cursor, &data->fb);
> > > - igt_plane_set_size(cursor, data->curw, data->curh);
> > > - igt_fb_set_size(&data->fb, cursor, data->curw, data->curh);
> > > + igt_plane_set_fb(data->cursor, &data->fb);
> > > + igt_plane_set_size(data->cursor, data->curw, data->curh);
> > > + igt_fb_set_size(&data->fb, data->cursor, data->curw, data-
> > > > curh);
> > >
> > > }
> > >
> > > static void cursor_disable(data_t *data)
> > > {
> > > - igt_output_t *output = data->output;
> > > - igt_plane_t *cursor =
> > > - igt_output_get_plane_type(output,
> > > DRM_PLANE_TYPE_CURSOR);
> > > -
> > > - igt_plane_set_fb(cursor, NULL);
> > > - igt_plane_set_position(cursor, 0, 0);
> > > + igt_plane_set_fb(data->cursor, NULL);
> > > + igt_plane_set_position(data->cursor, 0, 0);
> > > }
> > >
> > > static bool chv_cursor_broken(data_t *data, int x)
> > > @@ -144,37 +138,47 @@ static bool cursor_visible(data_t *data,
> > > int x,
> > > int y)
> > > return true;
> > > }
> > >
> > > +static void restore_image(data_t *data)
> > > +{
> > > + cairo_t *cr;
> > > +
> > > + cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> > > + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
> > > + cairo_set_source_surface(cr, data->surface, 0, 0);
> > > + cairo_rectangle(cr, 0, 0, data->screenw, data->screenh);
> > > + cairo_fill(cr);
> > > + igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> > > + igt_dirty_fb(data->drm_fd, &data->primary_fb);
> > > +}
> > > +
> > > static void do_single_test(data_t *data, int x, int y)
> > > {
> > > igt_display_t *display = &data->display;
> > > igt_pipe_crc_t *pipe_crc = data->pipe_crc;
> > > igt_crc_t crc, ref_crc;
> > > - igt_plane_t *cursor =
> > > - igt_output_get_plane_type(data->output,
> > > DRM_PLANE_TYPE_CURSOR);
> > > cairo_t *cr;
> > > int ret = 0;
> > >
> > > igt_print_activity();
> > >
> > > /* Hardware test */
> > > - cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> > > - igt_paint_test_pattern(cr, data->screenw, data->screenh);
> > > - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> > > + restore_image(data);
> > >
> > > + igt_plane_set_position(data->cursor, x, y);
> > > cursor_enable(data);
> > > - igt_plane_set_position(cursor, x, y);
> > >
> > > if (chv_cursor_broken(data, x) && cursor_visible(data,
> > > x, y)) {
> > > ret = igt_display_try_commit2(display,
> > > COMMIT_LEGACY);
> > > igt_assert_eq(ret, -EINVAL);
> > > - igt_plane_set_position(cursor, 0, y);
> > > + igt_plane_set_position(data->cursor, 0, y);
> > >
> > > return;
> > > }
> > >
> > > igt_display_commit(display);
> > >
> > > - igt_wait_for_vblank(data->drm_fd, data->pipe);
> > > + /* Extra vblank wait is because nonblocking cursor ioctl */
> > > + igt_wait_for_vblank_count(data->drm_fd, data->pipe, 2);
> > > igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &crc);
> > >
> > > if (data->flags & (TEST_DPMS | TEST_SUSPEND)) {
> > > @@ -211,39 +215,29 @@ static void do_single_test(data_t *data,
> > > int x,
> > > int y)
> > > cr = igt_get_cairo_ctx(data->drm_fd, &data-
> > > >primary_fb);
> > > draw_cursor(cr, x, y, data->curw, data->curh, 1.0);
> > > igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> > > - igt_display_commit(display);
> > > -
> > > + igt_dirty_fb(data->drm_fd, &data->primary_fb);
> > > + /* Extra vblank wait is because nonblocking cursor ioctl */
> > > igt_wait_for_vblank(data->drm_fd, data->pipe);
> > > - igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
> > >
> > > + igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
> > > igt_assert_crc_equal(&crc, &ref_crc);
> > > -
> > > - /* Clear screen afterwards */
> > > - cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> > > - igt_paint_color(cr, 0, 0, data->screenw, data->screenh, 0.0,
> > > 0.0, 0.0);
> > > - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> > > }
> > >
> > > static void do_fail_test(data_t *data, int x, int y, int
> > > expect)
> > > {
> > > igt_display_t *display = &data->display;
> > > - igt_plane_t *cursor =
> > > - igt_output_get_plane_type(data->output,
> > > DRM_PLANE_TYPE_CURSOR);
> > > - cairo_t *cr;
> > > int ret;
> > >
> > > igt_print_activity();
> > >
> > > /* Hardware test */
> > > - cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> > > - igt_paint_test_pattern(cr, data->screenw, data->screenh);
> > > - igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> > > + restore_image(data);
> > >
> > > cursor_enable(data);
> > > - igt_plane_set_position(cursor, x, y);
> > > + igt_plane_set_position(data->cursor, x, y);
> > > ret = igt_display_try_commit2(display, COMMIT_LEGACY);
> > >
> > > - igt_plane_set_position(cursor, 0, 0);
> > > + igt_plane_set_position(data->cursor, 0, 0);
> > > cursor_disable(data);
> > > igt_display_commit(display);
> > >
> > > @@ -355,6 +349,11 @@ static void cleanup_crtc(data_t *data)
> > > igt_pipe_crc_free(data->pipe_crc);
> > > data->pipe_crc = NULL;
> > >
> > > + cairo_surface_destroy(data->surface);
> > > +
> > > + igt_plane_set_fb(data->primary, NULL);
> > > + igt_display_commit(display);
> > > +
> > > igt_remove_fb(data->drm_fd, &data->primary_fb);
> > >
> > > igt_display_reset(display);
> > > @@ -365,7 +364,7 @@ static void prepare_crtc(data_t *data,
> > > igt_output_t *output,
> > > {
> > > drmModeModeInfo *mode;
> > > igt_display_t *display = &data->display;
> > > - igt_plane_t *primary;
> > > + cairo_t *cr;
> > >
> > > /* select the pipe we want to use */
> > > igt_output_set_pipe(output, data->pipe);
> > > @@ -378,8 +377,10 @@ static void prepare_crtc(data_t *data,
> > > igt_output_t *output,
> > > 0.0, 0.0, 0.0,
> > > &data->primary_fb);
> > >
> > > - primary = igt_output_get_plane_type(output,
> > > DRM_PLANE_TYPE_PRIMARY);
> > > - igt_plane_set_fb(primary, &data->primary_fb);
> > > + data->primary = igt_output_get_plane_type(output,
> > > DRM_PLANE_TYPE_PRIMARY);
> > > + data->cursor = igt_output_get_plane_type(output,
> > > DRM_PLANE_TYPE_CURSOR);
> > > +
> > > + igt_plane_set_fb(data->primary, &data->primary_fb);
> > >
> > > igt_display_commit(display);
> > >
> > > @@ -398,9 +399,15 @@ static void prepare_crtc(data_t *data,
> > > igt_output_t *output,
> > > data->curh = cursor_h;
> > > data->refresh = mode->vrefresh;
> > >
> > > - /* get reference crc w/o cursor */
> > > + /* store test image as cairo surface */
> > > + data->surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24,
> > > data->screenw, data->screenh);
> > > +
> > > + cr = cairo_create(data->surface);
> > > + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
> > > + igt_paint_test_pattern(cr, data->screenw, data->screenh);
> > > + cairo_destroy(cr);
> > > +
> > > igt_pipe_crc_start(data->pipe_crc);
> > > - igt_pipe_crc_get_current(data->drm_fd, data->pipe_crc, &data-
> > > > ref_crc);
> > >
> > > }
> > >
> > > static void test_cursor_alpha(data_t *data, double a)
> > > @@ -521,8 +528,6 @@ static void test_cursor_size(data_t *data)
> > > uint32_t fb_id;
> > > int i, size;
> > > int cursor_max_size = data->cursor_max_w;
> > > - igt_plane_t *cursor =
> > > - igt_output_get_plane_type(data->output,
> > > DRM_PLANE_TYPE_CURSOR);
> > >
> > > /* Create a maximum size cursor, then change the size
> > > in flight
> > > to
> > > * smaller ones to see that the size is applied
> > > correctly
> > > @@ -541,8 +546,8 @@ static void test_cursor_size(data_t *data)
> > > cursor_enable(data);
> > > for (i = 0, size = cursor_max_size; size >= 64; size /=
> > > 2, i++)
> > > {
> > > /* Change size in flight: */
> > > - igt_plane_set_size(cursor, size, size);
> > > - igt_fb_set_size(&data->fb, cursor, size, size);
> > > + igt_plane_set_size(data->cursor, size, size);
> > > + igt_fb_set_size(&data->fb, data->cursor, size, size);
> > > igt_display_commit(display);
> > > igt_wait_for_vblank(data->drm_fd, data->pipe);
> > > igt_pipe_crc_get_current(data->drm_fd,
> > > pipe_crc,
> > > &crc[i]);
> > > @@ -575,26 +580,24 @@ static void test_rapid_movement(data_t
> > > *data)
> > > int x = 0, y = 0;
> > > long usec;
> > > igt_display_t *display = &data->display;
> > > - igt_plane_t *cursor =
> > > - igt_output_get_plane_type(data->output,
> > > DRM_PLANE_TYPE_CURSOR);
> > >
> > > cursor_enable(data);
> > >
> > > gettimeofday(&start, NULL);
> > > for ( ; x < 100; x++) {
> > > - igt_plane_set_position(cursor, x, y);
> > > + igt_plane_set_position(data->cursor, x, y);
> > > igt_display_commit(display);
> > > }
> > > for ( ; y < 100; y++) {
> > > - igt_plane_set_position(cursor, x, y);
> > > + igt_plane_set_position(data->cursor, x, y);
> > > igt_display_commit(display);
> > > }
> > > for ( ; x > 0; x--) {
> > > - igt_plane_set_position(cursor, x, y);
> > > + igt_plane_set_position(data->cursor, x, y);
> > > igt_display_commit(display);
> > > }
> > > for ( ; y > 0; y--) {
> > > - igt_plane_set_position(cursor, x, y);
> > > + igt_plane_set_position(data->cursor, x, y);
> > > igt_display_commit(display);
> > > }
> > > gettimeofday(&end, NULL);
>
>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 19+ messages in thread
* [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error
@ 2019-11-29 15:52 Juha-Pekka Heikkila
2019-11-29 16:03 ` Chris Wilson
0 siblings, 1 reply; 19+ messages in thread
From: Juha-Pekka Heikkila @ 2019-11-29 15:52 UTC (permalink / raw)
To: igt-dev
Having crc running continuously cause this test sometime
fill crc buffer, fix this problem as well as do some generic
cleanups.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
tests/kms_cursor_crc.c | 106 +++++++++++++++++++++++++------------------------
1 file changed, 54 insertions(+), 52 deletions(-)
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 6c4c457..6982437 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -52,7 +52,6 @@ typedef struct {
struct igt_fb fb;
igt_output_t *output;
enum pipe pipe;
- igt_crc_t ref_crc;
int left, right, top, bottom;
int screenw, screenh;
int refresh;
@@ -60,6 +59,9 @@ typedef struct {
int cursor_max_w, cursor_max_h;
igt_pipe_crc_t *pipe_crc;
unsigned flags;
+ igt_plane_t *primary;
+ igt_plane_t *cursor;
+ cairo_surface_t *surface;
} data_t;
#define TEST_DPMS (1<<0)
@@ -89,23 +91,15 @@ static void draw_cursor(cairo_t *cr, int x, int y, int cw, int ch, double a)
static void cursor_enable(data_t *data)
{
- igt_output_t *output = data->output;
- igt_plane_t *cursor =
- igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
-
- igt_plane_set_fb(cursor, &data->fb);
- igt_plane_set_size(cursor, data->curw, data->curh);
- igt_fb_set_size(&data->fb, cursor, data->curw, data->curh);
+ igt_plane_set_fb(data->cursor, &data->fb);
+ igt_plane_set_size(data->cursor, data->curw, data->curh);
+ igt_fb_set_size(&data->fb, data->cursor, data->curw, data->curh);
}
static void cursor_disable(data_t *data)
{
- igt_output_t *output = data->output;
- igt_plane_t *cursor =
- igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
-
- igt_plane_set_fb(cursor, NULL);
- igt_plane_set_position(cursor, 0, 0);
+ igt_plane_set_fb(data->cursor, NULL);
+ igt_plane_set_position(data->cursor, 0, 0);
}
static bool chv_cursor_broken(data_t *data, int x)
@@ -144,30 +138,40 @@ static bool cursor_visible(data_t *data, int x, int y)
return true;
}
+static void restore_image(data_t *data)
+{
+ cairo_t *cr;
+
+ cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
+ cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
+ cairo_set_source_surface(cr, data->surface, 0, 0);
+ cairo_rectangle(cr, 0, 0, data->screenw, data->screenh);
+ cairo_fill(cr);
+ igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
+ gem_sync(data->drm_fd, data->primary_fb.gem_handle);
+ igt_dirty_fb(data->drm_fd, &data->primary_fb);
+}
+
static void do_single_test(data_t *data, int x, int y)
{
igt_display_t *display = &data->display;
igt_pipe_crc_t *pipe_crc = data->pipe_crc;
igt_crc_t crc, ref_crc;
- igt_plane_t *cursor =
- igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_CURSOR);
cairo_t *cr;
int ret = 0;
igt_print_activity();
/* Hardware test */
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
- igt_paint_test_pattern(cr, data->screenw, data->screenh);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
+ restore_image(data);
+ igt_plane_set_position(data->cursor, x, y);
cursor_enable(data);
- igt_plane_set_position(cursor, x, y);
if (chv_cursor_broken(data, x) && cursor_visible(data, x, y)) {
ret = igt_display_try_commit2(display, COMMIT_LEGACY);
igt_assert_eq(ret, -EINVAL);
- igt_plane_set_position(cursor, 0, y);
+ igt_plane_set_position(data->cursor, 0, y);
return;
}
@@ -211,39 +215,29 @@ static void do_single_test(data_t *data, int x, int y)
cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
draw_cursor(cr, x, y, data->curw, data->curh, 1.0);
igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
- igt_display_commit(display);
-
+ gem_sync(data->drm_fd, data->primary_fb.gem_handle);
+ igt_dirty_fb(data->drm_fd, &data->primary_fb);
igt_wait_for_vblank(data->drm_fd, data->pipe);
- igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
+ igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
igt_assert_crc_equal(&crc, &ref_crc);
-
- /* Clear screen afterwards */
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
- igt_paint_color(cr, 0, 0, data->screenw, data->screenh, 0.0, 0.0, 0.0);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
}
static void do_fail_test(data_t *data, int x, int y, int expect)
{
igt_display_t *display = &data->display;
- igt_plane_t *cursor =
- igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_CURSOR);
- cairo_t *cr;
int ret;
igt_print_activity();
/* Hardware test */
- cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
- igt_paint_test_pattern(cr, data->screenw, data->screenh);
- igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
+ restore_image(data);
cursor_enable(data);
- igt_plane_set_position(cursor, x, y);
+ igt_plane_set_position(data->cursor, x, y);
ret = igt_display_try_commit2(display, COMMIT_LEGACY);
- igt_plane_set_position(cursor, 0, 0);
+ igt_plane_set_position(data->cursor, 0, 0);
cursor_disable(data);
igt_display_commit(display);
@@ -355,6 +349,11 @@ static void cleanup_crtc(data_t *data)
igt_pipe_crc_free(data->pipe_crc);
data->pipe_crc = NULL;
+ cairo_surface_destroy(data->surface);
+
+ igt_plane_set_fb(data->primary, NULL);
+ igt_display_commit(display);
+
igt_remove_fb(data->drm_fd, &data->primary_fb);
igt_display_reset(display);
@@ -365,7 +364,7 @@ static void prepare_crtc(data_t *data, igt_output_t *output,
{
drmModeModeInfo *mode;
igt_display_t *display = &data->display;
- igt_plane_t *primary;
+ cairo_t *cr;
/* select the pipe we want to use */
igt_output_set_pipe(output, data->pipe);
@@ -378,8 +377,10 @@ static void prepare_crtc(data_t *data, igt_output_t *output,
0.0, 0.0, 0.0,
&data->primary_fb);
- primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
- igt_plane_set_fb(primary, &data->primary_fb);
+ data->primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+ data->cursor = igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
+
+ igt_plane_set_fb(data->primary, &data->primary_fb);
igt_display_commit(display);
@@ -398,9 +399,14 @@ static void prepare_crtc(data_t *data, igt_output_t *output,
data->curh = cursor_h;
data->refresh = mode->vrefresh;
- /* get reference crc w/o cursor */
+ /* store test image as cairo surface */
+ data->surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24, data->screenw, data->screenh);
+ cr = cairo_create(data->surface);
+ cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
+ igt_paint_test_pattern(cr, data->screenw, data->screenh);
+ cairo_destroy(cr);
+
igt_pipe_crc_start(data->pipe_crc);
- igt_pipe_crc_get_current(data->drm_fd, data->pipe_crc, &data->ref_crc);
}
static void test_cursor_alpha(data_t *data, double a)
@@ -521,8 +527,6 @@ static void test_cursor_size(data_t *data)
uint32_t fb_id;
int i, size;
int cursor_max_size = data->cursor_max_w;
- igt_plane_t *cursor =
- igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_CURSOR);
/* Create a maximum size cursor, then change the size in flight to
* smaller ones to see that the size is applied correctly
@@ -541,8 +545,8 @@ static void test_cursor_size(data_t *data)
cursor_enable(data);
for (i = 0, size = cursor_max_size; size >= 64; size /= 2, i++) {
/* Change size in flight: */
- igt_plane_set_size(cursor, size, size);
- igt_fb_set_size(&data->fb, cursor, size, size);
+ igt_plane_set_size(data->cursor, size, size);
+ igt_fb_set_size(&data->fb, data->cursor, size, size);
igt_display_commit(display);
igt_wait_for_vblank(data->drm_fd, data->pipe);
igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &crc[i]);
@@ -575,26 +579,24 @@ static void test_rapid_movement(data_t *data)
int x = 0, y = 0;
long usec;
igt_display_t *display = &data->display;
- igt_plane_t *cursor =
- igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_CURSOR);
cursor_enable(data);
gettimeofday(&start, NULL);
for ( ; x < 100; x++) {
- igt_plane_set_position(cursor, x, y);
+ igt_plane_set_position(data->cursor, x, y);
igt_display_commit(display);
}
for ( ; y < 100; y++) {
- igt_plane_set_position(cursor, x, y);
+ igt_plane_set_position(data->cursor, x, y);
igt_display_commit(display);
}
for ( ; x > 0; x--) {
- igt_plane_set_position(cursor, x, y);
+ igt_plane_set_position(data->cursor, x, y);
igt_display_commit(display);
}
for ( ; y > 0; y--) {
- igt_plane_set_position(cursor, x, y);
+ igt_plane_set_position(data->cursor, x, y);
igt_display_commit(display);
}
gettimeofday(&end, NULL);
--
2.7.4
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error
2019-11-29 15:52 Juha-Pekka Heikkila
@ 2019-11-29 16:03 ` Chris Wilson
2019-11-29 19:57 ` Juha-Pekka Heikkilä
0 siblings, 1 reply; 19+ messages in thread
From: Chris Wilson @ 2019-11-29 16:03 UTC (permalink / raw)
To: Juha-Pekka Heikkila, igt-dev
Quoting Juha-Pekka Heikkila (2019-11-29 15:52:45)
> Having crc running continuously cause this test sometime
> fill crc buffer, fix this problem as well as do some generic
> cleanups.
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
> tests/kms_cursor_crc.c | 106 +++++++++++++++++++++++++------------------------
> 1 file changed, 54 insertions(+), 52 deletions(-)
>
> diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
> index 6c4c457..6982437 100644
> --- a/tests/kms_cursor_crc.c
> +++ b/tests/kms_cursor_crc.c
> @@ -52,7 +52,6 @@ typedef struct {
> struct igt_fb fb;
> igt_output_t *output;
> enum pipe pipe;
> - igt_crc_t ref_crc;
> int left, right, top, bottom;
> int screenw, screenh;
> int refresh;
> @@ -60,6 +59,9 @@ typedef struct {
> int cursor_max_w, cursor_max_h;
> igt_pipe_crc_t *pipe_crc;
> unsigned flags;
> + igt_plane_t *primary;
> + igt_plane_t *cursor;
> + cairo_surface_t *surface;
> } data_t;
>
> #define TEST_DPMS (1<<0)
> @@ -89,23 +91,15 @@ static void draw_cursor(cairo_t *cr, int x, int y, int cw, int ch, double a)
>
> static void cursor_enable(data_t *data)
> {
> - igt_output_t *output = data->output;
> - igt_plane_t *cursor =
> - igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
> -
> - igt_plane_set_fb(cursor, &data->fb);
> - igt_plane_set_size(cursor, data->curw, data->curh);
> - igt_fb_set_size(&data->fb, cursor, data->curw, data->curh);
> + igt_plane_set_fb(data->cursor, &data->fb);
> + igt_plane_set_size(data->cursor, data->curw, data->curh);
> + igt_fb_set_size(&data->fb, data->cursor, data->curw, data->curh);
> }
>
> static void cursor_disable(data_t *data)
> {
> - igt_output_t *output = data->output;
> - igt_plane_t *cursor =
> - igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
> -
> - igt_plane_set_fb(cursor, NULL);
> - igt_plane_set_position(cursor, 0, 0);
> + igt_plane_set_fb(data->cursor, NULL);
> + igt_plane_set_position(data->cursor, 0, 0);
> }
>
> static bool chv_cursor_broken(data_t *data, int x)
> @@ -144,30 +138,40 @@ static bool cursor_visible(data_t *data, int x, int y)
> return true;
> }
>
> +static void restore_image(data_t *data)
> +{
> + cairo_t *cr;
> +
> + cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
> + cairo_set_source_surface(cr, data->surface, 0, 0);
> + cairo_rectangle(cr, 0, 0, data->screenw, data->screenh);
> + cairo_fill(cr);
> + igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> + gem_sync(data->drm_fd, data->primary_fb.gem_handle);
This is a generic KMS test, gem_sync() is not supported.
Here it looks pretty silly, later on I guess your intent is to take the
vblank after rendering completion to align with the modeset. Why not
just ask for a signal from modeset? Or something other generic event
handling.
Bring on vkms in CI.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error
2019-11-29 16:03 ` Chris Wilson
@ 2019-11-29 19:57 ` Juha-Pekka Heikkilä
2019-11-29 20:08 ` Chris Wilson
0 siblings, 1 reply; 19+ messages in thread
From: Juha-Pekka Heikkilä @ 2019-11-29 19:57 UTC (permalink / raw)
To: Chris Wilson; +Cc: igt-dev
On Fri, Nov 29, 2019 at 6:04 PM Chris Wilson <chris@chris-wilson.co.uk> wrote:
>
> Quoting Juha-Pekka Heikkila (2019-11-29 15:52:45)
> > Having crc running continuously cause this test sometime
> > fill crc buffer, fix this problem as well as do some generic
> > cleanups.
> >
> > Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> > ---
> > tests/kms_cursor_crc.c | 106 +++++++++++++++++++++++++------------------------
> > 1 file changed, 54 insertions(+), 52 deletions(-)
> >
> > diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
> > index 6c4c457..6982437 100644
> > --- a/tests/kms_cursor_crc.c
> > +++ b/tests/kms_cursor_crc.c
> > @@ -52,7 +52,6 @@ typedef struct {
> > struct igt_fb fb;
> > igt_output_t *output;
> > enum pipe pipe;
> > - igt_crc_t ref_crc;
> > int left, right, top, bottom;
> > int screenw, screenh;
> > int refresh;
> > @@ -60,6 +59,9 @@ typedef struct {
> > int cursor_max_w, cursor_max_h;
> > igt_pipe_crc_t *pipe_crc;
> > unsigned flags;
> > + igt_plane_t *primary;
> > + igt_plane_t *cursor;
> > + cairo_surface_t *surface;
> > } data_t;
> >
> > #define TEST_DPMS (1<<0)
> > @@ -89,23 +91,15 @@ static void draw_cursor(cairo_t *cr, int x, int y, int cw, int ch, double a)
> >
> > static void cursor_enable(data_t *data)
> > {
> > - igt_output_t *output = data->output;
> > - igt_plane_t *cursor =
> > - igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
> > -
> > - igt_plane_set_fb(cursor, &data->fb);
> > - igt_plane_set_size(cursor, data->curw, data->curh);
> > - igt_fb_set_size(&data->fb, cursor, data->curw, data->curh);
> > + igt_plane_set_fb(data->cursor, &data->fb);
> > + igt_plane_set_size(data->cursor, data->curw, data->curh);
> > + igt_fb_set_size(&data->fb, data->cursor, data->curw, data->curh);
> > }
> >
> > static void cursor_disable(data_t *data)
> > {
> > - igt_output_t *output = data->output;
> > - igt_plane_t *cursor =
> > - igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
> > -
> > - igt_plane_set_fb(cursor, NULL);
> > - igt_plane_set_position(cursor, 0, 0);
> > + igt_plane_set_fb(data->cursor, NULL);
> > + igt_plane_set_position(data->cursor, 0, 0);
> > }
> >
> > static bool chv_cursor_broken(data_t *data, int x)
> > @@ -144,30 +138,40 @@ static bool cursor_visible(data_t *data, int x, int y)
> > return true;
> > }
> >
> > +static void restore_image(data_t *data)
> > +{
> > + cairo_t *cr;
> > +
> > + cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> > + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
> > + cairo_set_source_surface(cr, data->surface, 0, 0);
> > + cairo_rectangle(cr, 0, 0, data->screenw, data->screenh);
> > + cairo_fill(cr);
> > + igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> > + gem_sync(data->drm_fd, data->primary_fb.gem_handle);
>
> This is a generic KMS test, gem_sync() is not supported.
Idea here was to make certain memory copied to FB is really there. I
did ask from Mika for ideas and he suggested changing domain to cause
synchronization, in ioctl_wrappers.c at gem_set_domain() comments
suggested to use gem_sync() instead.
Reason for doing this is I started to get random CRC errors when I
switched away from calling igt_paint_test_pattern() every time and
just use test pattern stored in Cairo surface which seemed much
faster. Adding wait after igt_put_cairo_ctx() removed those CRC errors
so I figured there's my problem.
On my ICL box those random CRC error went away with this pattern but
if gem_sync doesn't do here as I had planned then it can be I just got
lucky with randomness of random CRC errors :) Once CI has ran this I
know more.
/Juha-Pekka
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error
2019-11-29 19:57 ` Juha-Pekka Heikkilä
@ 2019-11-29 20:08 ` Chris Wilson
2019-11-29 20:38 ` Juha-Pekka Heikkila
0 siblings, 1 reply; 19+ messages in thread
From: Chris Wilson @ 2019-11-29 20:08 UTC (permalink / raw)
To: Juha-Pekka Heikkilä; +Cc: igt-dev
Quoting Juha-Pekka Heikkilä (2019-11-29 19:57:48)
> On Fri, Nov 29, 2019 at 6:04 PM Chris Wilson <chris@chris-wilson.co.uk> wrote:
> >
> > Quoting Juha-Pekka Heikkila (2019-11-29 15:52:45)
> > > Having crc running continuously cause this test sometime
> > > fill crc buffer, fix this problem as well as do some generic
> > > cleanups.
> > >
> > > Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> > > ---
> > > tests/kms_cursor_crc.c | 106 +++++++++++++++++++++++++------------------------
> > > 1 file changed, 54 insertions(+), 52 deletions(-)
> > >
> > > diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
> > > index 6c4c457..6982437 100644
> > > --- a/tests/kms_cursor_crc.c
> > > +++ b/tests/kms_cursor_crc.c
> > > @@ -52,7 +52,6 @@ typedef struct {
> > > struct igt_fb fb;
> > > igt_output_t *output;
> > > enum pipe pipe;
> > > - igt_crc_t ref_crc;
> > > int left, right, top, bottom;
> > > int screenw, screenh;
> > > int refresh;
> > > @@ -60,6 +59,9 @@ typedef struct {
> > > int cursor_max_w, cursor_max_h;
> > > igt_pipe_crc_t *pipe_crc;
> > > unsigned flags;
> > > + igt_plane_t *primary;
> > > + igt_plane_t *cursor;
> > > + cairo_surface_t *surface;
> > > } data_t;
> > >
> > > #define TEST_DPMS (1<<0)
> > > @@ -89,23 +91,15 @@ static void draw_cursor(cairo_t *cr, int x, int y, int cw, int ch, double a)
> > >
> > > static void cursor_enable(data_t *data)
> > > {
> > > - igt_output_t *output = data->output;
> > > - igt_plane_t *cursor =
> > > - igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
> > > -
> > > - igt_plane_set_fb(cursor, &data->fb);
> > > - igt_plane_set_size(cursor, data->curw, data->curh);
> > > - igt_fb_set_size(&data->fb, cursor, data->curw, data->curh);
> > > + igt_plane_set_fb(data->cursor, &data->fb);
> > > + igt_plane_set_size(data->cursor, data->curw, data->curh);
> > > + igt_fb_set_size(&data->fb, data->cursor, data->curw, data->curh);
> > > }
> > >
> > > static void cursor_disable(data_t *data)
> > > {
> > > - igt_output_t *output = data->output;
> > > - igt_plane_t *cursor =
> > > - igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
> > > -
> > > - igt_plane_set_fb(cursor, NULL);
> > > - igt_plane_set_position(cursor, 0, 0);
> > > + igt_plane_set_fb(data->cursor, NULL);
> > > + igt_plane_set_position(data->cursor, 0, 0);
> > > }
> > >
> > > static bool chv_cursor_broken(data_t *data, int x)
> > > @@ -144,30 +138,40 @@ static bool cursor_visible(data_t *data, int x, int y)
> > > return true;
> > > }
> > >
> > > +static void restore_image(data_t *data)
> > > +{
> > > + cairo_t *cr;
> > > +
> > > + cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> > > + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
> > > + cairo_set_source_surface(cr, data->surface, 0, 0);
> > > + cairo_rectangle(cr, 0, 0, data->screenw, data->screenh);
> > > + cairo_fill(cr);
> > > + igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> > > + gem_sync(data->drm_fd, data->primary_fb.gem_handle);
> >
> > This is a generic KMS test, gem_sync() is not supported.
>
> Idea here was to make certain memory copied to FB is really there. I
> did ask from Mika for ideas and he suggested changing domain to cause
> synchronization, in ioctl_wrappers.c at gem_set_domain() comments
> suggested to use gem_sync() instead.
Then you are trying to paper over real bugs. Userspace calls dirtyfb to
declare it has updated the fb, the kernel then has to take care of
making sure it is coherent prior to the next flip, or worry more if it
is already on the scanout.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error
2019-11-29 20:08 ` Chris Wilson
@ 2019-11-29 20:38 ` Juha-Pekka Heikkila
2019-11-29 20:44 ` Ville Syrjälä
0 siblings, 1 reply; 19+ messages in thread
From: Juha-Pekka Heikkila @ 2019-11-29 20:38 UTC (permalink / raw)
To: Chris Wilson; +Cc: igt-dev
On 29.11.2019 22.08, Chris Wilson wrote:
> Quoting Juha-Pekka Heikkilä (2019-11-29 19:57:48)
>> On Fri, Nov 29, 2019 at 6:04 PM Chris Wilson <chris@chris-wilson.co.uk> wrote:
>>>
>>> Quoting Juha-Pekka Heikkila (2019-11-29 15:52:45)
>>>> Having crc running continuously cause this test sometime
>>>> fill crc buffer, fix this problem as well as do some generic
>>>> cleanups.
>>>>
>>>> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
>>>> ---
>>>> tests/kms_cursor_crc.c | 106 +++++++++++++++++++++++++------------------------
>>>> 1 file changed, 54 insertions(+), 52 deletions(-)
>>>>
>>>> diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
>>>> index 6c4c457..6982437 100644
>>>> --- a/tests/kms_cursor_crc.c
>>>> +++ b/tests/kms_cursor_crc.c
>>>> @@ -52,7 +52,6 @@ typedef struct {
>>>> struct igt_fb fb;
>>>> igt_output_t *output;
>>>> enum pipe pipe;
>>>> - igt_crc_t ref_crc;
>>>> int left, right, top, bottom;
>>>> int screenw, screenh;
>>>> int refresh;
>>>> @@ -60,6 +59,9 @@ typedef struct {
>>>> int cursor_max_w, cursor_max_h;
>>>> igt_pipe_crc_t *pipe_crc;
>>>> unsigned flags;
>>>> + igt_plane_t *primary;
>>>> + igt_plane_t *cursor;
>>>> + cairo_surface_t *surface;
>>>> } data_t;
>>>>
>>>> #define TEST_DPMS (1<<0)
>>>> @@ -89,23 +91,15 @@ static void draw_cursor(cairo_t *cr, int x, int y, int cw, int ch, double a)
>>>>
>>>> static void cursor_enable(data_t *data)
>>>> {
>>>> - igt_output_t *output = data->output;
>>>> - igt_plane_t *cursor =
>>>> - igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
>>>> -
>>>> - igt_plane_set_fb(cursor, &data->fb);
>>>> - igt_plane_set_size(cursor, data->curw, data->curh);
>>>> - igt_fb_set_size(&data->fb, cursor, data->curw, data->curh);
>>>> + igt_plane_set_fb(data->cursor, &data->fb);
>>>> + igt_plane_set_size(data->cursor, data->curw, data->curh);
>>>> + igt_fb_set_size(&data->fb, data->cursor, data->curw, data->curh);
>>>> }
>>>>
>>>> static void cursor_disable(data_t *data)
>>>> {
>>>> - igt_output_t *output = data->output;
>>>> - igt_plane_t *cursor =
>>>> - igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
>>>> -
>>>> - igt_plane_set_fb(cursor, NULL);
>>>> - igt_plane_set_position(cursor, 0, 0);
>>>> + igt_plane_set_fb(data->cursor, NULL);
>>>> + igt_plane_set_position(data->cursor, 0, 0);
>>>> }
>>>>
>>>> static bool chv_cursor_broken(data_t *data, int x)
>>>> @@ -144,30 +138,40 @@ static bool cursor_visible(data_t *data, int x, int y)
>>>> return true;
>>>> }
>>>>
>>>> +static void restore_image(data_t *data)
>>>> +{
>>>> + cairo_t *cr;
>>>> +
>>>> + cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
>>>> + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
>>>> + cairo_set_source_surface(cr, data->surface, 0, 0);
>>>> + cairo_rectangle(cr, 0, 0, data->screenw, data->screenh);
>>>> + cairo_fill(cr);
>>>> + igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
>>>> + gem_sync(data->drm_fd, data->primary_fb.gem_handle);
>>>
>>> This is a generic KMS test, gem_sync() is not supported.
>>
>> Idea here was to make certain memory copied to FB is really there. I
>> did ask from Mika for ideas and he suggested changing domain to cause
>> synchronization, in ioctl_wrappers.c at gem_set_domain() comments
>> suggested to use gem_sync() instead.
>
> Then you are trying to paper over real bugs. Userspace calls dirtyfb to
> declare it has updated the fb, the kernel then has to take care of
> making sure it is coherent prior to the next flip, or worry more if it
> is already on the scanout.
I did talk with Ville about this and Ville said there's no guarantee in
IGT for this synchronization. I do set FB as dirty in my code because I
use only one FB, I set this for case when FBC is in use. I'm not
familiar with workings of gem here but looking at tearing on my screen I
got the idea when igt_put_cairo_ctx() finishes memory being copied is
not necessarily yet all copied.
/Juha-Pekka
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error
2019-11-29 20:38 ` Juha-Pekka Heikkila
@ 2019-11-29 20:44 ` Ville Syrjälä
2019-12-04 17:50 ` Ville Syrjälä
0 siblings, 1 reply; 19+ messages in thread
From: Ville Syrjälä @ 2019-11-29 20:44 UTC (permalink / raw)
To: Juha-Pekka Heikkila; +Cc: igt-dev
On Fri, Nov 29, 2019 at 10:38:16PM +0200, Juha-Pekka Heikkila wrote:
> On 29.11.2019 22.08, Chris Wilson wrote:
> > Quoting Juha-Pekka Heikkilä (2019-11-29 19:57:48)
> >> On Fri, Nov 29, 2019 at 6:04 PM Chris Wilson <chris@chris-wilson.co.uk> wrote:
> >>>
> >>> Quoting Juha-Pekka Heikkila (2019-11-29 15:52:45)
> >>>> Having crc running continuously cause this test sometime
> >>>> fill crc buffer, fix this problem as well as do some generic
> >>>> cleanups.
> >>>>
> >>>> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> >>>> ---
> >>>> tests/kms_cursor_crc.c | 106 +++++++++++++++++++++++++------------------------
> >>>> 1 file changed, 54 insertions(+), 52 deletions(-)
> >>>>
> >>>> diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
> >>>> index 6c4c457..6982437 100644
> >>>> --- a/tests/kms_cursor_crc.c
> >>>> +++ b/tests/kms_cursor_crc.c
> >>>> @@ -52,7 +52,6 @@ typedef struct {
> >>>> struct igt_fb fb;
> >>>> igt_output_t *output;
> >>>> enum pipe pipe;
> >>>> - igt_crc_t ref_crc;
> >>>> int left, right, top, bottom;
> >>>> int screenw, screenh;
> >>>> int refresh;
> >>>> @@ -60,6 +59,9 @@ typedef struct {
> >>>> int cursor_max_w, cursor_max_h;
> >>>> igt_pipe_crc_t *pipe_crc;
> >>>> unsigned flags;
> >>>> + igt_plane_t *primary;
> >>>> + igt_plane_t *cursor;
> >>>> + cairo_surface_t *surface;
> >>>> } data_t;
> >>>>
> >>>> #define TEST_DPMS (1<<0)
> >>>> @@ -89,23 +91,15 @@ static void draw_cursor(cairo_t *cr, int x, int y, int cw, int ch, double a)
> >>>>
> >>>> static void cursor_enable(data_t *data)
> >>>> {
> >>>> - igt_output_t *output = data->output;
> >>>> - igt_plane_t *cursor =
> >>>> - igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
> >>>> -
> >>>> - igt_plane_set_fb(cursor, &data->fb);
> >>>> - igt_plane_set_size(cursor, data->curw, data->curh);
> >>>> - igt_fb_set_size(&data->fb, cursor, data->curw, data->curh);
> >>>> + igt_plane_set_fb(data->cursor, &data->fb);
> >>>> + igt_plane_set_size(data->cursor, data->curw, data->curh);
> >>>> + igt_fb_set_size(&data->fb, data->cursor, data->curw, data->curh);
> >>>> }
> >>>>
> >>>> static void cursor_disable(data_t *data)
> >>>> {
> >>>> - igt_output_t *output = data->output;
> >>>> - igt_plane_t *cursor =
> >>>> - igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
> >>>> -
> >>>> - igt_plane_set_fb(cursor, NULL);
> >>>> - igt_plane_set_position(cursor, 0, 0);
> >>>> + igt_plane_set_fb(data->cursor, NULL);
> >>>> + igt_plane_set_position(data->cursor, 0, 0);
> >>>> }
> >>>>
> >>>> static bool chv_cursor_broken(data_t *data, int x)
> >>>> @@ -144,30 +138,40 @@ static bool cursor_visible(data_t *data, int x, int y)
> >>>> return true;
> >>>> }
> >>>>
> >>>> +static void restore_image(data_t *data)
> >>>> +{
> >>>> + cairo_t *cr;
> >>>> +
> >>>> + cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> >>>> + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
> >>>> + cairo_set_source_surface(cr, data->surface, 0, 0);
> >>>> + cairo_rectangle(cr, 0, 0, data->screenw, data->screenh);
> >>>> + cairo_fill(cr);
> >>>> + igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> >>>> + gem_sync(data->drm_fd, data->primary_fb.gem_handle);
> >>>
> >>> This is a generic KMS test, gem_sync() is not supported.
> >>
> >> Idea here was to make certain memory copied to FB is really there. I
> >> did ask from Mika for ideas and he suggested changing domain to cause
> >> synchronization, in ioctl_wrappers.c at gem_set_domain() comments
> >> suggested to use gem_sync() instead.
> >
> > Then you are trying to paper over real bugs. Userspace calls dirtyfb to
> > declare it has updated the fb, the kernel then has to take care of
> > making sure it is coherent prior to the next flip, or worry more if it
> > is already on the scanout.
>
> I did talk with Ville about this and Ville said there's no guarantee in
> IGT for this synchronization.
We already have the gem_sync() in igt_fb for the cases where we
convert via render/blitter engine. What we seem to be missing is
the set_domain(.write_domain=0) for the cpu gtt path. The dirtyfb
is only done for dumb fbs for whatever reason.
--
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error
2019-11-29 20:44 ` Ville Syrjälä
@ 2019-12-04 17:50 ` Ville Syrjälä
2019-12-04 17:57 ` Chris Wilson
0 siblings, 1 reply; 19+ messages in thread
From: Ville Syrjälä @ 2019-12-04 17:50 UTC (permalink / raw)
To: Juha-Pekka Heikkila; +Cc: igt-dev
On Fri, Nov 29, 2019 at 10:44:35PM +0200, Ville Syrjälä wrote:
> On Fri, Nov 29, 2019 at 10:38:16PM +0200, Juha-Pekka Heikkila wrote:
> > On 29.11.2019 22.08, Chris Wilson wrote:
> > > Quoting Juha-Pekka Heikkilä (2019-11-29 19:57:48)
> > >> On Fri, Nov 29, 2019 at 6:04 PM Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > >>>
> > >>> Quoting Juha-Pekka Heikkila (2019-11-29 15:52:45)
> > >>>> Having crc running continuously cause this test sometime
> > >>>> fill crc buffer, fix this problem as well as do some generic
> > >>>> cleanups.
> > >>>>
> > >>>> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> > >>>> ---
> > >>>> tests/kms_cursor_crc.c | 106 +++++++++++++++++++++++++------------------------
> > >>>> 1 file changed, 54 insertions(+), 52 deletions(-)
> > >>>>
> > >>>> diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
> > >>>> index 6c4c457..6982437 100644
> > >>>> --- a/tests/kms_cursor_crc.c
> > >>>> +++ b/tests/kms_cursor_crc.c
> > >>>> @@ -52,7 +52,6 @@ typedef struct {
> > >>>> struct igt_fb fb;
> > >>>> igt_output_t *output;
> > >>>> enum pipe pipe;
> > >>>> - igt_crc_t ref_crc;
> > >>>> int left, right, top, bottom;
> > >>>> int screenw, screenh;
> > >>>> int refresh;
> > >>>> @@ -60,6 +59,9 @@ typedef struct {
> > >>>> int cursor_max_w, cursor_max_h;
> > >>>> igt_pipe_crc_t *pipe_crc;
> > >>>> unsigned flags;
> > >>>> + igt_plane_t *primary;
> > >>>> + igt_plane_t *cursor;
> > >>>> + cairo_surface_t *surface;
> > >>>> } data_t;
> > >>>>
> > >>>> #define TEST_DPMS (1<<0)
> > >>>> @@ -89,23 +91,15 @@ static void draw_cursor(cairo_t *cr, int x, int y, int cw, int ch, double a)
> > >>>>
> > >>>> static void cursor_enable(data_t *data)
> > >>>> {
> > >>>> - igt_output_t *output = data->output;
> > >>>> - igt_plane_t *cursor =
> > >>>> - igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
> > >>>> -
> > >>>> - igt_plane_set_fb(cursor, &data->fb);
> > >>>> - igt_plane_set_size(cursor, data->curw, data->curh);
> > >>>> - igt_fb_set_size(&data->fb, cursor, data->curw, data->curh);
> > >>>> + igt_plane_set_fb(data->cursor, &data->fb);
> > >>>> + igt_plane_set_size(data->cursor, data->curw, data->curh);
> > >>>> + igt_fb_set_size(&data->fb, data->cursor, data->curw, data->curh);
> > >>>> }
> > >>>>
> > >>>> static void cursor_disable(data_t *data)
> > >>>> {
> > >>>> - igt_output_t *output = data->output;
> > >>>> - igt_plane_t *cursor =
> > >>>> - igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
> > >>>> -
> > >>>> - igt_plane_set_fb(cursor, NULL);
> > >>>> - igt_plane_set_position(cursor, 0, 0);
> > >>>> + igt_plane_set_fb(data->cursor, NULL);
> > >>>> + igt_plane_set_position(data->cursor, 0, 0);
> > >>>> }
> > >>>>
> > >>>> static bool chv_cursor_broken(data_t *data, int x)
> > >>>> @@ -144,30 +138,40 @@ static bool cursor_visible(data_t *data, int x, int y)
> > >>>> return true;
> > >>>> }
> > >>>>
> > >>>> +static void restore_image(data_t *data)
> > >>>> +{
> > >>>> + cairo_t *cr;
> > >>>> +
> > >>>> + cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> > >>>> + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
> > >>>> + cairo_set_source_surface(cr, data->surface, 0, 0);
> > >>>> + cairo_rectangle(cr, 0, 0, data->screenw, data->screenh);
> > >>>> + cairo_fill(cr);
> > >>>> + igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> > >>>> + gem_sync(data->drm_fd, data->primary_fb.gem_handle);
> > >>>
> > >>> This is a generic KMS test, gem_sync() is not supported.
> > >>
> > >> Idea here was to make certain memory copied to FB is really there. I
> > >> did ask from Mika for ideas and he suggested changing domain to cause
> > >> synchronization, in ioctl_wrappers.c at gem_set_domain() comments
> > >> suggested to use gem_sync() instead.
> > >
> > > Then you are trying to paper over real bugs. Userspace calls dirtyfb to
> > > declare it has updated the fb, the kernel then has to take care of
> > > making sure it is coherent prior to the next flip, or worry more if it
> > > is already on the scanout.
> >
> > I did talk with Ville about this and Ville said there's no guarantee in
> > IGT for this synchronization.
>
> We already have the gem_sync() in igt_fb for the cases where we
> convert via render/blitter engine. What we seem to be missing is
> the set_domain(.write_domain=0) for the cpu gtt path. The dirtyfb
> is only done for dumb fbs for whatever reason.
Hmm. Looks like set_domain(GTT, GTT) + set_domain(GTT, 0)
won't even flush the gtt write domain anymore? A change introduced
in commit ef74921bc679 ("drm/i915: Combine write_domain flushes
to a single function") if I'm reading the logs correctly.
So I guess we now need the dirtyfb (or sw_finish) ioctl. That
should end up doing the wc/chipset flushes we want.
Though now I'm left wondering how we would do this had we
used the cpu write domain. AFAICS the flush_if_display() thing
will always do the clflush asynchronously, but here we
want a sync flush since we need the display engine to see
the new data asap. I wonder if we have any frontbuffer
rendering tests that can actually hit this...
--
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error
2019-12-04 17:50 ` Ville Syrjälä
@ 2019-12-04 17:57 ` Chris Wilson
0 siblings, 0 replies; 19+ messages in thread
From: Chris Wilson @ 2019-12-04 17:57 UTC (permalink / raw)
To: Juha-Pekka Heikkila, Ville Syrjälä; +Cc: igt-dev
Quoting Ville Syrjälä (2019-12-04 17:50:30)
> On Fri, Nov 29, 2019 at 10:44:35PM +0200, Ville Syrjälä wrote:
> > On Fri, Nov 29, 2019 at 10:38:16PM +0200, Juha-Pekka Heikkila wrote:
> > > On 29.11.2019 22.08, Chris Wilson wrote:
> > > > Quoting Juha-Pekka Heikkilä (2019-11-29 19:57:48)
> > > >> On Fri, Nov 29, 2019 at 6:04 PM Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > > >>>
> > > >>> Quoting Juha-Pekka Heikkila (2019-11-29 15:52:45)
> > > >>>> Having crc running continuously cause this test sometime
> > > >>>> fill crc buffer, fix this problem as well as do some generic
> > > >>>> cleanups.
> > > >>>>
> > > >>>> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> > > >>>> ---
> > > >>>> tests/kms_cursor_crc.c | 106 +++++++++++++++++++++++++------------------------
> > > >>>> 1 file changed, 54 insertions(+), 52 deletions(-)
> > > >>>>
> > > >>>> diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
> > > >>>> index 6c4c457..6982437 100644
> > > >>>> --- a/tests/kms_cursor_crc.c
> > > >>>> +++ b/tests/kms_cursor_crc.c
> > > >>>> @@ -52,7 +52,6 @@ typedef struct {
> > > >>>> struct igt_fb fb;
> > > >>>> igt_output_t *output;
> > > >>>> enum pipe pipe;
> > > >>>> - igt_crc_t ref_crc;
> > > >>>> int left, right, top, bottom;
> > > >>>> int screenw, screenh;
> > > >>>> int refresh;
> > > >>>> @@ -60,6 +59,9 @@ typedef struct {
> > > >>>> int cursor_max_w, cursor_max_h;
> > > >>>> igt_pipe_crc_t *pipe_crc;
> > > >>>> unsigned flags;
> > > >>>> + igt_plane_t *primary;
> > > >>>> + igt_plane_t *cursor;
> > > >>>> + cairo_surface_t *surface;
> > > >>>> } data_t;
> > > >>>>
> > > >>>> #define TEST_DPMS (1<<0)
> > > >>>> @@ -89,23 +91,15 @@ static void draw_cursor(cairo_t *cr, int x, int y, int cw, int ch, double a)
> > > >>>>
> > > >>>> static void cursor_enable(data_t *data)
> > > >>>> {
> > > >>>> - igt_output_t *output = data->output;
> > > >>>> - igt_plane_t *cursor =
> > > >>>> - igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
> > > >>>> -
> > > >>>> - igt_plane_set_fb(cursor, &data->fb);
> > > >>>> - igt_plane_set_size(cursor, data->curw, data->curh);
> > > >>>> - igt_fb_set_size(&data->fb, cursor, data->curw, data->curh);
> > > >>>> + igt_plane_set_fb(data->cursor, &data->fb);
> > > >>>> + igt_plane_set_size(data->cursor, data->curw, data->curh);
> > > >>>> + igt_fb_set_size(&data->fb, data->cursor, data->curw, data->curh);
> > > >>>> }
> > > >>>>
> > > >>>> static void cursor_disable(data_t *data)
> > > >>>> {
> > > >>>> - igt_output_t *output = data->output;
> > > >>>> - igt_plane_t *cursor =
> > > >>>> - igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
> > > >>>> -
> > > >>>> - igt_plane_set_fb(cursor, NULL);
> > > >>>> - igt_plane_set_position(cursor, 0, 0);
> > > >>>> + igt_plane_set_fb(data->cursor, NULL);
> > > >>>> + igt_plane_set_position(data->cursor, 0, 0);
> > > >>>> }
> > > >>>>
> > > >>>> static bool chv_cursor_broken(data_t *data, int x)
> > > >>>> @@ -144,30 +138,40 @@ static bool cursor_visible(data_t *data, int x, int y)
> > > >>>> return true;
> > > >>>> }
> > > >>>>
> > > >>>> +static void restore_image(data_t *data)
> > > >>>> +{
> > > >>>> + cairo_t *cr;
> > > >>>> +
> > > >>>> + cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
> > > >>>> + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
> > > >>>> + cairo_set_source_surface(cr, data->surface, 0, 0);
> > > >>>> + cairo_rectangle(cr, 0, 0, data->screenw, data->screenh);
> > > >>>> + cairo_fill(cr);
> > > >>>> + igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr);
> > > >>>> + gem_sync(data->drm_fd, data->primary_fb.gem_handle);
> > > >>>
> > > >>> This is a generic KMS test, gem_sync() is not supported.
> > > >>
> > > >> Idea here was to make certain memory copied to FB is really there. I
> > > >> did ask from Mika for ideas and he suggested changing domain to cause
> > > >> synchronization, in ioctl_wrappers.c at gem_set_domain() comments
> > > >> suggested to use gem_sync() instead.
> > > >
> > > > Then you are trying to paper over real bugs. Userspace calls dirtyfb to
> > > > declare it has updated the fb, the kernel then has to take care of
> > > > making sure it is coherent prior to the next flip, or worry more if it
> > > > is already on the scanout.
> > >
> > > I did talk with Ville about this and Ville said there's no guarantee in
> > > IGT for this synchronization.
> >
> > We already have the gem_sync() in igt_fb for the cases where we
> > convert via render/blitter engine. What we seem to be missing is
> > the set_domain(.write_domain=0) for the cpu gtt path. The dirtyfb
> > is only done for dumb fbs for whatever reason.
>
> Hmm. Looks like set_domain(GTT, GTT) + set_domain(GTT, 0)
> won't even flush the gtt write domain anymore?
Not anymore, it should never have flushed iirc.
The logic was only every about flushing incompatible domains, and would
not have flagged the second as an incompatible request with the current
write_domain.
> A change introduced
> in commit ef74921bc679 ("drm/i915: Combine write_domain flushes
> to a single function") if I'm reading the logs correctly.
>
> So I guess we now need the dirtyfb (or sw_finish) ioctl. That
> should end up doing the wc/chipset flushes we want.
>
> Though now I'm left wondering how we would do this had we
> used the cpu write domain. AFAICS the flush_if_display() thing
> will always do the clflush asynchronously, but here we
> want a sync flush since we need the display engine to see
> the new data asap. I wonder if we have any frontbuffer
> rendering tests that can actually hit this...
clflush on scanout itself is unserialised with the HW, so whether it is
done immediately or in a worker does not seem material. You can request
a wait again with set-domain, or gem_wait to block on the clflush and
all other rendering. I suppose.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2019-12-30 10:02 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-11 20:09 [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error Juha-Pekka Heikkila
2019-12-11 21:11 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_cursor_crc: Fix user space read too slow error (rev4) Patchwork
2019-12-12 7:19 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-12-12 11:38 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
2019-12-18 11:44 ` [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Fix user space read too slow error Kahola, Mika
-- strict thread matches above, loose matches on Subject: below --
2019-12-18 14:53 Juha-Pekka Heikkila
2019-12-30 10:02 ` Lisovskiy, Stanislav
2019-12-09 13:19 Juha-Pekka Heikkila
2019-12-10 11:53 ` Kahola, Mika
2019-12-10 12:54 ` Juha-Pekka Heikkila
2019-12-10 14:19 ` Kahola, Mika
2019-11-29 15:52 Juha-Pekka Heikkila
2019-11-29 16:03 ` Chris Wilson
2019-11-29 19:57 ` Juha-Pekka Heikkilä
2019-11-29 20:08 ` Chris Wilson
2019-11-29 20:38 ` Juha-Pekka Heikkila
2019-11-29 20:44 ` Ville Syrjälä
2019-12-04 17:50 ` Ville Syrjälä
2019-12-04 17:57 ` Chris Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox