* [igt-dev] [PATCH i-g-t 1/2] lib/igt_debugfs: Fix igt_pipe_get_crcs.
@ 2018-02-15 12:33 Maarten Lankhorst
2018-02-15 12:34 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_chv_cursor_fail: Use igt_display_reset() and igt_pipe_crc_drain() Maarten Lankhorst
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Maarten Lankhorst @ 2018-02-15 12:33 UTC (permalink / raw)
To: igt-dev
read_crc returns an error instead of 0 on timeout now, so handle
this correctly. This is a small error introduced in
commit 7d48c0252c384d18318de89c54817bdfe9c832fc
Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Date: Fri Feb 2 13:34:25 2018 +0100
lib/igt_debugfs: Add igt_pipe_crc_get_single and igt_pipe_crc_drain, v4.
It causes the kms_chv_cursor_fail to take 27 minutes, so fix this..
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
lib/igt_debugfs.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index e2b15f9bda0b..4a119985f102 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -794,10 +794,11 @@ igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs,
int ret;
ret = read_crc(pipe_crc, crc);
+ if (ret == -EAGAIN)
+ break;
+
if (ret < 0)
continue;
- if (ret == 0)
- break;
n++;
} while (n < n_crcs);
--
2.16.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [igt-dev] [PATCH i-g-t 2/2] tests/kms_chv_cursor_fail: Use igt_display_reset() and igt_pipe_crc_drain()
2018-02-15 12:33 [igt-dev] [PATCH i-g-t 1/2] lib/igt_debugfs: Fix igt_pipe_get_crcs Maarten Lankhorst
@ 2018-02-15 12:34 ` Maarten Lankhorst
2018-02-20 12:30 ` Daniel Vetter
2018-02-15 12:49 ` [igt-dev] [PATCH i-g-t 1/2] lib/igt_debugfs: Fix igt_pipe_get_crcs Petri Latvala
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Maarten Lankhorst @ 2018-02-15 12:34 UTC (permalink / raw)
To: igt-dev
This reduces the amount of state to reset on each preparation, and allows
us to keep CRC enabled. With 2 outputs on KBL the test time goes from
approximately 9.2s to 7s on KBL.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
tests/kms_chv_cursor_fail.c | 60 ++++++++++++++-------------------------------
1 file changed, 18 insertions(+), 42 deletions(-)
diff --git a/tests/kms_chv_cursor_fail.c b/tests/kms_chv_cursor_fail.c
index 1bcf8469088e..ffbe39d0c41b 100644
--- a/tests/kms_chv_cursor_fail.c
+++ b/tests/kms_chv_cursor_fail.c
@@ -60,15 +60,6 @@ enum {
EDGE_BOTTOM = 0x8,
};
-static void cursor_disable(data_t *data)
-{
- igt_output_t *output = data->output;
- igt_plane_t *cursor;
-
- cursor = igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
- igt_plane_set_fb(cursor, NULL);
-}
-
static void create_cursor_fb(data_t *data, int cur_w, int cur_h)
{
cairo_t *cr;
@@ -123,7 +114,7 @@ static void test_edge_pos(data_t *data, int sx, int ex, int y, bool swap_axis)
dx = (ex - sx)/XSTEP;
- igt_pipe_crc_start(data->pipe_crc);
+ igt_pipe_crc_drain(data->pipe_crc);
i = 0;
@@ -154,7 +145,6 @@ static void test_edge_pos(data_t *data, int sx, int ex, int y, bool swap_axis)
}
n = igt_pipe_crc_get_crcs(data->pipe_crc, NCRC, &crc);
- igt_pipe_crc_stop(data->pipe_crc);
if (!data->colored) {
igt_debug("Checking CRCs: ");
@@ -225,15 +215,27 @@ static void test_edges(data_t *data, unsigned int edges)
}
}
+static void cleanup_crtc(data_t *data)
+{
+ igt_display_t *display = &data->display;
+
+ igt_display_reset(display);
+ igt_pipe_crc_free(data->pipe_crc);
+ data->pipe_crc = NULL;
+
+ igt_remove_fb(data->drm_fd, &data->primary_fb);
+}
+
static void prepare_crtc(data_t *data)
{
drmModeModeInfo *mode;
igt_display_t *display = &data->display;
igt_plane_t *primary;
+ cleanup_crtc(data);
+
/* select the pipe we want to use */
igt_output_set_pipe(data->output, data->pipe);
- cursor_disable(data);
mode = igt_output_get_mode(data->output);
igt_create_pattern_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
@@ -250,37 +252,12 @@ static void prepare_crtc(data_t *data)
data->jump_y = (mode->vdisplay - data->curh) / 2;
/* create the pipe_crc object for this pipe */
- if (data->pipe_crc)
- igt_pipe_crc_free(data->pipe_crc);
-
data->pipe_crc = igt_pipe_crc_new_nonblock(data->drm_fd, data->pipe,
INTEL_PIPE_CRC_SOURCE_AUTO);
- /* make sure cursor is disabled */
- cursor_disable(data);
- igt_wait_for_vblank(data->drm_fd, data->pipe);
-
/* get reference crc w/o cursor */
- igt_pipe_crc_collect_crc(data->pipe_crc, &data->ref_crc);
- igt_pipe_crc_collect_crc(data->pipe_crc, &data->ref_crc);
- igt_pipe_crc_collect_crc(data->pipe_crc, &data->ref_crc);
-}
-
-static void cleanup_crtc(data_t *data)
-{
- igt_display_t *display = &data->display;
- igt_plane_t *primary;
-
- igt_pipe_crc_free(data->pipe_crc);
- data->pipe_crc = NULL;
-
- igt_remove_fb(data->drm_fd, &data->primary_fb);
-
- primary = igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_PRIMARY);
- igt_plane_set_fb(primary, NULL);
-
- igt_output_set_pipe(data->output, PIPE_ANY);
- igt_display_commit(display);
+ igt_pipe_crc_start(data->pipe_crc);
+ igt_assert(igt_pipe_crc_get_single(data->pipe_crc, &data->ref_crc));
}
static void test_crtc(data_t *data, unsigned int edges)
@@ -288,6 +265,8 @@ static void test_crtc(data_t *data, unsigned int edges)
igt_display_t *display = &data->display;
int valid_tests = 0;
+ cleanup_crtc(data);
+
create_cursor_fb(data, data->curw, data->curh);
for_each_valid_output_on_pipe(display, data->pipe, data->output) {
@@ -306,9 +285,6 @@ static void test_crtc(data_t *data, unsigned int edges)
igt_subtest_name(),
kmstest_pipe_name(data->pipe),
igt_output_name(data->output));
-
- /* cleanup what prepare_crtc() has done */
- cleanup_crtc(data);
}
igt_remove_fb(data->drm_fd, &data->fb);
--
2.16.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] lib/igt_debugfs: Fix igt_pipe_get_crcs.
2018-02-15 12:33 [igt-dev] [PATCH i-g-t 1/2] lib/igt_debugfs: Fix igt_pipe_get_crcs Maarten Lankhorst
2018-02-15 12:34 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_chv_cursor_fail: Use igt_display_reset() and igt_pipe_crc_drain() Maarten Lankhorst
@ 2018-02-15 12:49 ` Petri Latvala
2018-02-15 13:53 ` Maarten Lankhorst
2018-02-15 15:47 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] " Patchwork
2018-02-16 1:04 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
3 siblings, 1 reply; 7+ messages in thread
From: Petri Latvala @ 2018-02-15 12:49 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: igt-dev
On Thu, Feb 15, 2018 at 01:33:59PM +0100, Maarten Lankhorst wrote:
> read_crc returns an error instead of 0 on timeout now, so handle
> this correctly. This is a small error introduced in
>
> commit 7d48c0252c384d18318de89c54817bdfe9c832fc
> Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Date: Fri Feb 2 13:34:25 2018 +0100
>
> lib/igt_debugfs: Add igt_pipe_crc_get_single and igt_pipe_crc_drain, v4.
>
> It causes the kms_chv_cursor_fail to take 27 minutes, so fix this..
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
> ---
> lib/igt_debugfs.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
> index e2b15f9bda0b..4a119985f102 100644
> --- a/lib/igt_debugfs.c
> +++ b/lib/igt_debugfs.c
> @@ -794,10 +794,11 @@ igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs,
> int ret;
>
> ret = read_crc(pipe_crc, crc);
> + if (ret == -EAGAIN)
> + break;
> +
> if (ret < 0)
> continue;
> - if (ret == 0)
> - break;
>
> n++;
> } while (n < n_crcs);
> --
> 2.16.1
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] lib/igt_debugfs: Fix igt_pipe_get_crcs.
2018-02-15 12:49 ` [igt-dev] [PATCH i-g-t 1/2] lib/igt_debugfs: Fix igt_pipe_get_crcs Petri Latvala
@ 2018-02-15 13:53 ` Maarten Lankhorst
0 siblings, 0 replies; 7+ messages in thread
From: Maarten Lankhorst @ 2018-02-15 13:53 UTC (permalink / raw)
To: igt-dev
Op 15-02-18 om 13:49 schreef Petri Latvala:
> On Thu, Feb 15, 2018 at 01:33:59PM +0100, Maarten Lankhorst wrote:
>> read_crc returns an error instead of 0 on timeout now, so handle
>> this correctly. This is a small error introduced in
>>
>> commit 7d48c0252c384d18318de89c54817bdfe9c832fc
>> Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> Date: Fri Feb 2 13:34:25 2018 +0100
>>
>> lib/igt_debugfs: Add igt_pipe_crc_get_single and igt_pipe_crc_drain, v4.
>>
>> It causes the kms_chv_cursor_fail to take 27 minutes, so fix this..
>>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
>
>
>> ---
>> lib/igt_debugfs.c | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
>> index e2b15f9bda0b..4a119985f102 100644
>> --- a/lib/igt_debugfs.c
>> +++ b/lib/igt_debugfs.c
>> @@ -794,10 +794,11 @@ igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs,
>> int ret;
>>
>> ret = read_crc(pipe_crc, crc);
>> + if (ret == -EAGAIN)
>> + break;
>> +
>> if (ret < 0)
>> continue;
>> - if (ret == 0)
>> - break;
>>
>> n++;
>> } while (n < n_crcs);
>> --
>> 2.16.1
>>
>> _______________________________________________
>> igt-dev mailing list
>> igt-dev@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/igt-dev
Pushed first patch, thanks.
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/igt_debugfs: Fix igt_pipe_get_crcs.
2018-02-15 12:33 [igt-dev] [PATCH i-g-t 1/2] lib/igt_debugfs: Fix igt_pipe_get_crcs Maarten Lankhorst
2018-02-15 12:34 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_chv_cursor_fail: Use igt_display_reset() and igt_pipe_crc_drain() Maarten Lankhorst
2018-02-15 12:49 ` [igt-dev] [PATCH i-g-t 1/2] lib/igt_debugfs: Fix igt_pipe_get_crcs Petri Latvala
@ 2018-02-15 15:47 ` Patchwork
2018-02-16 1:04 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2018-02-15 15:47 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: igt-dev
== Series Details ==
Series: series starting with [i-g-t,1/2] lib/igt_debugfs: Fix igt_pipe_get_crcs.
URL : https://patchwork.freedesktop.org/series/38361/
State : success
== Summary ==
IGT patchset tested on top of latest successful build
f2ac5601be25c683e89f7b6ee704c1b1b9eb1b30 tests/perf_pmu: Log perf timestamp in semaphore wait tests
with latest DRM-Tip kernel build CI_DRM_3779
6b3cedfad753 drm-tip: 2018y-02m-15d-15h-04m-33s UTC integration manifest
No testlist changes.
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
pass -> FAIL (fi-skl-6700k2) fdo#103191
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:418s
fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:428s
fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:381s
fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:497s
fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:289s
fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:483s
fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:490s
fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:474s
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:466s
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:573s
fi-elk-e7500 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:408s
fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:287s
fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:510s
fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:391s
fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:416s
fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:460s
fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:414s
fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:460s
fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:499s
fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:458s
fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:504s
fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:584s
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:431s
fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:506s
fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:531s
fi-skl-6700k2 total:288 pass:263 dwarn:0 dfail:0 fail:1 skip:24 time:478s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:485s
fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:419s
fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:436s
fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:532s
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:399s
Blacklisted hosts:
fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:476s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_926/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] lib/igt_debugfs: Fix igt_pipe_get_crcs.
2018-02-15 12:33 [igt-dev] [PATCH i-g-t 1/2] lib/igt_debugfs: Fix igt_pipe_get_crcs Maarten Lankhorst
` (2 preceding siblings ...)
2018-02-15 15:47 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] " Patchwork
@ 2018-02-16 1:04 ` Patchwork
3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2018-02-16 1:04 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: igt-dev
== Series Details ==
Series: series starting with [i-g-t,1/2] lib/igt_debugfs: Fix igt_pipe_get_crcs.
URL : https://patchwork.freedesktop.org/series/38361/
State : success
== Summary ==
Test kms_cursor_crc:
Subgroup cursor-128x128-suspend:
skip -> PASS (shard-snb) fdo#103880
Test gem_eio:
Subgroup in-flight-external:
fail -> PASS (shard-hsw) fdo#104676 +1
Subgroup in-flight-contexts:
dmesg-warn -> PASS (shard-snb) fdo#104058
Test kms_atomic_transition:
Subgroup 1x-modeset-transitions-nonblocking-fencing:
pass -> FAIL (shard-apl) fdo#103207
Test kms_sysfs_edid_timing:
warn -> PASS (shard-apl) fdo#100047
Test kms_rotation_crc:
Subgroup sprite-rotation-180:
fail -> PASS (shard-snb) fdo#103925 +1
fdo#103880 https://bugs.freedesktop.org/show_bug.cgi?id=103880
fdo#104676 https://bugs.freedesktop.org/show_bug.cgi?id=104676
fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058
fdo#103207 https://bugs.freedesktop.org/show_bug.cgi?id=103207
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
shard-apl total:3410 pass:1771 dwarn:1 dfail:0 fail:21 skip:1616 time:12200s
shard-hsw total:3427 pass:1759 dwarn:1 dfail:0 fail:10 skip:1656 time:11797s
shard-snb total:3427 pass:1350 dwarn:1 dfail:0 fail:10 skip:2066 time:6648s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_926/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 2/2] tests/kms_chv_cursor_fail: Use igt_display_reset() and igt_pipe_crc_drain()
2018-02-15 12:34 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_chv_cursor_fail: Use igt_display_reset() and igt_pipe_crc_drain() Maarten Lankhorst
@ 2018-02-20 12:30 ` Daniel Vetter
0 siblings, 0 replies; 7+ messages in thread
From: Daniel Vetter @ 2018-02-20 12:30 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: igt-dev
On Thu, Feb 15, 2018 at 01:34:00PM +0100, Maarten Lankhorst wrote:
> This reduces the amount of state to reset on each preparation, and allows
> us to keep CRC enabled. With 2 outputs on KBL the test time goes from
> approximately 9.2s to 7s on KBL.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
At first I thought you keep the CRC enabled even over modesets (which is
invalid, since depending upon the output type the "auto" CRC source gets
reconfigured), but that's not the case.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> tests/kms_chv_cursor_fail.c | 60 ++++++++++++++-------------------------------
> 1 file changed, 18 insertions(+), 42 deletions(-)
>
> diff --git a/tests/kms_chv_cursor_fail.c b/tests/kms_chv_cursor_fail.c
> index 1bcf8469088e..ffbe39d0c41b 100644
> --- a/tests/kms_chv_cursor_fail.c
> +++ b/tests/kms_chv_cursor_fail.c
> @@ -60,15 +60,6 @@ enum {
> EDGE_BOTTOM = 0x8,
> };
>
> -static void cursor_disable(data_t *data)
> -{
> - igt_output_t *output = data->output;
> - igt_plane_t *cursor;
> -
> - cursor = igt_output_get_plane_type(output, DRM_PLANE_TYPE_CURSOR);
> - igt_plane_set_fb(cursor, NULL);
> -}
> -
> static void create_cursor_fb(data_t *data, int cur_w, int cur_h)
> {
> cairo_t *cr;
> @@ -123,7 +114,7 @@ static void test_edge_pos(data_t *data, int sx, int ex, int y, bool swap_axis)
>
> dx = (ex - sx)/XSTEP;
>
> - igt_pipe_crc_start(data->pipe_crc);
> + igt_pipe_crc_drain(data->pipe_crc);
>
> i = 0;
>
> @@ -154,7 +145,6 @@ static void test_edge_pos(data_t *data, int sx, int ex, int y, bool swap_axis)
> }
>
> n = igt_pipe_crc_get_crcs(data->pipe_crc, NCRC, &crc);
> - igt_pipe_crc_stop(data->pipe_crc);
>
> if (!data->colored) {
> igt_debug("Checking CRCs: ");
> @@ -225,15 +215,27 @@ static void test_edges(data_t *data, unsigned int edges)
> }
> }
>
> +static void cleanup_crtc(data_t *data)
> +{
> + igt_display_t *display = &data->display;
> +
> + igt_display_reset(display);
> + igt_pipe_crc_free(data->pipe_crc);
> + data->pipe_crc = NULL;
> +
> + igt_remove_fb(data->drm_fd, &data->primary_fb);
> +}
> +
> static void prepare_crtc(data_t *data)
> {
> drmModeModeInfo *mode;
> igt_display_t *display = &data->display;
> igt_plane_t *primary;
>
> + cleanup_crtc(data);
> +
> /* select the pipe we want to use */
> igt_output_set_pipe(data->output, data->pipe);
> - cursor_disable(data);
>
> mode = igt_output_get_mode(data->output);
> igt_create_pattern_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
> @@ -250,37 +252,12 @@ static void prepare_crtc(data_t *data)
> data->jump_y = (mode->vdisplay - data->curh) / 2;
>
> /* create the pipe_crc object for this pipe */
> - if (data->pipe_crc)
> - igt_pipe_crc_free(data->pipe_crc);
> -
> data->pipe_crc = igt_pipe_crc_new_nonblock(data->drm_fd, data->pipe,
> INTEL_PIPE_CRC_SOURCE_AUTO);
>
> - /* make sure cursor is disabled */
> - cursor_disable(data);
> - igt_wait_for_vblank(data->drm_fd, data->pipe);
> -
> /* get reference crc w/o cursor */
> - igt_pipe_crc_collect_crc(data->pipe_crc, &data->ref_crc);
> - igt_pipe_crc_collect_crc(data->pipe_crc, &data->ref_crc);
> - igt_pipe_crc_collect_crc(data->pipe_crc, &data->ref_crc);
> -}
> -
> -static void cleanup_crtc(data_t *data)
> -{
> - igt_display_t *display = &data->display;
> - igt_plane_t *primary;
> -
> - igt_pipe_crc_free(data->pipe_crc);
> - data->pipe_crc = NULL;
> -
> - igt_remove_fb(data->drm_fd, &data->primary_fb);
> -
> - primary = igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_PRIMARY);
> - igt_plane_set_fb(primary, NULL);
> -
> - igt_output_set_pipe(data->output, PIPE_ANY);
> - igt_display_commit(display);
> + igt_pipe_crc_start(data->pipe_crc);
> + igt_assert(igt_pipe_crc_get_single(data->pipe_crc, &data->ref_crc));
> }
>
> static void test_crtc(data_t *data, unsigned int edges)
> @@ -288,6 +265,8 @@ static void test_crtc(data_t *data, unsigned int edges)
> igt_display_t *display = &data->display;
> int valid_tests = 0;
>
> + cleanup_crtc(data);
> +
> create_cursor_fb(data, data->curw, data->curh);
>
> for_each_valid_output_on_pipe(display, data->pipe, data->output) {
> @@ -306,9 +285,6 @@ static void test_crtc(data_t *data, unsigned int edges)
> igt_subtest_name(),
> kmstest_pipe_name(data->pipe),
> igt_output_name(data->output));
> -
> - /* cleanup what prepare_crtc() has done */
> - cleanup_crtc(data);
> }
>
> igt_remove_fb(data->drm_fd, &data->fb);
> --
> 2.16.1
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-02-20 12:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-15 12:33 [igt-dev] [PATCH i-g-t 1/2] lib/igt_debugfs: Fix igt_pipe_get_crcs Maarten Lankhorst
2018-02-15 12:34 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_chv_cursor_fail: Use igt_display_reset() and igt_pipe_crc_drain() Maarten Lankhorst
2018-02-20 12:30 ` Daniel Vetter
2018-02-15 12:49 ` [igt-dev] [PATCH i-g-t 1/2] lib/igt_debugfs: Fix igt_pipe_get_crcs Petri Latvala
2018-02-15 13:53 ` Maarten Lankhorst
2018-02-15 15:47 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] " Patchwork
2018-02-16 1:04 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.