* [igt-dev] [PATCH i-g-t 1/2] tests/kms_rotation_crc: reduce executions time on multiplane tests
@ 2021-02-17 16:03 Juha-Pekka Heikkila
2021-02-17 16:03 ` [igt-dev] [PATCH i-g-t 2/2] HAX remove rotation test from blacklist Juha-Pekka Heikkila
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Juha-Pekka Heikkila @ 2021-02-17 16:03 UTC (permalink / raw)
To: igt-dev
Reduce repetitive work and wait less. Buffer created fbs. Log counted crcs.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
tests/kms_rotation_crc.c | 223 +++++++++++++++++++++++++++------------
1 file changed, 154 insertions(+), 69 deletions(-)
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 6d4e87ed9..be3401be6 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -31,6 +31,8 @@
#define TEST_MAX_WIDTH 640
#define TEST_MAX_HEIGHT 480
#define MAX_TESTED_MODES 8
+#define MULTIPLANE_REFERENCE 0
+#define MULTIPLANE_ROTATED 1
struct p_struct {
igt_plane_t *plane;
@@ -522,26 +524,19 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
typedef struct {
int32_t x1, y1;
- uint64_t width, height, tiling, planetype, format;
+ uint64_t width, height, tiling, format;
+ igt_plane_t *plane;
igt_rotation_t rotation_sw, rotation_hw;
} planeinfos;
-static bool get_multiplane_crc(data_t *data, igt_output_t *output,
- igt_crc_t *crc_output, planeinfos *planeinfo,
- int numplanes)
+static bool setup_multiplane(data_t *data, planeinfos *planeinfo,
+ struct igt_fb *fbleft, struct igt_fb *fbright)
{
uint32_t w, h;
- igt_display_t *display = &data->display;
- struct p_struct *planes, *oldplanes;
- int c, ret;
-
- oldplanes = data->multiplaneoldview;
- planes = calloc(sizeof(*planes), numplanes);
-
- for (c = 0; c < numplanes; c++) {
- planes[c].plane = igt_output_get_plane_type(output,
- planeinfo[c].planetype);
+ struct igt_fb *planes[2] = {fbleft, fbright};
+ int c;
+ for (c = 0; c < ARRAY_SIZE(planes); c++) {
/*
* make plane and fb width and height always divisible by 4
* due to NV12 support and Intel hw workarounds.
@@ -552,34 +547,33 @@ static bool get_multiplane_crc(data_t *data, igt_output_t *output,
if (planeinfo[c].rotation_sw & (IGT_ROTATION_90 | IGT_ROTATION_270))
igt_swap(w, h);
- if (!igt_plane_has_format_mod(planes[c].plane,
+ if (!igt_plane_has_format_mod(planeinfo[c].plane,
planeinfo[c].format,
planeinfo[c].tiling))
return false;
- igt_create_fb(data->gfx_fd, w, h, planeinfo[c].format,
- planeinfo[c].tiling, &planes[c].fb);
+ /*
+ * was this hw/sw rotation ran already or need to create
+ * new fb?
+ */
+ if (planes[c]->fb_id == 0) {
+ igt_create_fb(data->gfx_fd, w, h, planeinfo[c].format,
+ planeinfo[c].tiling, planes[c]);
- paint_squares(data, planeinfo[c].rotation_sw, &planes[c].fb, 1.0f);
- igt_plane_set_fb(planes[c].plane, &planes[c].fb);
+ paint_squares(data, planeinfo[c].rotation_sw,
+ planes[c], 1.0f);
+ }
+ igt_plane_set_fb(planeinfo[c].plane, planes[c]);
if (planeinfo[c].rotation_hw & (IGT_ROTATION_90 | IGT_ROTATION_270))
- igt_plane_set_size(planes[c].plane, h, w);
-
- igt_plane_set_position(planes[c].plane, planeinfo[c].x1, planeinfo[c].y1);
- igt_plane_set_rotation(planes[c].plane, planeinfo[c].rotation_hw);
- }
-
- ret = igt_display_try_commit2(display, COMMIT_ATOMIC);
- igt_assert_eq(ret, 0);
-
- igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, crc_output);
+ igt_plane_set_size(planeinfo[c].plane, h, w);
- for (c = 0; c < numplanes && oldplanes; c++)
- igt_remove_fb(data->gfx_fd, &oldplanes[c].fb);
+ igt_plane_set_position(planeinfo[c].plane, planeinfo[c].x1,
+ planeinfo[c].y1);
- free(oldplanes);
- data->multiplaneoldview = (void*)planes;
+ igt_plane_set_rotation(planeinfo[c].plane,
+ planeinfo[c].rotation_hw);
+ }
return true;
}
@@ -613,6 +607,11 @@ static void pointlocation(data_t *data, planeinfos *p, drmModeModeInfo *mode,
}
}
+/*
+ * count trailing zeroes
+ */
+#define ctz __builtin_ctz
+
/*
* Here is pipe parameter which is now used only for first pipe.
* It is left here if this test ever was wanted to be run on
@@ -624,15 +623,26 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
igt_output_t *output;
igt_crc_t retcrc_sw, retcrc_hw;
planeinfos p[2];
- int c, used_w, used_h;
- struct p_struct *oldplanes;
+ int used_w, used_h, lastroundirotation = 0, lastroundjrotation = 0,
+ lastroundjformat = 0;
drmModeModeInfo *mode;
+ bool have_crc; // flag if can use previously logged crc for comparison
+ igt_crc_t crclog[16] = {}; //4 * 4 rotation crc storage for packed formats
+ char *str1, *str2; // for debug printouts
- static const struct {
+ /*
+ * These are those modes which are tested. For testing feel interesting
+ * case with tiling are 2 bpp, 4 bpp and NV12.
+ */
+ static const uint32_t formatlist[] = {DRM_FORMAT_RGB565,
+ DRM_FORMAT_XRGB8888, DRM_FORMAT_NV12};
+
+ static struct {
igt_rotation_t rotation;
float_t width;
float_t height;
uint64_t tiling;
+ struct igt_fb fbs[ARRAY_SIZE(formatlist)][2];
} planeconfigs[] = {
{IGT_ROTATION_0, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE },
{IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED },
@@ -648,15 +658,8 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
{IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
};
- /*
- * These are those modes which are tested. For testing feel interesting
- * case with tiling are 2 bpp, 4 bpp and NV12.
- */
- static const uint32_t formatlist[] = {DRM_FORMAT_RGB565,
- DRM_FORMAT_XRGB8888, DRM_FORMAT_NV12};
-
for_each_valid_output_on_pipe(display, pipe, output) {
- int i, j, k, l;
+ int i, j, k, l, flipsw, fliphw;
igt_output_set_pipe(output, pipe);
mode = igt_output_get_mode(output);
igt_display_require_output(display);
@@ -665,12 +668,14 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
used_w = min(TEST_MAX_WIDTH, mode->hdisplay);
used_h = min(TEST_MAX_HEIGHT, mode->vdisplay);
+ p[0].plane = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+ p[1].plane = igt_output_get_plane_type(output, DRM_PLANE_TYPE_OVERLAY);
+
data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
INTEL_PIPE_CRC_SOURCE_AUTO);
igt_pipe_crc_start(data->pipe_crc);
for (i = 0; i < ARRAY_SIZE(planeconfigs); i++) {
- p[0].planetype = DRM_PLANE_TYPE_PRIMARY;
p[0].width = (uint64_t)(planeconfigs[i].width * used_w);
p[0].height = (uint64_t)(planeconfigs[i].height * used_h);
p[0].tiling = planeconfigs[i].tiling;
@@ -680,7 +685,6 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
p[0].format = formatlist[k];
for (j = 0; j < ARRAY_SIZE(planeconfigs); j++) {
- p[1].planetype = DRM_PLANE_TYPE_OVERLAY;
p[1].width = (uint64_t)(planeconfigs[j].width * used_w);
p[1].height = (uint64_t)(planeconfigs[j].height * used_h);
p[1].tiling = planeconfigs[j].tiling;
@@ -689,7 +693,6 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
for (l = 0; l < ARRAY_SIZE(formatlist); l++) {
p[1].format = formatlist[l];
-
/*
* RGB565 90/270 degrees rotation is supported
* from gen11 onwards.
@@ -703,41 +706,123 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
(planeconfigs[j].rotation & (IGT_ROTATION_90 | IGT_ROTATION_270))
&& intel_gen(data->devid) < 11)
continue;
+ /*
+ * if using packed formats crc's will be
+ * same and can store them so there's
+ * no need to redo comparison image and
+ * just use stored crc.
+ */
+ if (p[0].format != DRM_FORMAT_NV12 &&
+ crclog[ctz(planeconfigs[i].rotation) | (ctz(planeconfigs[j].rotation) << 2)].frame != 0) {
+ retcrc_sw = crclog[ctz(planeconfigs[i].rotation) | (ctz(planeconfigs[j].rotation) << 2)];
+ have_crc = true;
+ } else if (p[0].format == DRM_FORMAT_NV12 &&
+ p[1].format != DRM_FORMAT_NV12 &&
+ lastroundjformat != DRM_FORMAT_NV12 &&
+ planeconfigs[i].rotation == lastroundirotation &&
+ planeconfigs[j].rotation == lastroundjrotation) {
+ /*
+ * With NV12 can benefit from
+ * previous crc if rotations
+ * stay same. If both planes
+ * have NV12 in use we need to
+ * skip that case.
+ * If last round right plane
+ * had NV12 need to skip this.
+ */
+ have_crc = true;
+ } else {
+ /*
+ * here will be created
+ * comparison image and get crc
+ * if didn't have stored crc
+ * or planar format is in use.
+ * have_crc flag will control
+ * crc comparison part.
+ */
+ p[0].rotation_sw = planeconfigs[i].rotation;
+ p[0].rotation_hw = IGT_ROTATION_0;
+ p[1].rotation_sw = planeconfigs[j].rotation;
+ p[1].rotation_hw = IGT_ROTATION_0;
+ if (!setup_multiplane(data,
+ (planeinfos *)&p,
+ &planeconfigs[i].fbs[k][MULTIPLANE_REFERENCE],
+ &planeconfigs[j].fbs[l][MULTIPLANE_REFERENCE]))
+ continue;
+ igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+ flipsw = kmstest_get_vblank(data->gfx_fd, pipe, 0) + 1;
+ have_crc = false;
+ }
- p[0].rotation_sw = planeconfigs[i].rotation;
- p[0].rotation_hw = IGT_ROTATION_0;
- p[1].rotation_sw = planeconfigs[j].rotation;
- p[1].rotation_hw = IGT_ROTATION_0;
- if (!get_multiplane_crc(data, output, &retcrc_sw,
- (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
+ /*
+ * create hw rotated image and
+ * get vblank where interesting
+ * crc will be at, grab crc bit later
+ */
+ p[0].rotation_sw = IGT_ROTATION_0;
+ p[0].rotation_hw = planeconfigs[i].rotation;
+ p[1].rotation_sw = IGT_ROTATION_0;
+ p[1].rotation_hw = planeconfigs[j].rotation;
+
+ if (!setup_multiplane(data,
+ (planeinfos *)&p,
+ &planeconfigs[i].fbs[k][MULTIPLANE_ROTATED],
+ &planeconfigs[j].fbs[l][MULTIPLANE_ROTATED]))
continue;
- igt_swap(p[0].rotation_sw, p[0].rotation_hw);
- igt_swap(p[1].rotation_sw, p[1].rotation_hw);
- if (!get_multiplane_crc(data, output, &retcrc_hw,
- (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
- continue;
+ igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+ fliphw = kmstest_get_vblank(data->gfx_fd, pipe, 0) + 1;
+
+ if (!have_crc) {
+ igt_pipe_crc_get_for_frame(data->gfx_fd,
+ data->pipe_crc,
+ flipsw,
+ &retcrc_sw);
+
+ if (p[0].format != DRM_FORMAT_NV12 && p[1].format != DRM_FORMAT_NV12 )
+ crclog[ctz(planeconfigs[i].rotation) | (ctz(planeconfigs[j].rotation) << 2)]
+ = retcrc_sw;
+ }
+ igt_pipe_crc_get_for_frame(data->gfx_fd, data->pipe_crc, fliphw, &retcrc_hw);
+
+ str1 = igt_crc_to_string(&retcrc_sw);
+ str2 = igt_crc_to_string(&retcrc_hw);
+
+ igt_debug("crc %.8s vs %.8s -- %.4s - %.4s crc buffered:%s rot1 %d rot2 %d\n",
+ str1, str2,
+ (char*) &p[0].format, (char*) &p[1].format,
+ have_crc?"yes":" no",
+ (int[]) {0, 90, 180, 270}[ctz(planeconfigs[i].rotation)],
+ (int[]) {0, 90, 180, 270}[ctz(planeconfigs[j].rotation)]);
+
+ free(str1);
+ free(str2);
+
igt_assert_crc_equal(&retcrc_sw, &retcrc_hw);
+
+ lastroundjformat = p[1].format;
+ lastroundirotation = planeconfigs[i].rotation;
+ lastroundjrotation = planeconfigs[j].rotation;
}
}
}
}
igt_pipe_crc_stop(data->pipe_crc);
igt_pipe_crc_free(data->pipe_crc);
- igt_output_set_pipe(output, PIPE_ANY);
- }
- /*
- * Old fbs are deleted only after new ones are set on planes.
- * This is done to speed up the test
- */
- oldplanes = data->multiplaneoldview;
- for (c = 0; c < MAXMULTIPLANESAMOUNT && oldplanes; c++)
- igt_remove_fb(data->gfx_fd, &oldplanes[c].fb);
+ igt_plane_set_fb(p[0].plane, NULL);
+ igt_plane_set_fb(p[1].plane, NULL);
+ igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
- free(oldplanes);
- data->multiplaneoldview = NULL;
+ for (i = 0; i < ARRAY_SIZE(planeconfigs); i++) {
+ for (j = 0; j < ARRAY_SIZE(formatlist); j++) {
+ igt_remove_fb(data->gfx_fd, &planeconfigs[i].fbs[j][MULTIPLANE_REFERENCE]);
+ igt_remove_fb(data->gfx_fd, &planeconfigs[i].fbs[j][MULTIPLANE_ROTATED]);
+ }
+ }
+ igt_output_set_pipe(output, PIPE_NONE);
+ }
data->pipe_crc = NULL;
}
--
2.28.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [igt-dev] [PATCH i-g-t 2/2] HAX remove rotation test from blacklist
2021-02-17 16:03 [igt-dev] [PATCH i-g-t 1/2] tests/kms_rotation_crc: reduce executions time on multiplane tests Juha-Pekka Heikkila
@ 2021-02-17 16:03 ` Juha-Pekka Heikkila
2021-02-17 16:40 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/kms_rotation_crc: reduce executions time on multiplane tests Patchwork
2021-02-17 19:25 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2 siblings, 0 replies; 13+ messages in thread
From: Juha-Pekka Heikkila @ 2021-02-17 16:03 UTC (permalink / raw)
To: igt-dev
---
tests/intel-ci/blacklist-pre-merge.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/intel-ci/blacklist-pre-merge.txt b/tests/intel-ci/blacklist-pre-merge.txt
index cddb77c1f..b46c7d050 100644
--- a/tests/intel-ci/blacklist-pre-merge.txt
+++ b/tests/intel-ci/blacklist-pre-merge.txt
@@ -17,7 +17,7 @@
#
# Data acquired on 2020-02-19 by Martin Peres
###############################################################################
-igt@kms_rotation_crc@.*
+#igt@kms_rotation_crc@.*
###############################################################################
--
2.28.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/kms_rotation_crc: reduce executions time on multiplane tests
2021-02-17 16:03 [igt-dev] [PATCH i-g-t 1/2] tests/kms_rotation_crc: reduce executions time on multiplane tests Juha-Pekka Heikkila
2021-02-17 16:03 ` [igt-dev] [PATCH i-g-t 2/2] HAX remove rotation test from blacklist Juha-Pekka Heikkila
@ 2021-02-17 16:40 ` Patchwork
2021-02-17 19:25 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2021-02-17 16:40 UTC (permalink / raw)
To: Juha-Pekka Heikkila; +Cc: igt-dev
[-- Attachment #1.1: Type: text/plain, Size: 4363 bytes --]
== Series Details ==
Series: series starting with [i-g-t,1/2] tests/kms_rotation_crc: reduce executions time on multiplane tests
URL : https://patchwork.freedesktop.org/series/87161/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_9782 -> IGTPW_5526
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/index.html
Known issues
------------
Here are the changes found in IGTPW_5526 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@core_hotunplug@unbind-rebind:
- fi-kbl-7500u: [PASS][1] -> [DMESG-WARN][2] ([i915#2605])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/fi-kbl-7500u/igt@core_hotunplug@unbind-rebind.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/fi-kbl-7500u/igt@core_hotunplug@unbind-rebind.html
* igt@gem_huc_copy@huc-copy:
- fi-byt-j1900: NOTRUN -> [SKIP][3] ([fdo#109271]) +27 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/fi-byt-j1900/igt@gem_huc_copy@huc-copy.html
* igt@gem_mmap_gtt@basic:
- fi-tgl-y: [PASS][4] -> [DMESG-WARN][5] ([i915#402]) +1 similar issue
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/fi-tgl-y/igt@gem_mmap_gtt@basic.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/fi-tgl-y/igt@gem_mmap_gtt@basic.html
* igt@i915_module_load@reload:
- fi-tgl-y: [PASS][6] -> [DMESG-WARN][7] ([i915#1982] / [k.org#205379])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/fi-tgl-y/igt@i915_module_load@reload.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/fi-tgl-y/igt@i915_module_load@reload.html
* igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- fi-snb-2600: NOTRUN -> [SKIP][8] ([fdo#109271]) +34 similar issues
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/fi-snb-2600/igt@kms_addfb_basic@addfb25-y-tiled-small-legacy.html
* igt@kms_chamelium@hdmi-crc-fast:
- fi-byt-j1900: NOTRUN -> [SKIP][9] ([fdo#109271] / [fdo#111827]) +8 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/fi-byt-j1900/igt@kms_chamelium@hdmi-crc-fast.html
- fi-snb-2600: NOTRUN -> [SKIP][10] ([fdo#109271] / [fdo#111827]) +8 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/fi-snb-2600/igt@kms_chamelium@hdmi-crc-fast.html
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s3:
- fi-tgl-y: [DMESG-WARN][11] ([i915#2411] / [i915#402]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/fi-tgl-y/igt@gem_exec_suspend@basic-s3.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/fi-tgl-y/igt@gem_exec_suspend@basic-s3.html
* igt@gem_render_tiled_blits@basic:
- fi-tgl-y: [DMESG-WARN][13] ([i915#402]) -> [PASS][14] +1 similar issue
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/fi-tgl-y/igt@gem_render_tiled_blits@basic.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/fi-tgl-y/igt@gem_render_tiled_blits@basic.html
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2411]: https://gitlab.freedesktop.org/drm/intel/issues/2411
[i915#2605]: https://gitlab.freedesktop.org/drm/intel/issues/2605
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[k.org#205379]: https://bugzilla.kernel.org/show_bug.cgi?id=205379
Participating hosts (41 -> 38)
------------------------------
Additional (2): fi-byt-j1900 fi-snb-2600
Missing (5): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-dg1-1 fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_6005 -> IGTPW_5526
CI-20190529: 20190529
CI_DRM_9782: 17f0b26dab823740a3ebc413ea6f61a4f2e77971 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_5526: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/index.html
IGT_6005: b69a3c463f0aec46b19c14ac24351d292cb11c08 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/index.html
[-- Attachment #1.2: Type: text/html, Size: 5566 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 13+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] tests/kms_rotation_crc: reduce executions time on multiplane tests
2021-02-17 16:03 [igt-dev] [PATCH i-g-t 1/2] tests/kms_rotation_crc: reduce executions time on multiplane tests Juha-Pekka Heikkila
2021-02-17 16:03 ` [igt-dev] [PATCH i-g-t 2/2] HAX remove rotation test from blacklist Juha-Pekka Heikkila
2021-02-17 16:40 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/kms_rotation_crc: reduce executions time on multiplane tests Patchwork
@ 2021-02-17 19:25 ` Patchwork
2 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2021-02-17 19:25 UTC (permalink / raw)
To: Juha-Pekka Heikkila; +Cc: igt-dev
[-- Attachment #1.1: Type: text/plain, Size: 30317 bytes --]
== Series Details ==
Series: series starting with [i-g-t,1/2] tests/kms_rotation_crc: reduce executions time on multiplane tests
URL : https://patchwork.freedesktop.org/series/87161/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_9782_full -> IGTPW_5526_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/index.html
Known issues
------------
Here are the changes found in IGTPW_5526_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_persistence@close-replace-race:
- shard-glk: [PASS][1] -> [TIMEOUT][2] ([i915#2918])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-glk1/igt@gem_ctx_persistence@close-replace-race.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-glk9/igt@gem_ctx_persistence@close-replace-race.html
* igt@gem_ctx_persistence@engines-cleanup:
- shard-hsw: NOTRUN -> [SKIP][3] ([fdo#109271] / [i915#1099])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-hsw1/igt@gem_ctx_persistence@engines-cleanup.html
* igt@gem_ctx_persistence@smoketest:
- shard-snb: NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#1099]) +5 similar issues
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-snb5/igt@gem_ctx_persistence@smoketest.html
* igt@gem_exec_balancer@hang:
- shard-iclb: [PASS][5] -> [INCOMPLETE][6] ([i915#1895] / [i915#2295] / [i915#3031])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-iclb3/igt@gem_exec_balancer@hang.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-iclb2/igt@gem_exec_balancer@hang.html
* igt@gem_exec_fair@basic-pace@vcs1:
- shard-kbl: [PASS][7] -> [SKIP][8] ([fdo#109271])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-kbl7/igt@gem_exec_fair@basic-pace@vcs1.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl7/igt@gem_exec_fair@basic-pace@vcs1.html
* igt@gem_exec_fair@basic-pace@vecs0:
- shard-kbl: [PASS][9] -> [FAIL][10] ([i915#2842]) +2 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-kbl7/igt@gem_exec_fair@basic-pace@vecs0.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl7/igt@gem_exec_fair@basic-pace@vecs0.html
* igt@gem_exec_params@no-vebox:
- shard-tglb: NOTRUN -> [SKIP][11] ([fdo#109283])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb1/igt@gem_exec_params@no-vebox.html
* igt@gem_exec_reloc@basic-parallel:
- shard-kbl: NOTRUN -> [TIMEOUT][12] ([i915#1729])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl1/igt@gem_exec_reloc@basic-parallel.html
- shard-apl: NOTRUN -> [TIMEOUT][13] ([i915#1729])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-apl6/igt@gem_exec_reloc@basic-parallel.html
* igt@gem_exec_reloc@basic-wide-active@rcs0:
- shard-kbl: NOTRUN -> [FAIL][14] ([i915#2389]) +4 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl1/igt@gem_exec_reloc@basic-wide-active@rcs0.html
* igt@gem_exec_schedule@u-fairslice@rcs0:
- shard-tglb: [PASS][15] -> [DMESG-WARN][16] ([i915#2803])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-tglb3/igt@gem_exec_schedule@u-fairslice@rcs0.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb1/igt@gem_exec_schedule@u-fairslice@rcs0.html
* igt@gem_exec_schedule@u-semaphore-codependency:
- shard-apl: NOTRUN -> [DMESG-WARN][17] ([i915#1610])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-apl7/igt@gem_exec_schedule@u-semaphore-codependency.html
* igt@gem_exec_whisper@basic-contexts-forked:
- shard-glk: [PASS][18] -> [DMESG-WARN][19] ([i915#118] / [i915#95]) +2 similar issues
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-glk2/igt@gem_exec_whisper@basic-contexts-forked.html
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-glk4/igt@gem_exec_whisper@basic-contexts-forked.html
* igt@gem_huc_copy@huc-copy:
- shard-tglb: [PASS][20] -> [SKIP][21] ([i915#2190])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-tglb5/igt@gem_huc_copy@huc-copy.html
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb6/igt@gem_huc_copy@huc-copy.html
- shard-kbl: NOTRUN -> [SKIP][22] ([fdo#109271] / [i915#2190])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl2/igt@gem_huc_copy@huc-copy.html
* igt@gem_pwrite@basic-exhaustion:
- shard-snb: NOTRUN -> [WARN][23] ([i915#2658])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-snb5/igt@gem_pwrite@basic-exhaustion.html
* igt@gem_userptr_blits@input-checking:
- shard-apl: NOTRUN -> [DMESG-WARN][24] ([i915#3002])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-apl3/igt@gem_userptr_blits@input-checking.html
* igt@gem_userptr_blits@mmap-offset-invalidate-active@wb:
- shard-kbl: NOTRUN -> [SKIP][25] ([fdo#109271]) +231 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl7/igt@gem_userptr_blits@mmap-offset-invalidate-active@wb.html
* igt@gem_userptr_blits@mmap-offset-invalidate-active@wc:
- shard-tglb: NOTRUN -> [SKIP][26] ([i915#1317]) +3 similar issues
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb7/igt@gem_userptr_blits@mmap-offset-invalidate-active@wc.html
* igt@gem_userptr_blits@vma-merge:
- shard-snb: NOTRUN -> [FAIL][27] ([i915#2724])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-snb6/igt@gem_userptr_blits@vma-merge.html
* igt@gen7_exec_parse@bitmasks:
- shard-iclb: NOTRUN -> [SKIP][28] ([fdo#109289])
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-iclb8/igt@gen7_exec_parse@bitmasks.html
- shard-tglb: NOTRUN -> [SKIP][29] ([fdo#109289]) +1 similar issue
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb2/igt@gen7_exec_parse@bitmasks.html
* igt@gen9_exec_parse@allowed-single:
- shard-glk: [PASS][30] -> [DMESG-WARN][31] ([i915#1436] / [i915#716])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-glk5/igt@gen9_exec_parse@allowed-single.html
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-glk5/igt@gen9_exec_parse@allowed-single.html
* igt@gen9_exec_parse@batch-zero-length:
- shard-tglb: NOTRUN -> [SKIP][32] ([fdo#112306])
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb6/igt@gen9_exec_parse@batch-zero-length.html
* igt@i915_pm_dc@dc6-dpms:
- shard-kbl: NOTRUN -> [FAIL][33] ([i915#454])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl7/igt@i915_pm_dc@dc6-dpms.html
* igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp:
- shard-kbl: NOTRUN -> [SKIP][34] ([fdo#109271] / [i915#1937])
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl6/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp.html
* igt@i915_pm_rc6_residency@rc6-fence:
- shard-tglb: NOTRUN -> [WARN][35] ([i915#2681])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb8/igt@i915_pm_rc6_residency@rc6-fence.html
* igt@kms_big_fb@linear-64bpp-rotate-90:
- shard-tglb: NOTRUN -> [SKIP][36] ([fdo#111614])
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb7/igt@kms_big_fb@linear-64bpp-rotate-90.html
* igt@kms_big_fb@yf-tiled-8bpp-rotate-90:
- shard-tglb: NOTRUN -> [SKIP][37] ([fdo#111615]) +1 similar issue
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb7/igt@kms_big_fb@yf-tiled-8bpp-rotate-90.html
- shard-iclb: NOTRUN -> [SKIP][38] ([fdo#110723])
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-iclb1/igt@kms_big_fb@yf-tiled-8bpp-rotate-90.html
* igt@kms_big_joiner@invalid-modeset:
- shard-kbl: NOTRUN -> [SKIP][39] ([fdo#109271] / [i915#2705])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl6/igt@kms_big_joiner@invalid-modeset.html
- shard-tglb: NOTRUN -> [SKIP][40] ([i915#2705])
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb8/igt@kms_big_joiner@invalid-modeset.html
* igt@kms_ccs@pipe-a-ccs-on-another-bo:
- shard-snb: NOTRUN -> [SKIP][41] ([fdo#109271]) +349 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-snb5/igt@kms_ccs@pipe-a-ccs-on-another-bo.html
* igt@kms_chamelium@hdmi-aspect-ratio:
- shard-tglb: NOTRUN -> [SKIP][42] ([fdo#109284] / [fdo#111827]) +2 similar issues
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb1/igt@kms_chamelium@hdmi-aspect-ratio.html
* igt@kms_chamelium@hdmi-hpd-storm:
- shard-kbl: NOTRUN -> [SKIP][43] ([fdo#109271] / [fdo#111827]) +21 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl7/igt@kms_chamelium@hdmi-hpd-storm.html
* igt@kms_chamelium@vga-hpd:
- shard-apl: NOTRUN -> [SKIP][44] ([fdo#109271] / [fdo#111827]) +16 similar issues
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-apl7/igt@kms_chamelium@vga-hpd.html
* igt@kms_color_chamelium@pipe-b-ctm-0-25:
- shard-snb: NOTRUN -> [SKIP][45] ([fdo#109271] / [fdo#111827]) +17 similar issues
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-snb5/igt@kms_color_chamelium@pipe-b-ctm-0-25.html
* igt@kms_content_protection@legacy:
- shard-kbl: NOTRUN -> [TIMEOUT][46] ([i915#1319]) +1 similar issue
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl4/igt@kms_content_protection@legacy.html
- shard-tglb: NOTRUN -> [SKIP][47] ([fdo#111828])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb5/igt@kms_content_protection@legacy.html
* igt@kms_content_protection@lic:
- shard-apl: NOTRUN -> [TIMEOUT][48] ([i915#1319]) +1 similar issue
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-apl2/igt@kms_content_protection@lic.html
* igt@kms_cursor_crc@pipe-a-cursor-512x170-sliding:
- shard-tglb: NOTRUN -> [SKIP][49] ([fdo#109279]) +1 similar issue
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb6/igt@kms_cursor_crc@pipe-a-cursor-512x170-sliding.html
* igt@kms_cursor_edge_walk@pipe-d-128x128-top-edge:
- shard-iclb: NOTRUN -> [SKIP][50] ([fdo#109278]) +4 similar issues
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-iclb4/igt@kms_cursor_edge_walk@pipe-d-128x128-top-edge.html
* igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
- shard-iclb: NOTRUN -> [SKIP][51] ([fdo#109274] / [fdo#109278])
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-iclb1/igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy.html
* igt@kms_cursor_legacy@pipe-d-single-bo:
- shard-kbl: NOTRUN -> [SKIP][52] ([fdo#109271] / [i915#533]) +3 similar issues
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl6/igt@kms_cursor_legacy@pipe-d-single-bo.html
* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ab-hdmi-a1-hdmi-a2:
- shard-glk: [PASS][53] -> [FAIL][54] ([i915#79])
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-glk7/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ab-hdmi-a1-hdmi-a2.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-glk3/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ab-hdmi-a1-hdmi-a2.html
* igt@kms_flip@2x-flip-vs-panning-interruptible:
- shard-iclb: NOTRUN -> [SKIP][55] ([fdo#109274]) +2 similar issues
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-iclb1/igt@kms_flip@2x-flip-vs-panning-interruptible.html
* igt@kms_flip@2x-plain-flip-ts-check:
- shard-tglb: NOTRUN -> [SKIP][56] ([fdo#111825]) +19 similar issues
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb1/igt@kms_flip@2x-plain-flip-ts-check.html
* igt@kms_flip@flip-vs-blocking-wf-vblank@a-edp1:
- shard-tglb: NOTRUN -> [FAIL][57] ([i915#2122])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb7/igt@kms_flip@flip-vs-blocking-wf-vblank@a-edp1.html
* igt@kms_flip@flip-vs-expired-vblank@a-edp1:
- shard-tglb: [PASS][58] -> [FAIL][59] ([i915#2598])
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-tglb8/igt@kms_flip@flip-vs-expired-vblank@a-edp1.html
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb7/igt@kms_flip@flip-vs-expired-vblank@a-edp1.html
* igt@kms_flip@flip-vs-suspend@c-dp1:
- shard-apl: NOTRUN -> [DMESG-WARN][60] ([i915#180]) +1 similar issue
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-apl3/igt@kms_flip@flip-vs-suspend@c-dp1.html
* igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs:
- shard-kbl: NOTRUN -> [FAIL][61] ([i915#2641]) +1 similar issue
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl7/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs.html
* igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs:
- shard-apl: NOTRUN -> [SKIP][62] ([fdo#109271] / [i915#2672])
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-apl6/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs.html
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-mmap-cpu:
- shard-hsw: NOTRUN -> [SKIP][63] ([fdo#109271]) +26 similar issues
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-hsw4/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-mmap-cpu.html
* igt@kms_frontbuffer_tracking@psr-2p-primscrn-pri-shrfb-draw-mmap-wc:
- shard-iclb: NOTRUN -> [SKIP][64] ([fdo#109280]) +5 similar issues
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-iclb3/igt@kms_frontbuffer_tracking@psr-2p-primscrn-pri-shrfb-draw-mmap-wc.html
* igt@kms_hdr@static-toggle-suspend:
- shard-tglb: NOTRUN -> [SKIP][65] ([i915#1187])
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb3/igt@kms_hdr@static-toggle-suspend.html
* igt@kms_pipe_crc_basic@disable-crc-after-crtc-pipe-d:
- shard-apl: NOTRUN -> [SKIP][66] ([fdo#109271] / [i915#533]) +3 similar issues
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-apl8/igt@kms_pipe_crc_basic@disable-crc-after-crtc-pipe-d.html
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
- shard-apl: [PASS][67] -> [DMESG-WARN][68] ([i915#180]) +1 similar issue
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-apl2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b.html
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-apl3/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b.html
* igt@kms_plane_alpha_blend@pipe-a-alpha-transparent-fb:
- shard-kbl: NOTRUN -> [FAIL][69] ([i915#265])
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl6/igt@kms_plane_alpha_blend@pipe-a-alpha-transparent-fb.html
* igt@kms_plane_alpha_blend@pipe-c-alpha-basic:
- shard-apl: NOTRUN -> [FAIL][70] ([fdo#108145] / [i915#265]) +2 similar issues
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-apl1/igt@kms_plane_alpha_blend@pipe-c-alpha-basic.html
* igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb:
- shard-kbl: NOTRUN -> [FAIL][71] ([fdo#108145] / [i915#265]) +3 similar issues
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl7/igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb.html
* igt@kms_plane_cursor@pipe-d-overlay-size-64:
- shard-hsw: NOTRUN -> [SKIP][72] ([fdo#109271] / [i915#533]) +4 similar issues
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-hsw8/igt@kms_plane_cursor@pipe-d-overlay-size-64.html
* igt@kms_plane_scaling@scaler-with-clipping-clamping@pipe-c-scaler-with-clipping-clamping:
- shard-kbl: NOTRUN -> [SKIP][73] ([fdo#109271] / [i915#2733])
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl6/igt@kms_plane_scaling@scaler-with-clipping-clamping@pipe-c-scaler-with-clipping-clamping.html
- shard-glk: NOTRUN -> [SKIP][74] ([fdo#109271] / [i915#2733])
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-glk3/igt@kms_plane_scaling@scaler-with-clipping-clamping@pipe-c-scaler-with-clipping-clamping.html
* igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-2:
- shard-apl: NOTRUN -> [SKIP][75] ([fdo#109271] / [i915#658]) +4 similar issues
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-apl2/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-2.html
* igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3:
- shard-kbl: NOTRUN -> [SKIP][76] ([fdo#109271] / [i915#658]) +2 similar issues
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl6/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3.html
* igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-2:
- shard-tglb: NOTRUN -> [SKIP][77] ([i915#2920])
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb8/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-2.html
* igt@kms_psr@psr2_cursor_plane_move:
- shard-iclb: [PASS][78] -> [SKIP][79] ([fdo#109441]) +1 similar issue
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-iclb2/igt@kms_psr@psr2_cursor_plane_move.html
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-iclb7/igt@kms_psr@psr2_cursor_plane_move.html
* igt@kms_psr@psr2_primary_mmap_gtt:
- shard-glk: NOTRUN -> [SKIP][80] ([fdo#109271]) +24 similar issues
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-glk3/igt@kms_psr@psr2_primary_mmap_gtt.html
- shard-iclb: NOTRUN -> [SKIP][81] ([fdo#109441])
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-iclb8/igt@kms_psr@psr2_primary_mmap_gtt.html
* igt@kms_psr@sprite_plane_onoff:
- shard-hsw: NOTRUN -> [SKIP][82] ([fdo#109271] / [i915#1072]) +2 similar issues
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-hsw8/igt@kms_psr@sprite_plane_onoff.html
* igt@kms_rotation_crc@multiplane-rotation:
- shard-kbl: NOTRUN -> [FAIL][83] ([i915#1041] / [i915#65])
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl2/igt@kms_rotation_crc@multiplane-rotation.html
* igt@kms_rotation_crc@multiplane-rotation-cropping-bottom:
- shard-kbl: [PASS][84] -> [FAIL][85] ([i915#1041] / [i915#65])
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-kbl7/igt@kms_rotation_crc@multiplane-rotation-cropping-bottom.html
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl2/igt@kms_rotation_crc@multiplane-rotation-cropping-bottom.html
* igt@kms_writeback@writeback-check-output:
- shard-apl: NOTRUN -> [SKIP][86] ([fdo#109271] / [i915#2437]) +1 similar issue
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-apl8/igt@kms_writeback@writeback-check-output.html
* igt@kms_writeback@writeback-invalid-parameters:
- shard-kbl: NOTRUN -> [SKIP][87] ([fdo#109271] / [i915#2437])
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl6/igt@kms_writeback@writeback-invalid-parameters.html
* igt@nouveau_crc@pipe-b-ctx-flip-skip-current-frame:
- shard-apl: NOTRUN -> [SKIP][88] ([fdo#109271]) +177 similar issues
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-apl1/igt@nouveau_crc@pipe-b-ctx-flip-skip-current-frame.html
* igt@prime_nv_api@i915_self_import:
- shard-tglb: NOTRUN -> [SKIP][89] ([fdo#109291]) +1 similar issue
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb5/igt@prime_nv_api@i915_self_import.html
* igt@prime_vgem@fence-flip-hang:
- shard-tglb: NOTRUN -> [SKIP][90] ([fdo#109295]) +1 similar issue
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb3/igt@prime_vgem@fence-flip-hang.html
* igt@prime_vgem@fence-write-hang:
- shard-iclb: NOTRUN -> [SKIP][91] ([fdo#109295]) +1 similar issue
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-iclb8/igt@prime_vgem@fence-write-hang.html
* igt@sysfs_clients@recycle-many:
- shard-apl: [PASS][92] -> [FAIL][93] ([i915#3028])
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-apl8/igt@sysfs_clients@recycle-many.html
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-apl7/igt@sysfs_clients@recycle-many.html
- shard-hsw: [PASS][94] -> [FAIL][95] ([i915#3028])
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-hsw4/igt@sysfs_clients@recycle-many.html
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-hsw1/igt@sysfs_clients@recycle-many.html
* igt@sysfs_clients@split-10@bcs0:
- shard-glk: [PASS][96] -> [SKIP][97] ([fdo#109271] / [i915#3026])
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-glk7/igt@sysfs_clients@split-10@bcs0.html
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-glk9/igt@sysfs_clients@split-10@bcs0.html
- shard-apl: [PASS][98] -> [SKIP][99] ([fdo#109271] / [i915#3026]) +1 similar issue
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-apl8/igt@sysfs_clients@split-10@bcs0.html
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-apl6/igt@sysfs_clients@split-10@bcs0.html
- shard-kbl: NOTRUN -> [SKIP][100] ([fdo#109271] / [i915#3026])
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl1/igt@sysfs_clients@split-10@bcs0.html
* igt@tools_test@sysfs_l3_parity:
- shard-iclb: NOTRUN -> [SKIP][101] ([fdo#109307])
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-iclb6/igt@tools_test@sysfs_l3_parity.html
- shard-tglb: NOTRUN -> [SKIP][102] ([fdo#109307])
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb6/igt@tools_test@sysfs_l3_parity.html
#### Possible fixes ####
* igt@gem_exec_create@legacy:
- shard-glk: [DMESG-WARN][103] ([i915#118] / [i915#95]) -> [PASS][104]
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-glk4/igt@gem_exec_create@legacy.html
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-glk2/igt@gem_exec_create@legacy.html
* igt@gem_exec_fair@basic-none-rrul@rcs0:
- shard-glk: [FAIL][105] ([i915#2842]) -> [PASS][106] +4 similar issues
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-glk7/igt@gem_exec_fair@basic-none-rrul@rcs0.html
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-glk5/igt@gem_exec_fair@basic-none-rrul@rcs0.html
* igt@gem_exec_fair@basic-none-share@rcs0:
- shard-tglb: [FAIL][107] ([i915#2842]) -> [PASS][108] +1 similar issue
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-tglb2/igt@gem_exec_fair@basic-none-share@rcs0.html
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb5/igt@gem_exec_fair@basic-none-share@rcs0.html
* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-iclb: [FAIL][109] ([i915#2842]) -> [PASS][110]
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-iclb1/igt@gem_exec_fair@basic-pace-share@rcs0.html
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-iclb3/igt@gem_exec_fair@basic-pace-share@rcs0.html
* igt@gem_exec_fair@basic-throttle@rcs0:
- shard-iclb: [FAIL][111] ([i915#2849]) -> [PASS][112]
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-iclb7/igt@gem_exec_fair@basic-throttle@rcs0.html
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-iclb6/igt@gem_exec_fair@basic-throttle@rcs0.html
* igt@gem_exec_reloc@basic-many-active@rcs0:
- shard-apl: [FAIL][113] ([i915#2389]) -> [PASS][114]
[113]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-apl1/igt@gem_exec_reloc@basic-many-active@rcs0.html
[114]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-apl1/igt@gem_exec_reloc@basic-many-active@rcs0.html
- shard-glk: [FAIL][115] ([i915#2389]) -> [PASS][116]
[115]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-glk2/igt@gem_exec_reloc@basic-many-active@rcs0.html
[116]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-glk8/igt@gem_exec_reloc@basic-many-active@rcs0.html
* igt@gem_fenced_exec_thrash@too-many-fences:
- shard-snb: [INCOMPLETE][117] ([i915#2055]) -> [PASS][118]
[117]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-snb6/igt@gem_fenced_exec_thrash@too-many-fences.html
[118]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-snb7/igt@gem_fenced_exec_thrash@too-many-fences.html
* igt@i915_pm_dc@dc6-dpms:
- shard-iclb: [FAIL][119] ([i915#454]) -> [PASS][120]
[119]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-iclb8/igt@i915_pm_dc@dc6-dpms.html
[120]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-iclb4/igt@i915_pm_dc@dc6-dpms.html
* igt@i915_selftest@live@hangcheck:
- shard-hsw: [INCOMPLETE][121] ([i915#2782]) -> [PASS][122]
[121]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-hsw7/igt@i915_selftest@live@hangcheck.html
[122]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-hsw1/igt@i915_selftest@live@hangcheck.html
* igt@kms_async_flips@test-time-stamp:
- shard-tglb: [FAIL][123] ([i915#2597]) -> [PASS][124]
[123]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-tglb5/igt@kms_async_flips@test-time-stamp.html
[124]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb2/igt@kms_async_flips@test-time-stamp.html
* igt@kms_cursor_crc@pipe-b-cursor-256x85-random:
- shard-apl: [FAIL][125] ([i915#54]) -> [PASS][126]
[125]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-apl6/igt@kms_cursor_crc@pipe-b-cursor-256x85-random.html
[126]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-apl1/igt@kms_cursor_crc@pipe-b-cursor-256x85-random.html
* igt@kms_cursor_crc@pipe-b-cursor-64x21-random:
- shard-glk: [FAIL][127] ([i915#54]) -> [PASS][128]
[127]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-glk9/igt@kms_cursor_crc@pipe-b-cursor-64x21-random.html
[128]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-glk6/igt@kms_cursor_crc@pipe-b-cursor-64x21-random.html
- shard-kbl: [FAIL][129] ([i915#54]) -> [PASS][130]
[129]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-kbl6/igt@kms_cursor_crc@pipe-b-cursor-64x21-random.html
[130]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-kbl7/igt@kms_cursor_crc@pipe-b-cursor-64x21-random.html
* igt@kms_cursor_legacy@flip-vs-cursor-legacy:
- shard-tglb: [FAIL][131] ([i915#2346]) -> [PASS][132]
[131]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-tglb8/igt@kms_cursor_legacy@flip-vs-cursor-legacy.html
[132]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb5/igt@kms_cursor_legacy@flip-vs-cursor-legacy.html
* igt@kms_psr@psr2_cursor_render:
- shard-iclb: [SKIP][133] ([fdo#109441]) -> [PASS][134] +2 similar issues
[133]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-iclb7/igt@kms_psr@psr2_cursor_render.html
[134]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
* igt@kms_rotation_crc@multiplane-rotation-cropping-bottom:
- shard-glk: [TIMEOUT][135] ([i915#1280]) -> [PASS][136] +2 similar issues
[135]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-glk6/igt@kms_rotation_crc@multiplane-rotation-cropping-bottom.html
[136]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-glk4/igt@kms_rotation_crc@multiplane-rotation-cropping-bottom.html
* igt@sysfs_clients@recycle:
- shard-iclb: [FAIL][137] ([i915#3028]) -> [PASS][138]
[137]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-iclb7/igt@sysfs_clients@recycle.html
[138]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-iclb6/igt@sysfs_clients@recycle.html
* igt@sysfs_clients@recycle-many:
- shard-tglb: [FAIL][139] ([i915#3028]) -> [PASS][140] +1 similar issue
[139]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-tglb1/igt@sysfs_clients@recycle-many.html
[140]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-tglb8/igt@sysfs_clients@recycle-many.html
* igt@sysfs_clients@sema-10@rcs0:
- shard-apl: [SKIP][141] ([fdo#109271] / [i915#3026]) -> [PASS][142]
[141]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-apl3/igt@sysfs_clients@sema-10@rcs0.html
[142]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-apl1/igt@sysfs_clients@sema-10@rcs0.html
#### Warnings ####
* igt@i915_pm_rc6_residency@rc6-idle:
- shard-iclb: [WARN][143] ([i915#1804] / [i915#2684]) -> [WARN][144] ([i915#2684])
[143]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9782/shard-iclb4/igt@i915_pm_rc6_residency@rc6-idle.html
[144]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/shard-iclb5/igt@i915_pm_rc6_residency@rc6-idle.html
* igt@kms_dp_dsc@basic-dsc-enable-edp:
- shard-iclb: [SKIP][145] ([fdo#109349]) -> [DMESG-WARN][146] ([i915#1226])
[145]: https://intel-gfx-c
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5526/index.html
[-- Attachment #1.2: Type: text/html, Size: 33771 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 13+ messages in thread
* [igt-dev] [PATCH i-g-t 1/2] tests/kms_rotation_crc: reduce executions time on multiplane tests
@ 2021-02-18 16:14 Juha-Pekka Heikkila
2021-03-02 11:13 ` Karthik B S
0 siblings, 1 reply; 13+ messages in thread
From: Juha-Pekka Heikkila @ 2021-02-18 16:14 UTC (permalink / raw)
To: igt-dev
Reduce repetitive work and wait less. Buffer created fbs. Log counted crcs.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
tests/kms_rotation_crc.c | 235 +++++++++++++++++++++++++++------------
1 file changed, 165 insertions(+), 70 deletions(-)
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 6d4e87ed9..6233c773a 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -31,6 +31,8 @@
#define TEST_MAX_WIDTH 640
#define TEST_MAX_HEIGHT 480
#define MAX_TESTED_MODES 8
+#define MULTIPLANE_REFERENCE 0
+#define MULTIPLANE_ROTATED 1
struct p_struct {
igt_plane_t *plane;
@@ -522,26 +524,19 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
typedef struct {
int32_t x1, y1;
- uint64_t width, height, tiling, planetype, format;
+ uint64_t width, height, tiling, format;
+ igt_plane_t *plane;
igt_rotation_t rotation_sw, rotation_hw;
} planeinfos;
-static bool get_multiplane_crc(data_t *data, igt_output_t *output,
- igt_crc_t *crc_output, planeinfos *planeinfo,
- int numplanes)
+static bool setup_multiplane(data_t *data, planeinfos *planeinfo,
+ struct igt_fb *fbleft, struct igt_fb *fbright)
{
uint32_t w, h;
- igt_display_t *display = &data->display;
- struct p_struct *planes, *oldplanes;
- int c, ret;
-
- oldplanes = data->multiplaneoldview;
- planes = calloc(sizeof(*planes), numplanes);
-
- for (c = 0; c < numplanes; c++) {
- planes[c].plane = igt_output_get_plane_type(output,
- planeinfo[c].planetype);
+ struct igt_fb *planes[2] = {fbleft, fbright};
+ int c;
+ for (c = 0; c < ARRAY_SIZE(planes); c++) {
/*
* make plane and fb width and height always divisible by 4
* due to NV12 support and Intel hw workarounds.
@@ -552,34 +547,33 @@ static bool get_multiplane_crc(data_t *data, igt_output_t *output,
if (planeinfo[c].rotation_sw & (IGT_ROTATION_90 | IGT_ROTATION_270))
igt_swap(w, h);
- if (!igt_plane_has_format_mod(planes[c].plane,
+ if (!igt_plane_has_format_mod(planeinfo[c].plane,
planeinfo[c].format,
planeinfo[c].tiling))
return false;
- igt_create_fb(data->gfx_fd, w, h, planeinfo[c].format,
- planeinfo[c].tiling, &planes[c].fb);
+ /*
+ * was this hw/sw rotation ran already or need to create
+ * new fb?
+ */
+ if (planes[c]->fb_id == 0) {
+ igt_create_fb(data->gfx_fd, w, h, planeinfo[c].format,
+ planeinfo[c].tiling, planes[c]);
- paint_squares(data, planeinfo[c].rotation_sw, &planes[c].fb, 1.0f);
- igt_plane_set_fb(planes[c].plane, &planes[c].fb);
+ paint_squares(data, planeinfo[c].rotation_sw,
+ planes[c], 1.0f);
+ }
+ igt_plane_set_fb(planeinfo[c].plane, planes[c]);
if (planeinfo[c].rotation_hw & (IGT_ROTATION_90 | IGT_ROTATION_270))
- igt_plane_set_size(planes[c].plane, h, w);
-
- igt_plane_set_position(planes[c].plane, planeinfo[c].x1, planeinfo[c].y1);
- igt_plane_set_rotation(planes[c].plane, planeinfo[c].rotation_hw);
- }
-
- ret = igt_display_try_commit2(display, COMMIT_ATOMIC);
- igt_assert_eq(ret, 0);
-
- igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, crc_output);
+ igt_plane_set_size(planeinfo[c].plane, h, w);
- for (c = 0; c < numplanes && oldplanes; c++)
- igt_remove_fb(data->gfx_fd, &oldplanes[c].fb);
+ igt_plane_set_position(planeinfo[c].plane, planeinfo[c].x1,
+ planeinfo[c].y1);
- free(oldplanes);
- data->multiplaneoldview = (void*)planes;
+ igt_plane_set_rotation(planeinfo[c].plane,
+ planeinfo[c].rotation_hw);
+ }
return true;
}
@@ -613,6 +607,11 @@ static void pointlocation(data_t *data, planeinfos *p, drmModeModeInfo *mode,
}
}
+/*
+ * count trailing zeroes
+ */
+#define ctz __builtin_ctz
+
/*
* Here is pipe parameter which is now used only for first pipe.
* It is left here if this test ever was wanted to be run on
@@ -624,15 +623,26 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
igt_output_t *output;
igt_crc_t retcrc_sw, retcrc_hw;
planeinfos p[2];
- int c, used_w, used_h;
- struct p_struct *oldplanes;
+ int used_w, used_h, lastroundirotation = 0, lastroundjrotation = 0,
+ lastroundjformat = 0, c, d;
drmModeModeInfo *mode;
+ bool have_crc; // flag if can use previously logged crc for comparison
+ igt_crc_t crclog[16] = {}; //4 * 4 rotation crc storage for packed formats
+ char *str1, *str2; // for debug printouts
+
+ /*
+ * These are those modes which are tested. For testing feel interesting
+ * case with tiling are 2 bpp, 4 bpp and NV12.
+ */
+ static const uint32_t formatlist[] = {DRM_FORMAT_RGB565,
+ DRM_FORMAT_XRGB8888, DRM_FORMAT_NV12};
- static const struct {
+ static struct {
igt_rotation_t rotation;
float_t width;
float_t height;
uint64_t tiling;
+ struct igt_fb fbs[ARRAY_SIZE(formatlist)][2];
} planeconfigs[] = {
{IGT_ROTATION_0, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE },
{IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED },
@@ -648,15 +658,8 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
{IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
};
- /*
- * These are those modes which are tested. For testing feel interesting
- * case with tiling are 2 bpp, 4 bpp and NV12.
- */
- static const uint32_t formatlist[] = {DRM_FORMAT_RGB565,
- DRM_FORMAT_XRGB8888, DRM_FORMAT_NV12};
-
for_each_valid_output_on_pipe(display, pipe, output) {
- int i, j, k, l;
+ int i, j, k, l, flipsw, fliphw;
igt_output_set_pipe(output, pipe);
mode = igt_output_get_mode(output);
igt_display_require_output(display);
@@ -665,12 +668,14 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
used_w = min(TEST_MAX_WIDTH, mode->hdisplay);
used_h = min(TEST_MAX_HEIGHT, mode->vdisplay);
+ p[0].plane = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+ p[1].plane = igt_output_get_plane_type(output, DRM_PLANE_TYPE_OVERLAY);
+
data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
INTEL_PIPE_CRC_SOURCE_AUTO);
igt_pipe_crc_start(data->pipe_crc);
for (i = 0; i < ARRAY_SIZE(planeconfigs); i++) {
- p[0].planetype = DRM_PLANE_TYPE_PRIMARY;
p[0].width = (uint64_t)(planeconfigs[i].width * used_w);
p[0].height = (uint64_t)(planeconfigs[i].height * used_h);
p[0].tiling = planeconfigs[i].tiling;
@@ -680,7 +685,6 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
p[0].format = formatlist[k];
for (j = 0; j < ARRAY_SIZE(planeconfigs); j++) {
- p[1].planetype = DRM_PLANE_TYPE_OVERLAY;
p[1].width = (uint64_t)(planeconfigs[j].width * used_w);
p[1].height = (uint64_t)(planeconfigs[j].height * used_h);
p[1].tiling = planeconfigs[j].tiling;
@@ -689,7 +693,6 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
for (l = 0; l < ARRAY_SIZE(formatlist); l++) {
p[1].format = formatlist[l];
-
/*
* RGB565 90/270 degrees rotation is supported
* from gen11 onwards.
@@ -703,42 +706,134 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
(planeconfigs[j].rotation & (IGT_ROTATION_90 | IGT_ROTATION_270))
&& intel_gen(data->devid) < 11)
continue;
+ /*
+ * if using packed formats crc's will be
+ * same and can store them so there's
+ * no need to redo comparison image and
+ * just use stored crc.
+ */
+ if (p[0].format != DRM_FORMAT_NV12 &&
+ p[1].format != DRM_FORMAT_NV12 &&
+ crclog[ctz(planeconfigs[i].rotation) | (ctz(planeconfigs[j].rotation) << 2)].frame != 0) {
+ retcrc_sw = crclog[ctz(planeconfigs[i].rotation) | (ctz(planeconfigs[j].rotation) << 2)];
+ have_crc = true;
+ } else if (p[0].format == DRM_FORMAT_NV12 &&
+ p[1].format != DRM_FORMAT_NV12 &&
+ lastroundjformat != DRM_FORMAT_NV12 &&
+ planeconfigs[i].rotation == lastroundirotation &&
+ planeconfigs[j].rotation == lastroundjrotation) {
+ /*
+ * With NV12 can benefit from
+ * previous crc if rotations
+ * stay same. If both planes
+ * have NV12 in use we need to
+ * skip that case.
+ * If last round right plane
+ * had NV12 need to skip this.
+ */
+ have_crc = true;
+ } else {
+ /*
+ * here will be created
+ * comparison image and get crc
+ * if didn't have stored crc
+ * or planar format is in use.
+ * have_crc flag will control
+ * crc comparison part.
+ */
+ p[0].rotation_sw = planeconfigs[i].rotation;
+ p[0].rotation_hw = IGT_ROTATION_0;
+ p[1].rotation_sw = planeconfigs[j].rotation;
+ p[1].rotation_hw = IGT_ROTATION_0;
+ if (!setup_multiplane(data,
+ (planeinfos *)&p,
+ &planeconfigs[i].fbs[k][MULTIPLANE_REFERENCE],
+ &planeconfigs[j].fbs[l][MULTIPLANE_REFERENCE]))
+ continue;
+ igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+ flipsw = kmstest_get_vblank(data->gfx_fd, pipe, 0) + 1;
+ have_crc = false;
+ }
- p[0].rotation_sw = planeconfigs[i].rotation;
- p[0].rotation_hw = IGT_ROTATION_0;
- p[1].rotation_sw = planeconfigs[j].rotation;
- p[1].rotation_hw = IGT_ROTATION_0;
- if (!get_multiplane_crc(data, output, &retcrc_sw,
- (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
+ /*
+ * create hw rotated image and
+ * get vblank where interesting
+ * crc will be at, grab crc bit later
+ */
+ p[0].rotation_sw = IGT_ROTATION_0;
+ p[0].rotation_hw = planeconfigs[i].rotation;
+ p[1].rotation_sw = IGT_ROTATION_0;
+ p[1].rotation_hw = planeconfigs[j].rotation;
+
+ if (!setup_multiplane(data,
+ (planeinfos *)&p,
+ &planeconfigs[i].fbs[k][MULTIPLANE_ROTATED],
+ &planeconfigs[j].fbs[l][MULTIPLANE_ROTATED]))
continue;
- igt_swap(p[0].rotation_sw, p[0].rotation_hw);
- igt_swap(p[1].rotation_sw, p[1].rotation_hw);
- if (!get_multiplane_crc(data, output, &retcrc_hw,
- (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
- continue;
+ igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+ fliphw = kmstest_get_vblank(data->gfx_fd, pipe, 0) + 1;
+
+ if (!have_crc) {
+ igt_pipe_crc_get_for_frame(data->gfx_fd,
+ data->pipe_crc,
+ flipsw,
+ &retcrc_sw);
+
+ if (p[0].format != DRM_FORMAT_NV12 && p[1].format != DRM_FORMAT_NV12)
+ crclog[ctz(planeconfigs[i].rotation) | (ctz(planeconfigs[j].rotation) << 2)]
+ = retcrc_sw;
+ }
+ igt_pipe_crc_get_for_frame(data->gfx_fd, data->pipe_crc, fliphw, &retcrc_hw);
+
+ str1 = igt_crc_to_string(&retcrc_sw);
+ str2 = igt_crc_to_string(&retcrc_hw);
+
+ igt_debug("crc %.8s vs %.8s -- %.4s - %.4s crc buffered:%s rot1 %d rot2 %d\n",
+ str1, str2,
+ (char *) &p[0].format, (char *) &p[1].format,
+ have_crc?"yes":" no",
+ (int[]) {0, 90, 180, 270} [ctz(planeconfigs[i].rotation)],
+ (int[]) {0, 90, 180, 270} [ctz(planeconfigs[j].rotation)]);
+
+ free(str1);
+ free(str2);
+
igt_assert_crc_equal(&retcrc_sw, &retcrc_hw);
+
+ lastroundjformat = p[1].format;
+ lastroundirotation = planeconfigs[i].rotation;
+ lastroundjrotation = planeconfigs[j].rotation;
}
}
}
}
igt_pipe_crc_stop(data->pipe_crc);
igt_pipe_crc_free(data->pipe_crc);
- igt_output_set_pipe(output, PIPE_ANY);
- }
- /*
- * Old fbs are deleted only after new ones are set on planes.
- * This is done to speed up the test
- */
- oldplanes = data->multiplaneoldview;
- for (c = 0; c < MAXMULTIPLANESAMOUNT && oldplanes; c++)
- igt_remove_fb(data->gfx_fd, &oldplanes[c].fb);
-
- free(oldplanes);
- data->multiplaneoldview = NULL;
+ igt_plane_set_fb(p[0].plane, NULL);
+ igt_plane_set_fb(p[1].plane, NULL);
+ igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+
+ for (i = 0; i < ARRAY_SIZE(crclog); i++)
+ crclog[i].frame = 0;
+
+ lastroundjformat = 0;
+ lastroundirotation = 0;
+ lastroundjrotation = 0;
+
+
+ igt_output_set_pipe(output, PIPE_NONE);
+ }
data->pipe_crc = NULL;
+
+ for (c = 0; c < ARRAY_SIZE(planeconfigs); c++) {
+ for (d = 0; d < ARRAY_SIZE(formatlist); d++) {
+ igt_remove_fb(data->gfx_fd, &planeconfigs[c].fbs[d][MULTIPLANE_REFERENCE]);
+ igt_remove_fb(data->gfx_fd, &planeconfigs[c].fbs[d][MULTIPLANE_ROTATED]);
+ }
+ }
}
static void test_plane_rotation_exhaust_fences(data_t *data,
--
2.28.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] tests/kms_rotation_crc: reduce executions time on multiplane tests
2021-02-18 16:14 [igt-dev] [PATCH i-g-t 1/2] " Juha-Pekka Heikkila
@ 2021-03-02 11:13 ` Karthik B S
0 siblings, 0 replies; 13+ messages in thread
From: Karthik B S @ 2021-03-02 11:13 UTC (permalink / raw)
To: Juha-Pekka Heikkila, igt-dev
On 2/18/2021 9:44 PM, Juha-Pekka Heikkila wrote:
> Reduce repetitive work and wait less. Buffer created fbs. Log counted crcs.
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Looks good to me.
Reviewed-by: Karthik B S <karthik.b.s@intel.com>
> ---
> tests/kms_rotation_crc.c | 235 +++++++++++++++++++++++++++------------
> 1 file changed, 165 insertions(+), 70 deletions(-)
>
> diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
> index 6d4e87ed9..6233c773a 100644
> --- a/tests/kms_rotation_crc.c
> +++ b/tests/kms_rotation_crc.c
> @@ -31,6 +31,8 @@
> #define TEST_MAX_WIDTH 640
> #define TEST_MAX_HEIGHT 480
> #define MAX_TESTED_MODES 8
> +#define MULTIPLANE_REFERENCE 0
> +#define MULTIPLANE_ROTATED 1
>
> struct p_struct {
> igt_plane_t *plane;
> @@ -522,26 +524,19 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
>
> typedef struct {
> int32_t x1, y1;
> - uint64_t width, height, tiling, planetype, format;
> + uint64_t width, height, tiling, format;
> + igt_plane_t *plane;
> igt_rotation_t rotation_sw, rotation_hw;
> } planeinfos;
>
> -static bool get_multiplane_crc(data_t *data, igt_output_t *output,
> - igt_crc_t *crc_output, planeinfos *planeinfo,
> - int numplanes)
> +static bool setup_multiplane(data_t *data, planeinfos *planeinfo,
> + struct igt_fb *fbleft, struct igt_fb *fbright)
> {
> uint32_t w, h;
> - igt_display_t *display = &data->display;
> - struct p_struct *planes, *oldplanes;
> - int c, ret;
> -
> - oldplanes = data->multiplaneoldview;
> - planes = calloc(sizeof(*planes), numplanes);
> -
> - for (c = 0; c < numplanes; c++) {
> - planes[c].plane = igt_output_get_plane_type(output,
> - planeinfo[c].planetype);
> + struct igt_fb *planes[2] = {fbleft, fbright};
> + int c;
>
> + for (c = 0; c < ARRAY_SIZE(planes); c++) {
> /*
> * make plane and fb width and height always divisible by 4
> * due to NV12 support and Intel hw workarounds.
> @@ -552,34 +547,33 @@ static bool get_multiplane_crc(data_t *data, igt_output_t *output,
> if (planeinfo[c].rotation_sw & (IGT_ROTATION_90 | IGT_ROTATION_270))
> igt_swap(w, h);
>
> - if (!igt_plane_has_format_mod(planes[c].plane,
> + if (!igt_plane_has_format_mod(planeinfo[c].plane,
> planeinfo[c].format,
> planeinfo[c].tiling))
> return false;
>
> - igt_create_fb(data->gfx_fd, w, h, planeinfo[c].format,
> - planeinfo[c].tiling, &planes[c].fb);
> + /*
> + * was this hw/sw rotation ran already or need to create
> + * new fb?
> + */
> + if (planes[c]->fb_id == 0) {
> + igt_create_fb(data->gfx_fd, w, h, planeinfo[c].format,
> + planeinfo[c].tiling, planes[c]);
>
> - paint_squares(data, planeinfo[c].rotation_sw, &planes[c].fb, 1.0f);
> - igt_plane_set_fb(planes[c].plane, &planes[c].fb);
> + paint_squares(data, planeinfo[c].rotation_sw,
> + planes[c], 1.0f);
> + }
> + igt_plane_set_fb(planeinfo[c].plane, planes[c]);
>
> if (planeinfo[c].rotation_hw & (IGT_ROTATION_90 | IGT_ROTATION_270))
> - igt_plane_set_size(planes[c].plane, h, w);
> -
> - igt_plane_set_position(planes[c].plane, planeinfo[c].x1, planeinfo[c].y1);
> - igt_plane_set_rotation(planes[c].plane, planeinfo[c].rotation_hw);
> - }
> -
> - ret = igt_display_try_commit2(display, COMMIT_ATOMIC);
> - igt_assert_eq(ret, 0);
> -
> - igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, crc_output);
> + igt_plane_set_size(planeinfo[c].plane, h, w);
>
> - for (c = 0; c < numplanes && oldplanes; c++)
> - igt_remove_fb(data->gfx_fd, &oldplanes[c].fb);
> + igt_plane_set_position(planeinfo[c].plane, planeinfo[c].x1,
> + planeinfo[c].y1);
>
> - free(oldplanes);
> - data->multiplaneoldview = (void*)planes;
> + igt_plane_set_rotation(planeinfo[c].plane,
> + planeinfo[c].rotation_hw);
> + }
> return true;
> }
>
> @@ -613,6 +607,11 @@ static void pointlocation(data_t *data, planeinfos *p, drmModeModeInfo *mode,
> }
> }
>
> +/*
> + * count trailing zeroes
> + */
> +#define ctz __builtin_ctz
> +
> /*
> * Here is pipe parameter which is now used only for first pipe.
> * It is left here if this test ever was wanted to be run on
> @@ -624,15 +623,26 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
> igt_output_t *output;
> igt_crc_t retcrc_sw, retcrc_hw;
> planeinfos p[2];
> - int c, used_w, used_h;
> - struct p_struct *oldplanes;
> + int used_w, used_h, lastroundirotation = 0, lastroundjrotation = 0,
> + lastroundjformat = 0, c, d;
> drmModeModeInfo *mode;
> + bool have_crc; // flag if can use previously logged crc for comparison
> + igt_crc_t crclog[16] = {}; //4 * 4 rotation crc storage for packed formats
> + char *str1, *str2; // for debug printouts
> +
> + /*
> + * These are those modes which are tested. For testing feel interesting
> + * case with tiling are 2 bpp, 4 bpp and NV12.
> + */
> + static const uint32_t formatlist[] = {DRM_FORMAT_RGB565,
> + DRM_FORMAT_XRGB8888, DRM_FORMAT_NV12};
>
> - static const struct {
> + static struct {
> igt_rotation_t rotation;
> float_t width;
> float_t height;
> uint64_t tiling;
> + struct igt_fb fbs[ARRAY_SIZE(formatlist)][2];
> } planeconfigs[] = {
> {IGT_ROTATION_0, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE },
> {IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED },
> @@ -648,15 +658,8 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
> {IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
> };
>
> - /*
> - * These are those modes which are tested. For testing feel interesting
> - * case with tiling are 2 bpp, 4 bpp and NV12.
> - */
> - static const uint32_t formatlist[] = {DRM_FORMAT_RGB565,
> - DRM_FORMAT_XRGB8888, DRM_FORMAT_NV12};
> -
> for_each_valid_output_on_pipe(display, pipe, output) {
> - int i, j, k, l;
> + int i, j, k, l, flipsw, fliphw;
> igt_output_set_pipe(output, pipe);
> mode = igt_output_get_mode(output);
> igt_display_require_output(display);
> @@ -665,12 +668,14 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
> used_w = min(TEST_MAX_WIDTH, mode->hdisplay);
> used_h = min(TEST_MAX_HEIGHT, mode->vdisplay);
>
> + p[0].plane = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> + p[1].plane = igt_output_get_plane_type(output, DRM_PLANE_TYPE_OVERLAY);
> +
> data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
> INTEL_PIPE_CRC_SOURCE_AUTO);
> igt_pipe_crc_start(data->pipe_crc);
>
> for (i = 0; i < ARRAY_SIZE(planeconfigs); i++) {
> - p[0].planetype = DRM_PLANE_TYPE_PRIMARY;
> p[0].width = (uint64_t)(planeconfigs[i].width * used_w);
> p[0].height = (uint64_t)(planeconfigs[i].height * used_h);
> p[0].tiling = planeconfigs[i].tiling;
> @@ -680,7 +685,6 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
> p[0].format = formatlist[k];
>
> for (j = 0; j < ARRAY_SIZE(planeconfigs); j++) {
> - p[1].planetype = DRM_PLANE_TYPE_OVERLAY;
> p[1].width = (uint64_t)(planeconfigs[j].width * used_w);
> p[1].height = (uint64_t)(planeconfigs[j].height * used_h);
> p[1].tiling = planeconfigs[j].tiling;
> @@ -689,7 +693,6 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
>
> for (l = 0; l < ARRAY_SIZE(formatlist); l++) {
> p[1].format = formatlist[l];
> -
> /*
> * RGB565 90/270 degrees rotation is supported
> * from gen11 onwards.
> @@ -703,42 +706,134 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
> (planeconfigs[j].rotation & (IGT_ROTATION_90 | IGT_ROTATION_270))
> && intel_gen(data->devid) < 11)
> continue;
> + /*
> + * if using packed formats crc's will be
> + * same and can store them so there's
> + * no need to redo comparison image and
> + * just use stored crc.
> + */
> + if (p[0].format != DRM_FORMAT_NV12 &&
> + p[1].format != DRM_FORMAT_NV12 &&
> + crclog[ctz(planeconfigs[i].rotation) | (ctz(planeconfigs[j].rotation) << 2)].frame != 0) {
> + retcrc_sw = crclog[ctz(planeconfigs[i].rotation) | (ctz(planeconfigs[j].rotation) << 2)];
> + have_crc = true;
> + } else if (p[0].format == DRM_FORMAT_NV12 &&
> + p[1].format != DRM_FORMAT_NV12 &&
> + lastroundjformat != DRM_FORMAT_NV12 &&
> + planeconfigs[i].rotation == lastroundirotation &&
> + planeconfigs[j].rotation == lastroundjrotation) {
> + /*
> + * With NV12 can benefit from
> + * previous crc if rotations
> + * stay same. If both planes
> + * have NV12 in use we need to
> + * skip that case.
> + * If last round right plane
> + * had NV12 need to skip this.
> + */
> + have_crc = true;
> + } else {
> + /*
> + * here will be created
> + * comparison image and get crc
> + * if didn't have stored crc
> + * or planar format is in use.
> + * have_crc flag will control
> + * crc comparison part.
> + */
> + p[0].rotation_sw = planeconfigs[i].rotation;
> + p[0].rotation_hw = IGT_ROTATION_0;
> + p[1].rotation_sw = planeconfigs[j].rotation;
> + p[1].rotation_hw = IGT_ROTATION_0;
> + if (!setup_multiplane(data,
> + (planeinfos *)&p,
> + &planeconfigs[i].fbs[k][MULTIPLANE_REFERENCE],
> + &planeconfigs[j].fbs[l][MULTIPLANE_REFERENCE]))
> + continue;
> + igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> + flipsw = kmstest_get_vblank(data->gfx_fd, pipe, 0) + 1;
> + have_crc = false;
> + }
>
> - p[0].rotation_sw = planeconfigs[i].rotation;
> - p[0].rotation_hw = IGT_ROTATION_0;
> - p[1].rotation_sw = planeconfigs[j].rotation;
> - p[1].rotation_hw = IGT_ROTATION_0;
> - if (!get_multiplane_crc(data, output, &retcrc_sw,
> - (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
> + /*
> + * create hw rotated image and
> + * get vblank where interesting
> + * crc will be at, grab crc bit later
> + */
> + p[0].rotation_sw = IGT_ROTATION_0;
> + p[0].rotation_hw = planeconfigs[i].rotation;
> + p[1].rotation_sw = IGT_ROTATION_0;
> + p[1].rotation_hw = planeconfigs[j].rotation;
> +
> + if (!setup_multiplane(data,
> + (planeinfos *)&p,
> + &planeconfigs[i].fbs[k][MULTIPLANE_ROTATED],
> + &planeconfigs[j].fbs[l][MULTIPLANE_ROTATED]))
> continue;
>
> - igt_swap(p[0].rotation_sw, p[0].rotation_hw);
> - igt_swap(p[1].rotation_sw, p[1].rotation_hw);
> - if (!get_multiplane_crc(data, output, &retcrc_hw,
> - (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
> - continue;
> + igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> + fliphw = kmstest_get_vblank(data->gfx_fd, pipe, 0) + 1;
> +
> + if (!have_crc) {
> + igt_pipe_crc_get_for_frame(data->gfx_fd,
> + data->pipe_crc,
> + flipsw,
> + &retcrc_sw);
> +
> + if (p[0].format != DRM_FORMAT_NV12 && p[1].format != DRM_FORMAT_NV12)
> + crclog[ctz(planeconfigs[i].rotation) | (ctz(planeconfigs[j].rotation) << 2)]
> + = retcrc_sw;
> + }
> + igt_pipe_crc_get_for_frame(data->gfx_fd, data->pipe_crc, fliphw, &retcrc_hw);
> +
> + str1 = igt_crc_to_string(&retcrc_sw);
> + str2 = igt_crc_to_string(&retcrc_hw);
> +
> + igt_debug("crc %.8s vs %.8s -- %.4s - %.4s crc buffered:%s rot1 %d rot2 %d\n",
> + str1, str2,
> + (char *) &p[0].format, (char *) &p[1].format,
> + have_crc?"yes":" no",
> + (int[]) {0, 90, 180, 270} [ctz(planeconfigs[i].rotation)],
> + (int[]) {0, 90, 180, 270} [ctz(planeconfigs[j].rotation)]);
> +
> + free(str1);
> + free(str2);
> +
>
> igt_assert_crc_equal(&retcrc_sw, &retcrc_hw);
> +
> + lastroundjformat = p[1].format;
> + lastroundirotation = planeconfigs[i].rotation;
> + lastroundjrotation = planeconfigs[j].rotation;
> }
> }
> }
> }
> igt_pipe_crc_stop(data->pipe_crc);
> igt_pipe_crc_free(data->pipe_crc);
> - igt_output_set_pipe(output, PIPE_ANY);
> - }
>
> - /*
> - * Old fbs are deleted only after new ones are set on planes.
> - * This is done to speed up the test
> - */
> - oldplanes = data->multiplaneoldview;
> - for (c = 0; c < MAXMULTIPLANESAMOUNT && oldplanes; c++)
> - igt_remove_fb(data->gfx_fd, &oldplanes[c].fb);
> -
> - free(oldplanes);
> - data->multiplaneoldview = NULL;
> + igt_plane_set_fb(p[0].plane, NULL);
> + igt_plane_set_fb(p[1].plane, NULL);
> + igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> +
> + for (i = 0; i < ARRAY_SIZE(crclog); i++)
> + crclog[i].frame = 0;
> +
> + lastroundjformat = 0;
> + lastroundirotation = 0;
> + lastroundjrotation = 0;
> +
> +
> + igt_output_set_pipe(output, PIPE_NONE);
> + }
> data->pipe_crc = NULL;
> +
> + for (c = 0; c < ARRAY_SIZE(planeconfigs); c++) {
> + for (d = 0; d < ARRAY_SIZE(formatlist); d++) {
> + igt_remove_fb(data->gfx_fd, &planeconfigs[c].fbs[d][MULTIPLANE_REFERENCE]);
> + igt_remove_fb(data->gfx_fd, &planeconfigs[c].fbs[d][MULTIPLANE_ROTATED]);
> + }
> + }
> }
>
> static void test_plane_rotation_exhaust_fences(data_t *data,
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 13+ messages in thread
* [igt-dev] [PATCH i-g-t 1/2] tests/kms_rotation_crc: reduce executions time on multiplane tests
@ 2021-02-17 20:12 Juha-Pekka Heikkila
0 siblings, 0 replies; 13+ messages in thread
From: Juha-Pekka Heikkila @ 2021-02-17 20:12 UTC (permalink / raw)
To: igt-dev
Reduce repetitive work and wait less. Buffer created fbs. Log counted crcs.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
tests/kms_rotation_crc.c | 224 +++++++++++++++++++++++++++------------
1 file changed, 155 insertions(+), 69 deletions(-)
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 6d4e87ed9..eb3ec3372 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -31,6 +31,8 @@
#define TEST_MAX_WIDTH 640
#define TEST_MAX_HEIGHT 480
#define MAX_TESTED_MODES 8
+#define MULTIPLANE_REFERENCE 0
+#define MULTIPLANE_ROTATED 1
struct p_struct {
igt_plane_t *plane;
@@ -522,26 +524,19 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
typedef struct {
int32_t x1, y1;
- uint64_t width, height, tiling, planetype, format;
+ uint64_t width, height, tiling, format;
+ igt_plane_t *plane;
igt_rotation_t rotation_sw, rotation_hw;
} planeinfos;
-static bool get_multiplane_crc(data_t *data, igt_output_t *output,
- igt_crc_t *crc_output, planeinfos *planeinfo,
- int numplanes)
+static bool setup_multiplane(data_t *data, planeinfos *planeinfo,
+ struct igt_fb *fbleft, struct igt_fb *fbright)
{
uint32_t w, h;
- igt_display_t *display = &data->display;
- struct p_struct *planes, *oldplanes;
- int c, ret;
-
- oldplanes = data->multiplaneoldview;
- planes = calloc(sizeof(*planes), numplanes);
-
- for (c = 0; c < numplanes; c++) {
- planes[c].plane = igt_output_get_plane_type(output,
- planeinfo[c].planetype);
+ struct igt_fb *planes[2] = {fbleft, fbright};
+ int c;
+ for (c = 0; c < ARRAY_SIZE(planes); c++) {
/*
* make plane and fb width and height always divisible by 4
* due to NV12 support and Intel hw workarounds.
@@ -552,34 +547,33 @@ static bool get_multiplane_crc(data_t *data, igt_output_t *output,
if (planeinfo[c].rotation_sw & (IGT_ROTATION_90 | IGT_ROTATION_270))
igt_swap(w, h);
- if (!igt_plane_has_format_mod(planes[c].plane,
+ if (!igt_plane_has_format_mod(planeinfo[c].plane,
planeinfo[c].format,
planeinfo[c].tiling))
return false;
- igt_create_fb(data->gfx_fd, w, h, planeinfo[c].format,
- planeinfo[c].tiling, &planes[c].fb);
+ /*
+ * was this hw/sw rotation ran already or need to create
+ * new fb?
+ */
+ if (planes[c]->fb_id == 0) {
+ igt_create_fb(data->gfx_fd, w, h, planeinfo[c].format,
+ planeinfo[c].tiling, planes[c]);
- paint_squares(data, planeinfo[c].rotation_sw, &planes[c].fb, 1.0f);
- igt_plane_set_fb(planes[c].plane, &planes[c].fb);
+ paint_squares(data, planeinfo[c].rotation_sw,
+ planes[c], 1.0f);
+ }
+ igt_plane_set_fb(planeinfo[c].plane, planes[c]);
if (planeinfo[c].rotation_hw & (IGT_ROTATION_90 | IGT_ROTATION_270))
- igt_plane_set_size(planes[c].plane, h, w);
-
- igt_plane_set_position(planes[c].plane, planeinfo[c].x1, planeinfo[c].y1);
- igt_plane_set_rotation(planes[c].plane, planeinfo[c].rotation_hw);
- }
-
- ret = igt_display_try_commit2(display, COMMIT_ATOMIC);
- igt_assert_eq(ret, 0);
-
- igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, crc_output);
+ igt_plane_set_size(planeinfo[c].plane, h, w);
- for (c = 0; c < numplanes && oldplanes; c++)
- igt_remove_fb(data->gfx_fd, &oldplanes[c].fb);
+ igt_plane_set_position(planeinfo[c].plane, planeinfo[c].x1,
+ planeinfo[c].y1);
- free(oldplanes);
- data->multiplaneoldview = (void*)planes;
+ igt_plane_set_rotation(planeinfo[c].plane,
+ planeinfo[c].rotation_hw);
+ }
return true;
}
@@ -613,6 +607,11 @@ static void pointlocation(data_t *data, planeinfos *p, drmModeModeInfo *mode,
}
}
+/*
+ * count trailing zeroes
+ */
+#define ctz __builtin_ctz
+
/*
* Here is pipe parameter which is now used only for first pipe.
* It is left here if this test ever was wanted to be run on
@@ -624,15 +623,26 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
igt_output_t *output;
igt_crc_t retcrc_sw, retcrc_hw;
planeinfos p[2];
- int c, used_w, used_h;
- struct p_struct *oldplanes;
+ int used_w, used_h, lastroundirotation = 0, lastroundjrotation = 0,
+ lastroundjformat = 0;
drmModeModeInfo *mode;
+ bool have_crc; // flag if can use previously logged crc for comparison
+ igt_crc_t crclog[16] = {}; //4 * 4 rotation crc storage for packed formats
+ char *str1, *str2; // for debug printouts
- static const struct {
+ /*
+ * These are those modes which are tested. For testing feel interesting
+ * case with tiling are 2 bpp, 4 bpp and NV12.
+ */
+ static const uint32_t formatlist[] = {DRM_FORMAT_RGB565,
+ DRM_FORMAT_XRGB8888, DRM_FORMAT_NV12};
+
+ static struct {
igt_rotation_t rotation;
float_t width;
float_t height;
uint64_t tiling;
+ struct igt_fb fbs[ARRAY_SIZE(formatlist)][2];
} planeconfigs[] = {
{IGT_ROTATION_0, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE },
{IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED },
@@ -648,15 +658,8 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
{IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
};
- /*
- * These are those modes which are tested. For testing feel interesting
- * case with tiling are 2 bpp, 4 bpp and NV12.
- */
- static const uint32_t formatlist[] = {DRM_FORMAT_RGB565,
- DRM_FORMAT_XRGB8888, DRM_FORMAT_NV12};
-
for_each_valid_output_on_pipe(display, pipe, output) {
- int i, j, k, l;
+ int i, j, k, l, flipsw, fliphw;
igt_output_set_pipe(output, pipe);
mode = igt_output_get_mode(output);
igt_display_require_output(display);
@@ -665,12 +668,14 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
used_w = min(TEST_MAX_WIDTH, mode->hdisplay);
used_h = min(TEST_MAX_HEIGHT, mode->vdisplay);
+ p[0].plane = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+ p[1].plane = igt_output_get_plane_type(output, DRM_PLANE_TYPE_OVERLAY);
+
data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
INTEL_PIPE_CRC_SOURCE_AUTO);
igt_pipe_crc_start(data->pipe_crc);
for (i = 0; i < ARRAY_SIZE(planeconfigs); i++) {
- p[0].planetype = DRM_PLANE_TYPE_PRIMARY;
p[0].width = (uint64_t)(planeconfigs[i].width * used_w);
p[0].height = (uint64_t)(planeconfigs[i].height * used_h);
p[0].tiling = planeconfigs[i].tiling;
@@ -680,7 +685,6 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
p[0].format = formatlist[k];
for (j = 0; j < ARRAY_SIZE(planeconfigs); j++) {
- p[1].planetype = DRM_PLANE_TYPE_OVERLAY;
p[1].width = (uint64_t)(planeconfigs[j].width * used_w);
p[1].height = (uint64_t)(planeconfigs[j].height * used_h);
p[1].tiling = planeconfigs[j].tiling;
@@ -689,7 +693,6 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
for (l = 0; l < ARRAY_SIZE(formatlist); l++) {
p[1].format = formatlist[l];
-
/*
* RGB565 90/270 degrees rotation is supported
* from gen11 onwards.
@@ -703,41 +706,124 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
(planeconfigs[j].rotation & (IGT_ROTATION_90 | IGT_ROTATION_270))
&& intel_gen(data->devid) < 11)
continue;
+ /*
+ * if using packed formats crc's will be
+ * same and can store them so there's
+ * no need to redo comparison image and
+ * just use stored crc.
+ */
+ if (p[0].format != DRM_FORMAT_NV12 &&
+ p[1].format != DRM_FORMAT_NV12 &&
+ crclog[ctz(planeconfigs[i].rotation) | (ctz(planeconfigs[j].rotation) << 2)].frame != 0) {
+ retcrc_sw = crclog[ctz(planeconfigs[i].rotation) | (ctz(planeconfigs[j].rotation) << 2)];
+ have_crc = true;
+ } else if (p[0].format == DRM_FORMAT_NV12 &&
+ p[1].format != DRM_FORMAT_NV12 &&
+ lastroundjformat != DRM_FORMAT_NV12 &&
+ planeconfigs[i].rotation == lastroundirotation &&
+ planeconfigs[j].rotation == lastroundjrotation) {
+ /*
+ * With NV12 can benefit from
+ * previous crc if rotations
+ * stay same. If both planes
+ * have NV12 in use we need to
+ * skip that case.
+ * If last round right plane
+ * had NV12 need to skip this.
+ */
+ have_crc = true;
+ } else {
+ /*
+ * here will be created
+ * comparison image and get crc
+ * if didn't have stored crc
+ * or planar format is in use.
+ * have_crc flag will control
+ * crc comparison part.
+ */
+ p[0].rotation_sw = planeconfigs[i].rotation;
+ p[0].rotation_hw = IGT_ROTATION_0;
+ p[1].rotation_sw = planeconfigs[j].rotation;
+ p[1].rotation_hw = IGT_ROTATION_0;
+ if (!setup_multiplane(data,
+ (planeinfos *)&p,
+ &planeconfigs[i].fbs[k][MULTIPLANE_REFERENCE],
+ &planeconfigs[j].fbs[l][MULTIPLANE_REFERENCE]))
+ continue;
+ igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+ flipsw = kmstest_get_vblank(data->gfx_fd, pipe, 0) + 1;
+ have_crc = false;
+ }
- p[0].rotation_sw = planeconfigs[i].rotation;
- p[0].rotation_hw = IGT_ROTATION_0;
- p[1].rotation_sw = planeconfigs[j].rotation;
- p[1].rotation_hw = IGT_ROTATION_0;
- if (!get_multiplane_crc(data, output, &retcrc_sw,
- (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
+ /*
+ * create hw rotated image and
+ * get vblank where interesting
+ * crc will be at, grab crc bit later
+ */
+ p[0].rotation_sw = IGT_ROTATION_0;
+ p[0].rotation_hw = planeconfigs[i].rotation;
+ p[1].rotation_sw = IGT_ROTATION_0;
+ p[1].rotation_hw = planeconfigs[j].rotation;
+
+ if (!setup_multiplane(data,
+ (planeinfos *)&p,
+ &planeconfigs[i].fbs[k][MULTIPLANE_ROTATED],
+ &planeconfigs[j].fbs[l][MULTIPLANE_ROTATED]))
continue;
- igt_swap(p[0].rotation_sw, p[0].rotation_hw);
- igt_swap(p[1].rotation_sw, p[1].rotation_hw);
- if (!get_multiplane_crc(data, output, &retcrc_hw,
- (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
- continue;
+ igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+ fliphw = kmstest_get_vblank(data->gfx_fd, pipe, 0) + 1;
+
+ if (!have_crc) {
+ igt_pipe_crc_get_for_frame(data->gfx_fd,
+ data->pipe_crc,
+ flipsw,
+ &retcrc_sw);
+
+ if (p[0].format != DRM_FORMAT_NV12 && p[1].format != DRM_FORMAT_NV12 )
+ crclog[ctz(planeconfigs[i].rotation) | (ctz(planeconfigs[j].rotation) << 2)]
+ = retcrc_sw;
+ }
+ igt_pipe_crc_get_for_frame(data->gfx_fd, data->pipe_crc, fliphw, &retcrc_hw);
+
+ str1 = igt_crc_to_string(&retcrc_sw);
+ str2 = igt_crc_to_string(&retcrc_hw);
+
+ igt_debug("crc %.8s vs %.8s -- %.4s - %.4s crc buffered:%s rot1 %d rot2 %d\n",
+ str1, str2,
+ (char*) &p[0].format, (char*) &p[1].format,
+ have_crc?"yes":" no",
+ (int[]) {0, 90, 180, 270}[ctz(planeconfigs[i].rotation)],
+ (int[]) {0, 90, 180, 270}[ctz(planeconfigs[j].rotation)]);
+
+ free(str1);
+ free(str2);
+
igt_assert_crc_equal(&retcrc_sw, &retcrc_hw);
+
+ lastroundjformat = p[1].format;
+ lastroundirotation = planeconfigs[i].rotation;
+ lastroundjrotation = planeconfigs[j].rotation;
}
}
}
}
igt_pipe_crc_stop(data->pipe_crc);
igt_pipe_crc_free(data->pipe_crc);
- igt_output_set_pipe(output, PIPE_ANY);
- }
- /*
- * Old fbs are deleted only after new ones are set on planes.
- * This is done to speed up the test
- */
- oldplanes = data->multiplaneoldview;
- for (c = 0; c < MAXMULTIPLANESAMOUNT && oldplanes; c++)
- igt_remove_fb(data->gfx_fd, &oldplanes[c].fb);
+ igt_plane_set_fb(p[0].plane, NULL);
+ igt_plane_set_fb(p[1].plane, NULL);
+ igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
- free(oldplanes);
- data->multiplaneoldview = NULL;
+ for (i = 0; i < ARRAY_SIZE(planeconfigs); i++) {
+ for (j = 0; j < ARRAY_SIZE(formatlist); j++) {
+ igt_remove_fb(data->gfx_fd, &planeconfigs[i].fbs[j][MULTIPLANE_REFERENCE]);
+ igt_remove_fb(data->gfx_fd, &planeconfigs[i].fbs[j][MULTIPLANE_ROTATED]);
+ }
+ }
+ igt_output_set_pipe(output, PIPE_NONE);
+ }
data->pipe_crc = NULL;
}
--
2.28.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [igt-dev] [PATCH i-g-t 1/2] tests/kms_rotation_crc: reduce executions time on multiplane tests
@ 2021-02-16 15:34 Juha-Pekka Heikkila
0 siblings, 0 replies; 13+ messages in thread
From: Juha-Pekka Heikkila @ 2021-02-16 15:34 UTC (permalink / raw)
To: igt-dev
Reduce repetitive work and wait less. Buffer created fbs. Log counted crcs.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
tests/kms_rotation_crc.c | 228 +++++++++++++++++++++++++--------------
1 file changed, 148 insertions(+), 80 deletions(-)
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 6d4e87ed9..6e10d6e13 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -31,6 +31,8 @@
#define TEST_MAX_WIDTH 640
#define TEST_MAX_HEIGHT 480
#define MAX_TESTED_MODES 8
+#define MULTIPLANE_REFERENCE 0
+#define MULTIPLANE_ROTATED 1
struct p_struct {
igt_plane_t *plane;
@@ -522,26 +524,19 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
typedef struct {
int32_t x1, y1;
- uint64_t width, height, tiling, planetype, format;
+ uint64_t width, height, tiling, format;
+ igt_plane_t *plane;
igt_rotation_t rotation_sw, rotation_hw;
} planeinfos;
-static bool get_multiplane_crc(data_t *data, igt_output_t *output,
- igt_crc_t *crc_output, planeinfos *planeinfo,
- int numplanes)
+static bool setup_multiplane(data_t *data, planeinfos *planeinfo,
+ struct igt_fb *fbleft, struct igt_fb *fbright)
{
uint32_t w, h;
- igt_display_t *display = &data->display;
- struct p_struct *planes, *oldplanes;
- int c, ret;
-
- oldplanes = data->multiplaneoldview;
- planes = calloc(sizeof(*planes), numplanes);
-
- for (c = 0; c < numplanes; c++) {
- planes[c].plane = igt_output_get_plane_type(output,
- planeinfo[c].planetype);
+ struct igt_fb *planes[2] = {fbleft, fbright};
+ int c;
+ for (c = 0; c < ARRAY_SIZE(planes); c++) {
/*
* make plane and fb width and height always divisible by 4
* due to NV12 support and Intel hw workarounds.
@@ -552,34 +547,33 @@ static bool get_multiplane_crc(data_t *data, igt_output_t *output,
if (planeinfo[c].rotation_sw & (IGT_ROTATION_90 | IGT_ROTATION_270))
igt_swap(w, h);
- if (!igt_plane_has_format_mod(planes[c].plane,
+ if (!igt_plane_has_format_mod(planeinfo[c].plane,
planeinfo[c].format,
planeinfo[c].tiling))
return false;
- igt_create_fb(data->gfx_fd, w, h, planeinfo[c].format,
- planeinfo[c].tiling, &planes[c].fb);
+ /*
+ * was this hw/sw rotation ran already or need to create
+ * new fb?
+ */
+ if (planes[c]->fb_id == 0) {
+ igt_create_fb(data->gfx_fd, w, h, planeinfo[c].format,
+ planeinfo[c].tiling, planes[c]);
- paint_squares(data, planeinfo[c].rotation_sw, &planes[c].fb, 1.0f);
- igt_plane_set_fb(planes[c].plane, &planes[c].fb);
+ paint_squares(data, planeinfo[c].rotation_sw,
+ planes[c], 1.0f);
+ }
+ igt_plane_set_fb(planeinfo[c].plane, planes[c]);
if (planeinfo[c].rotation_hw & (IGT_ROTATION_90 | IGT_ROTATION_270))
- igt_plane_set_size(planes[c].plane, h, w);
-
- igt_plane_set_position(planes[c].plane, planeinfo[c].x1, planeinfo[c].y1);
- igt_plane_set_rotation(planes[c].plane, planeinfo[c].rotation_hw);
- }
-
- ret = igt_display_try_commit2(display, COMMIT_ATOMIC);
- igt_assert_eq(ret, 0);
+ igt_plane_set_size(planeinfo[c].plane, h, w);
- igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, crc_output);
+ igt_plane_set_position(planeinfo[c].plane, planeinfo[c].x1,
+ planeinfo[c].y1);
- for (c = 0; c < numplanes && oldplanes; c++)
- igt_remove_fb(data->gfx_fd, &oldplanes[c].fb);
-
- free(oldplanes);
- data->multiplaneoldview = (void*)planes;
+ igt_plane_set_rotation(planeinfo[c].plane,
+ planeinfo[c].rotation_hw);
+ }
return true;
}
@@ -613,6 +607,11 @@ static void pointlocation(data_t *data, planeinfos *p, drmModeModeInfo *mode,
}
}
+/*
+ * count trailing zeroes
+ */
+#define ctz __builtin_ctz
+
/*
* Here is pipe parameter which is now used only for first pipe.
* It is left here if this test ever was wanted to be run on
@@ -624,29 +623,10 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
igt_output_t *output;
igt_crc_t retcrc_sw, retcrc_hw;
planeinfos p[2];
- int c, used_w, used_h;
- struct p_struct *oldplanes;
+ int used_w, used_h, lastroundirotation = 0, lastroundjrotation = 0;
drmModeModeInfo *mode;
-
- static const struct {
- igt_rotation_t rotation;
- float_t width;
- float_t height;
- uint64_t tiling;
- } planeconfigs[] = {
- {IGT_ROTATION_0, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE },
- {IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED },
- {IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- {IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- {IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- };
+ bool have_crc;
+ igt_crc_t crclog[16] = {}; //4 * 4 rotation crc storage for packed formats
/*
* These are those modes which are tested. For testing feel interesting
@@ -655,8 +635,30 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
static const uint32_t formatlist[] = {DRM_FORMAT_RGB565,
DRM_FORMAT_XRGB8888, DRM_FORMAT_NV12};
+ static struct {
+ const char* txt;
+ igt_rotation_t rotation;
+ float_t width;
+ float_t height;
+ uint64_t tiling;
+ struct igt_fb fbs[ARRAY_SIZE(formatlist)][2];
+ } planeconfigs[] = {
+ {"rotation 0 modifier none", IGT_ROTATION_0, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE},
+ {"rotation 0 modifier x-tile", IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED},
+ {"rotation 0 modifier y-tile", IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED},
+ {"rotation 0 modifier yf-tile", IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED},
+ {"rotation 90 modifier y-tile", IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED},
+ {"rotation 90 modifier yf-tile", IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED},
+ {"rotation 180 modifier none", IGT_ROTATION_180, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE},
+ {"rotation 180 modifier x-tile", IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED},
+ {"rotation 180 modifier y-tile", IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED},
+ {"rotation 180 modifier yf-tile", IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED},
+ {"rotation 270 modifier y-tile", IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED},
+ {"rotation 270 modifier yf-tile", IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED},
+ };
+
for_each_valid_output_on_pipe(display, pipe, output) {
- int i, j, k, l;
+ int i, j, k, l, flipsw, fliphw;
igt_output_set_pipe(output, pipe);
mode = igt_output_get_mode(output);
igt_display_require_output(display);
@@ -665,12 +667,14 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
used_w = min(TEST_MAX_WIDTH, mode->hdisplay);
used_h = min(TEST_MAX_HEIGHT, mode->vdisplay);
+ p[0].plane = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+ p[1].plane = igt_output_get_plane_type(output, DRM_PLANE_TYPE_OVERLAY);
+
data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
INTEL_PIPE_CRC_SOURCE_AUTO);
igt_pipe_crc_start(data->pipe_crc);
for (i = 0; i < ARRAY_SIZE(planeconfigs); i++) {
- p[0].planetype = DRM_PLANE_TYPE_PRIMARY;
p[0].width = (uint64_t)(planeconfigs[i].width * used_w);
p[0].height = (uint64_t)(planeconfigs[i].height * used_h);
p[0].tiling = planeconfigs[i].tiling;
@@ -680,7 +684,6 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
p[0].format = formatlist[k];
for (j = 0; j < ARRAY_SIZE(planeconfigs); j++) {
- p[1].planetype = DRM_PLANE_TYPE_OVERLAY;
p[1].width = (uint64_t)(planeconfigs[j].width * used_w);
p[1].height = (uint64_t)(planeconfigs[j].height * used_h);
p[1].tiling = planeconfigs[j].tiling;
@@ -704,20 +707,85 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
&& intel_gen(data->devid) < 11)
continue;
- p[0].rotation_sw = planeconfigs[i].rotation;
- p[0].rotation_hw = IGT_ROTATION_0;
- p[1].rotation_sw = planeconfigs[j].rotation;
- p[1].rotation_hw = IGT_ROTATION_0;
- if (!get_multiplane_crc(data, output, &retcrc_sw,
- (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
- continue;
+ igt_debug("plane1 %s %.4s plane2 %s %.4s\n",
+ planeconfigs[i].txt,
+ (char*) &p[0].format,
+ planeconfigs[j].txt,
+ (char*) &p[1].format);
+
+ /*
+ * if using packed formats crc's will be
+ * same and can store them so there's
+ * no need to redo comparison image and
+ * just use stored crc.
+ * --
+ * Only p[0].format can be NV12
+ */
+ if (p[0].format != DRM_FORMAT_NV12 &&
+ crclog[ctz(planeconfigs[i].rotation) | (ctz(planeconfigs[j].rotation) << 2)].frame != 0) {
+ retcrc_sw = crclog[ctz(planeconfigs[i].rotation) | (ctz(planeconfigs[j].rotation) << 2)];
+ have_crc = true;
+ } else if (p[0].format == DRM_FORMAT_NV12 &&
+ planeconfigs[i].rotation == lastroundirotation &&
+ planeconfigs[j].rotation == lastroundjrotation) {
+ /*
+ * With NV12 can benefit from
+ * previous crc if rotations
+ * stay same
+ */
+ have_crc = true;
+ } else {
+ /*
+ * here will be created
+ * comparison image and get crc
+ * if didn't have stored crc
+ * or planar format is in use.
+ * have_crc flag will control
+ * crc comparison part.
+ */
+ p[0].rotation_sw = planeconfigs[i].rotation;
+ p[0].rotation_hw = IGT_ROTATION_0;
+ p[1].rotation_sw = planeconfigs[j].rotation;
+ p[1].rotation_hw = IGT_ROTATION_0;
+ if (!setup_multiplane(data,
+ (planeinfos *)&p,
+ &planeconfigs[i].fbs[k][MULTIPLANE_REFERENCE],
+ &planeconfigs[j].fbs[l][MULTIPLANE_REFERENCE]))
+ continue;
+ igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+ flipsw = kmstest_get_vblank(data->gfx_fd, pipe, 0) + 1;
+ have_crc = false;
+ }
- igt_swap(p[0].rotation_sw, p[0].rotation_hw);
- igt_swap(p[1].rotation_sw, p[1].rotation_hw);
- if (!get_multiplane_crc(data, output, &retcrc_hw,
- (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
+ /*
+ * create hw rotated image and
+ * get vblank where interesting
+ * crc will be at, grab crc bit later
+ */
+ p[0].rotation_sw = IGT_ROTATION_0;
+ p[0].rotation_hw = lastroundirotation = planeconfigs[i].rotation;
+ p[1].rotation_sw = IGT_ROTATION_0;
+ p[1].rotation_hw = lastroundjrotation = planeconfigs[j].rotation;
+
+ if (!setup_multiplane(data,
+ (planeinfos *)&p,
+ &planeconfigs[i].fbs[k][MULTIPLANE_ROTATED],
+ &planeconfigs[j].fbs[l][MULTIPLANE_ROTATED]))
continue;
+ igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+ fliphw = kmstest_get_vblank(data->gfx_fd, pipe, 0) + 1;
+
+ if (!have_crc) {
+ igt_pipe_crc_get_for_frame(data->gfx_fd,
+ data->pipe_crc,
+ flipsw,
+ &retcrc_sw);
+
+ if (p[0].format != DRM_FORMAT_NV12)
+ crclog[ctz(planeconfigs[i].rotation) | (ctz(planeconfigs[j].rotation) << 2)] = retcrc_sw;
+ }
+ igt_pipe_crc_get_for_frame(data->gfx_fd, data->pipe_crc, fliphw, &retcrc_hw);
igt_assert_crc_equal(&retcrc_sw, &retcrc_hw);
}
}
@@ -725,19 +793,19 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
}
igt_pipe_crc_stop(data->pipe_crc);
igt_pipe_crc_free(data->pipe_crc);
- igt_output_set_pipe(output, PIPE_ANY);
- }
- /*
- * Old fbs are deleted only after new ones are set on planes.
- * This is done to speed up the test
- */
- oldplanes = data->multiplaneoldview;
- for (c = 0; c < MAXMULTIPLANESAMOUNT && oldplanes; c++)
- igt_remove_fb(data->gfx_fd, &oldplanes[c].fb);
+ igt_plane_set_fb(p[0].plane, NULL);
+ igt_plane_set_fb(p[1].plane, NULL);
+ igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
- free(oldplanes);
- data->multiplaneoldview = NULL;
+ for (i = 0; i < ARRAY_SIZE(planeconfigs); i++) {
+ for (j = 0; j < ARRAY_SIZE(formatlist); j++) {
+ igt_remove_fb(data->gfx_fd, &planeconfigs[i].fbs[j][MULTIPLANE_REFERENCE]);
+ igt_remove_fb(data->gfx_fd, &planeconfigs[i].fbs[j][MULTIPLANE_ROTATED]);
+ }
+ }
+ igt_output_set_pipe(output, PIPE_NONE);
+ }
data->pipe_crc = NULL;
}
--
2.28.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [igt-dev] [PATCH i-g-t 1/2] tests/kms_rotation_crc: reduce executions time on multiplane tests
@ 2021-02-15 15:13 Juha-Pekka Heikkila
0 siblings, 0 replies; 13+ messages in thread
From: Juha-Pekka Heikkila @ 2021-02-15 15:13 UTC (permalink / raw)
To: igt-dev
reduce repetitive work and wait less
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
tests/kms_rotation_crc.c | 153 +++++++++++++++++++++------------------
1 file changed, 81 insertions(+), 72 deletions(-)
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 6d4e87ed9..107d7e0ee 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -31,6 +31,8 @@
#define TEST_MAX_WIDTH 640
#define TEST_MAX_HEIGHT 480
#define MAX_TESTED_MODES 8
+#define MULTIPLANE_REFERENCE 0
+#define MULTIPLANE_ROTATED 1
struct p_struct {
igt_plane_t *plane;
@@ -522,26 +524,20 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
typedef struct {
int32_t x1, y1;
- uint64_t width, height, tiling, planetype, format;
+ uint64_t width, height, tiling, format;
+ igt_plane_t *plane;
igt_rotation_t rotation_sw, rotation_hw;
} planeinfos;
static bool get_multiplane_crc(data_t *data, igt_output_t *output,
- igt_crc_t *crc_output, planeinfos *planeinfo,
- int numplanes)
+ planeinfos *planeinfo, struct igt_fb *fbleft,
+ struct igt_fb *fbright)
{
uint32_t w, h;
- igt_display_t *display = &data->display;
- struct p_struct *planes, *oldplanes;
- int c, ret;
-
- oldplanes = data->multiplaneoldview;
- planes = calloc(sizeof(*planes), numplanes);
-
- for (c = 0; c < numplanes; c++) {
- planes[c].plane = igt_output_get_plane_type(output,
- planeinfo[c].planetype);
+ struct igt_fb *planes[2] = {fbleft, fbright};
+ int c;
+ for (c = 0; c < ARRAY_SIZE(planes); c++) {
/*
* make plane and fb width and height always divisible by 4
* due to NV12 support and Intel hw workarounds.
@@ -552,34 +548,26 @@ static bool get_multiplane_crc(data_t *data, igt_output_t *output,
if (planeinfo[c].rotation_sw & (IGT_ROTATION_90 | IGT_ROTATION_270))
igt_swap(w, h);
- if (!igt_plane_has_format_mod(planes[c].plane,
+ if (!igt_plane_has_format_mod(planeinfo[c].plane,
planeinfo[c].format,
planeinfo[c].tiling))
return false;
- igt_create_fb(data->gfx_fd, w, h, planeinfo[c].format,
- planeinfo[c].tiling, &planes[c].fb);
+ if (planes[c]->fb_id == 0) {
+ igt_create_fb(data->gfx_fd, w, h, planeinfo[c].format,
+ planeinfo[c].tiling, planes[c]);
- paint_squares(data, planeinfo[c].rotation_sw, &planes[c].fb, 1.0f);
- igt_plane_set_fb(planes[c].plane, &planes[c].fb);
+ paint_squares(data, planeinfo[c].rotation_sw,
+ planes[c], 1.0f);
+ }
+ igt_plane_set_fb(planeinfo[c].plane, planes[c]);
if (planeinfo[c].rotation_hw & (IGT_ROTATION_90 | IGT_ROTATION_270))
- igt_plane_set_size(planes[c].plane, h, w);
+ igt_plane_set_size(planeinfo[c].plane, h, w);
- igt_plane_set_position(planes[c].plane, planeinfo[c].x1, planeinfo[c].y1);
- igt_plane_set_rotation(planes[c].plane, planeinfo[c].rotation_hw);
+ igt_plane_set_position(planeinfo[c].plane, planeinfo[c].x1, planeinfo[c].y1);
+ igt_plane_set_rotation(planeinfo[c].plane, planeinfo[c].rotation_hw);
}
-
- ret = igt_display_try_commit2(display, COMMIT_ATOMIC);
- igt_assert_eq(ret, 0);
-
- igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, crc_output);
-
- for (c = 0; c < numplanes && oldplanes; c++)
- igt_remove_fb(data->gfx_fd, &oldplanes[c].fb);
-
- free(oldplanes);
- data->multiplaneoldview = (void*)planes;
return true;
}
@@ -624,30 +612,9 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
igt_output_t *output;
igt_crc_t retcrc_sw, retcrc_hw;
planeinfos p[2];
- int c, used_w, used_h;
- struct p_struct *oldplanes;
+ int used_w, used_h;
drmModeModeInfo *mode;
- static const struct {
- igt_rotation_t rotation;
- float_t width;
- float_t height;
- uint64_t tiling;
- } planeconfigs[] = {
- {IGT_ROTATION_0, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE },
- {IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED },
- {IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- {IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- {IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- };
-
/*
* These are those modes which are tested. For testing feel interesting
* case with tiling are 2 bpp, 4 bpp and NV12.
@@ -655,8 +622,30 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
static const uint32_t formatlist[] = {DRM_FORMAT_RGB565,
DRM_FORMAT_XRGB8888, DRM_FORMAT_NV12};
+ static struct {
+ const char* txt;
+ igt_rotation_t rotation;
+ float_t width;
+ float_t height;
+ uint64_t tiling;
+ struct igt_fb fbs[ARRAY_SIZE(formatlist)][2];
+ } planeconfigs[] = {
+ {"rotation 0 modifier none", IGT_ROTATION_0, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE},
+ {"rotation 0 modifier x-tile", IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED},
+ {"rotation 0 modifier y-tile", IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED},
+ {"rotation 0 modifier yf-tile", IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED},
+ {"rotation 90 modifier y-tile", IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED},
+ {"rotation 90 modifier yf-tile", IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED},
+ {"rotation 180 modifier none", IGT_ROTATION_180, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE},
+ {"rotation 180 modifier x-tile", IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED},
+ {"rotation 180 modifier y-tile", IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED},
+ {"rotation 180 modifier yf-tile", IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED},
+ {"rotation 270 modifier y-tile", IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED},
+ {"rotation 270 modifier yf-tile", IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED},
+ };
+
for_each_valid_output_on_pipe(display, pipe, output) {
- int i, j, k, l;
+ int i, j, k, l, flipsw, fliphw;
igt_output_set_pipe(output, pipe);
mode = igt_output_get_mode(output);
igt_display_require_output(display);
@@ -665,12 +654,14 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
used_w = min(TEST_MAX_WIDTH, mode->hdisplay);
used_h = min(TEST_MAX_HEIGHT, mode->vdisplay);
+ p[0].plane = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+ p[1].plane = igt_output_get_plane_type(output, DRM_PLANE_TYPE_OVERLAY);
+
data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
INTEL_PIPE_CRC_SOURCE_AUTO);
igt_pipe_crc_start(data->pipe_crc);
for (i = 0; i < ARRAY_SIZE(planeconfigs); i++) {
- p[0].planetype = DRM_PLANE_TYPE_PRIMARY;
p[0].width = (uint64_t)(planeconfigs[i].width * used_w);
p[0].height = (uint64_t)(planeconfigs[i].height * used_h);
p[0].tiling = planeconfigs[i].tiling;
@@ -680,7 +671,6 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
p[0].format = formatlist[k];
for (j = 0; j < ARRAY_SIZE(planeconfigs); j++) {
- p[1].planetype = DRM_PLANE_TYPE_OVERLAY;
p[1].width = (uint64_t)(planeconfigs[j].width * used_w);
p[1].height = (uint64_t)(planeconfigs[j].height * used_h);
p[1].tiling = planeconfigs[j].tiling;
@@ -704,20 +694,39 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
&& intel_gen(data->devid) < 11)
continue;
+ igt_debug("plane1 %s %.4s plane2 %s %.4s\n",
+ planeconfigs[i].txt,
+ (char*) &p[0].format,
+ planeconfigs[j].txt,
+ (char*) &p[1].format);
+
p[0].rotation_sw = planeconfigs[i].rotation;
p[0].rotation_hw = IGT_ROTATION_0;
p[1].rotation_sw = planeconfigs[j].rotation;
p[1].rotation_hw = IGT_ROTATION_0;
- if (!get_multiplane_crc(data, output, &retcrc_sw,
- (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
+ if (!get_multiplane_crc(data, output,
+ (planeinfos *)&p,
+ &planeconfigs[i].fbs[k][MULTIPLANE_REFERENCE],
+ &planeconfigs[j].fbs[l][MULTIPLANE_REFERENCE]))
continue;
+ igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+ flipsw = kmstest_get_vblank(data->gfx_fd, pipe, 0) + 1;
+
igt_swap(p[0].rotation_sw, p[0].rotation_hw);
igt_swap(p[1].rotation_sw, p[1].rotation_hw);
- if (!get_multiplane_crc(data, output, &retcrc_hw,
- (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
+
+ if (!get_multiplane_crc(data, output,
+ (planeinfos *)&p,
+ &planeconfigs[i].fbs[k][MULTIPLANE_ROTATED],
+ &planeconfigs[j].fbs[l][MULTIPLANE_ROTATED]))
continue;
+ igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+ fliphw = kmstest_get_vblank(data->gfx_fd, pipe, 0) + 1;
+
+ igt_pipe_crc_get_for_frame(data->gfx_fd, data->pipe_crc, flipsw, &retcrc_sw);
+ igt_pipe_crc_get_for_frame(data->gfx_fd, data->pipe_crc, fliphw, &retcrc_hw);
igt_assert_crc_equal(&retcrc_sw, &retcrc_hw);
}
}
@@ -725,19 +734,19 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
}
igt_pipe_crc_stop(data->pipe_crc);
igt_pipe_crc_free(data->pipe_crc);
- igt_output_set_pipe(output, PIPE_ANY);
- }
- /*
- * Old fbs are deleted only after new ones are set on planes.
- * This is done to speed up the test
- */
- oldplanes = data->multiplaneoldview;
- for (c = 0; c < MAXMULTIPLANESAMOUNT && oldplanes; c++)
- igt_remove_fb(data->gfx_fd, &oldplanes[c].fb);
+ igt_plane_set_fb(p[0].plane, NULL);
+ igt_plane_set_fb(p[1].plane, NULL);
+ igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
- free(oldplanes);
- data->multiplaneoldview = NULL;
+ for (i = 0; i < ARRAY_SIZE(planeconfigs); i++) {
+ for (j = 0; j < ARRAY_SIZE(formatlist); j++) {
+ igt_remove_fb(data->gfx_fd, &planeconfigs[i].fbs[j][0]);
+ igt_remove_fb(data->gfx_fd, &planeconfigs[i].fbs[j][1]);
+ }
+ }
+ igt_output_set_pipe(output, PIPE_NONE);
+ }
data->pipe_crc = NULL;
}
--
2.28.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [igt-dev] [PATCH i-g-t 1/2] tests/kms_rotation_crc: reduce executions time on multiplane tests
@ 2021-02-15 14:30 Juha-Pekka Heikkila
0 siblings, 0 replies; 13+ messages in thread
From: Juha-Pekka Heikkila @ 2021-02-15 14:30 UTC (permalink / raw)
To: igt-dev
reduce repetitive work and wait less
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
tests/kms_rotation_crc.c | 152 ++++++++++++++++++++-------------------
1 file changed, 80 insertions(+), 72 deletions(-)
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 6d4e87ed9..ff24afe14 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -31,6 +31,8 @@
#define TEST_MAX_WIDTH 640
#define TEST_MAX_HEIGHT 480
#define MAX_TESTED_MODES 8
+#define MULTIPLANE_REFERENCE 0
+#define MULTIPLANE_ROTATED 1
struct p_struct {
igt_plane_t *plane;
@@ -522,26 +524,20 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
typedef struct {
int32_t x1, y1;
- uint64_t width, height, tiling, planetype, format;
+ uint64_t width, height, tiling, format;
+ igt_plane_t *plane;
igt_rotation_t rotation_sw, rotation_hw;
} planeinfos;
static bool get_multiplane_crc(data_t *data, igt_output_t *output,
- igt_crc_t *crc_output, planeinfos *planeinfo,
- int numplanes)
+ planeinfos *planeinfo, struct igt_fb *fbleft,
+ struct igt_fb *fbright)
{
uint32_t w, h;
- igt_display_t *display = &data->display;
- struct p_struct *planes, *oldplanes;
- int c, ret;
-
- oldplanes = data->multiplaneoldview;
- planes = calloc(sizeof(*planes), numplanes);
-
- for (c = 0; c < numplanes; c++) {
- planes[c].plane = igt_output_get_plane_type(output,
- planeinfo[c].planetype);
+ struct igt_fb *planes[2] = {fbleft, fbright};
+ int c;
+ for (c = 0; c < ARRAY_SIZE(planes); c++) {
/*
* make plane and fb width and height always divisible by 4
* due to NV12 support and Intel hw workarounds.
@@ -552,34 +548,26 @@ static bool get_multiplane_crc(data_t *data, igt_output_t *output,
if (planeinfo[c].rotation_sw & (IGT_ROTATION_90 | IGT_ROTATION_270))
igt_swap(w, h);
- if (!igt_plane_has_format_mod(planes[c].plane,
+ if (!igt_plane_has_format_mod(planeinfo[c].plane,
planeinfo[c].format,
planeinfo[c].tiling))
return false;
- igt_create_fb(data->gfx_fd, w, h, planeinfo[c].format,
- planeinfo[c].tiling, &planes[c].fb);
+ if (planes[c]->fb_id == 0) {
+ igt_create_fb(data->gfx_fd, w, h, planeinfo[c].format,
+ planeinfo[c].tiling, planes[c]);
- paint_squares(data, planeinfo[c].rotation_sw, &planes[c].fb, 1.0f);
- igt_plane_set_fb(planes[c].plane, &planes[c].fb);
+ paint_squares(data, planeinfo[c].rotation_sw,
+ planes[c], 1.0f);
+ }
+ igt_plane_set_fb(planeinfo[c].plane, planes[c]);
if (planeinfo[c].rotation_hw & (IGT_ROTATION_90 | IGT_ROTATION_270))
- igt_plane_set_size(planes[c].plane, h, w);
+ igt_plane_set_size(planeinfo[c].plane, h, w);
- igt_plane_set_position(planes[c].plane, planeinfo[c].x1, planeinfo[c].y1);
- igt_plane_set_rotation(planes[c].plane, planeinfo[c].rotation_hw);
+ igt_plane_set_position(planeinfo[c].plane, planeinfo[c].x1, planeinfo[c].y1);
+ igt_plane_set_rotation(planeinfo[c].plane, planeinfo[c].rotation_hw);
}
-
- ret = igt_display_try_commit2(display, COMMIT_ATOMIC);
- igt_assert_eq(ret, 0);
-
- igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, crc_output);
-
- for (c = 0; c < numplanes && oldplanes; c++)
- igt_remove_fb(data->gfx_fd, &oldplanes[c].fb);
-
- free(oldplanes);
- data->multiplaneoldview = (void*)planes;
return true;
}
@@ -624,30 +612,9 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
igt_output_t *output;
igt_crc_t retcrc_sw, retcrc_hw;
planeinfos p[2];
- int c, used_w, used_h;
- struct p_struct *oldplanes;
+ int used_w, used_h;
drmModeModeInfo *mode;
- static const struct {
- igt_rotation_t rotation;
- float_t width;
- float_t height;
- uint64_t tiling;
- } planeconfigs[] = {
- {IGT_ROTATION_0, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE },
- {IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED },
- {IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- {IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- {IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- };
-
/*
* These are those modes which are tested. For testing feel interesting
* case with tiling are 2 bpp, 4 bpp and NV12.
@@ -655,8 +622,30 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
static const uint32_t formatlist[] = {DRM_FORMAT_RGB565,
DRM_FORMAT_XRGB8888, DRM_FORMAT_NV12};
+ static struct {
+ const char* txt;
+ igt_rotation_t rotation;
+ float_t width;
+ float_t height;
+ uint64_t tiling;
+ struct igt_fb fbs[ARRAY_SIZE(formatlist)][2];
+ } planeconfigs[] = {
+ {"rotation 0 modifier none", IGT_ROTATION_0, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE},
+ {"rotation 0 modifier x-tile", IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED},
+ {"rotation 0 modifier y-tile", IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED},
+ {"rotation 0 modifier yf-tile", IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED},
+ {"rotation 90 modifier y-tile", IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED},
+ {"rotation 90 modifier yf-tile", IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED},
+ {"rotation 180 modifier none", IGT_ROTATION_180, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE},
+ {"rotation 180 modifier x-tile", IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED},
+ {"rotation 180 modifier y-tile", IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED},
+ {"rotation 180 modifier yf-tile", IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED},
+ {"rotation 270 modifier y-tile", IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED},
+ {"rotation 270 modifier yf-tile", IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED},
+ };
+
for_each_valid_output_on_pipe(display, pipe, output) {
- int i, j, k, l;
+ int i, j, k, l, flipsw, fliphw;
igt_output_set_pipe(output, pipe);
mode = igt_output_get_mode(output);
igt_display_require_output(display);
@@ -665,12 +654,14 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
used_w = min(TEST_MAX_WIDTH, mode->hdisplay);
used_h = min(TEST_MAX_HEIGHT, mode->vdisplay);
+ p[0].plane = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+ p[1].plane = igt_output_get_plane_type(output, DRM_PLANE_TYPE_OVERLAY);
+
data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
INTEL_PIPE_CRC_SOURCE_AUTO);
igt_pipe_crc_start(data->pipe_crc);
for (i = 0; i < ARRAY_SIZE(planeconfigs); i++) {
- p[0].planetype = DRM_PLANE_TYPE_PRIMARY;
p[0].width = (uint64_t)(planeconfigs[i].width * used_w);
p[0].height = (uint64_t)(planeconfigs[i].height * used_h);
p[0].tiling = planeconfigs[i].tiling;
@@ -680,7 +671,6 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
p[0].format = formatlist[k];
for (j = 0; j < ARRAY_SIZE(planeconfigs); j++) {
- p[1].planetype = DRM_PLANE_TYPE_OVERLAY;
p[1].width = (uint64_t)(planeconfigs[j].width * used_w);
p[1].height = (uint64_t)(planeconfigs[j].height * used_h);
p[1].tiling = planeconfigs[j].tiling;
@@ -704,20 +694,39 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
&& intel_gen(data->devid) < 11)
continue;
+ igt_debug("plane1 %s %.4s plane2 %s %.4s\n",
+ planeconfigs[i].txt,
+ (char*) &p[0].format,
+ planeconfigs[j].txt,
+ (char*) &p[1].format);
+
p[0].rotation_sw = planeconfigs[i].rotation;
p[0].rotation_hw = IGT_ROTATION_0;
p[1].rotation_sw = planeconfigs[j].rotation;
p[1].rotation_hw = IGT_ROTATION_0;
- if (!get_multiplane_crc(data, output, &retcrc_sw,
- (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
+ if (!get_multiplane_crc(data, output,
+ (planeinfos *)&p,
+ &planeconfigs[i].fbs[k][MULTIPLANE_REFERENCE],
+ &planeconfigs[j].fbs[l][MULTIPLANE_REFERENCE]))
continue;
+ igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+ flipsw = kmstest_get_vblank(data->gfx_fd, pipe, 0) + 1;
+
igt_swap(p[0].rotation_sw, p[0].rotation_hw);
igt_swap(p[1].rotation_sw, p[1].rotation_hw);
- if (!get_multiplane_crc(data, output, &retcrc_hw,
- (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
+
+ if (!get_multiplane_crc(data, output,
+ (planeinfos *)&p,
+ &planeconfigs[i].fbs[k][MULTIPLANE_ROTATED],
+ &planeconfigs[j].fbs[l][MULTIPLANE_ROTATED]))
continue;
+ igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+ fliphw = kmstest_get_vblank(data->gfx_fd, pipe, 0) + 1;
+
+ igt_pipe_crc_get_for_frame(data->gfx_fd, data->pipe_crc, flipsw, &retcrc_sw);
+ igt_pipe_crc_get_for_frame(data->gfx_fd, data->pipe_crc, fliphw, &retcrc_hw);
igt_assert_crc_equal(&retcrc_sw, &retcrc_hw);
}
}
@@ -725,19 +734,18 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
}
igt_pipe_crc_stop(data->pipe_crc);
igt_pipe_crc_free(data->pipe_crc);
- igt_output_set_pipe(output, PIPE_ANY);
- }
- /*
- * Old fbs are deleted only after new ones are set on planes.
- * This is done to speed up the test
- */
- oldplanes = data->multiplaneoldview;
- for (c = 0; c < MAXMULTIPLANESAMOUNT && oldplanes; c++)
- igt_remove_fb(data->gfx_fd, &oldplanes[c].fb);
+ igt_plane_set_fb(p[0].plane, NULL);
+ igt_plane_set_fb(p[1].plane, NULL);
- free(oldplanes);
- data->multiplaneoldview = NULL;
+ for (i = 0; i < ARRAY_SIZE(planeconfigs); i++) {
+ for (j = 0; j < ARRAY_SIZE(formatlist); j++) {
+ igt_remove_fb(data->gfx_fd, &planeconfigs[i].fbs[j][0]);
+ igt_remove_fb(data->gfx_fd, &planeconfigs[i].fbs[j][1]);
+ }
+ }
+ igt_output_set_pipe(output, PIPE_NONE);
+ }
data->pipe_crc = NULL;
}
--
2.28.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [igt-dev] [PATCH i-g-t 1/2] tests/kms_rotation_crc: reduce executions time on multiplane tests
@ 2021-02-14 20:35 Juha-Pekka Heikkila
0 siblings, 0 replies; 13+ messages in thread
From: Juha-Pekka Heikkila @ 2021-02-14 20:35 UTC (permalink / raw)
To: igt-dev
reduce repetitive work and wait less
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
tests/kms_rotation_crc.c | 143 ++++++++++++++++++++-------------------
1 file changed, 75 insertions(+), 68 deletions(-)
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 6d4e87ed9..9b8f05477 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -31,6 +31,8 @@
#define TEST_MAX_WIDTH 640
#define TEST_MAX_HEIGHT 480
#define MAX_TESTED_MODES 8
+#define MULTIPLANE_REFERENCE 0
+#define MULTIPLANE_ROTATED 1
struct p_struct {
igt_plane_t *plane;
@@ -527,20 +529,18 @@ typedef struct {
} planeinfos;
static bool get_multiplane_crc(data_t *data, igt_output_t *output,
- igt_crc_t *crc_output, planeinfos *planeinfo,
- int numplanes)
+ planeinfos *planeinfo,
+ struct igt_fb *fbleft, struct igt_fb *fbright)
{
uint32_t w, h;
- igt_display_t *display = &data->display;
- struct p_struct *planes, *oldplanes;
- int c, ret;
+ struct igt_fb *planes[2] = {fbleft, fbright};
- oldplanes = data->multiplaneoldview;
- planes = calloc(sizeof(*planes), numplanes);
+ int c;
- for (c = 0; c < numplanes; c++) {
- planes[c].plane = igt_output_get_plane_type(output,
- planeinfo[c].planetype);
+ for (c = 0; c < MAXMULTIPLANESAMOUNT; c++) {
+ igt_plane_t *lplane;
+ lplane = igt_output_get_plane_type(output,
+ planeinfo[c].planetype);
/*
* make plane and fb width and height always divisible by 4
@@ -552,34 +552,25 @@ static bool get_multiplane_crc(data_t *data, igt_output_t *output,
if (planeinfo[c].rotation_sw & (IGT_ROTATION_90 | IGT_ROTATION_270))
igt_swap(w, h);
- if (!igt_plane_has_format_mod(planes[c].plane,
+ if (!igt_plane_has_format_mod(lplane,
planeinfo[c].format,
planeinfo[c].tiling))
return false;
- igt_create_fb(data->gfx_fd, w, h, planeinfo[c].format,
- planeinfo[c].tiling, &planes[c].fb);
+ if (planes[c]->fb_id == 0) {
+ igt_create_fb(data->gfx_fd, w, h, planeinfo[c].format,
+ planeinfo[c].tiling, planes[c]);
- paint_squares(data, planeinfo[c].rotation_sw, &planes[c].fb, 1.0f);
- igt_plane_set_fb(planes[c].plane, &planes[c].fb);
+ paint_squares(data, planeinfo[c].rotation_sw, planes[c], 1.0f);
+ }
+ igt_plane_set_fb(lplane, planes[c]);
if (planeinfo[c].rotation_hw & (IGT_ROTATION_90 | IGT_ROTATION_270))
- igt_plane_set_size(planes[c].plane, h, w);
+ igt_plane_set_size(lplane, h, w);
- igt_plane_set_position(planes[c].plane, planeinfo[c].x1, planeinfo[c].y1);
- igt_plane_set_rotation(planes[c].plane, planeinfo[c].rotation_hw);
+ igt_plane_set_position(lplane, planeinfo[c].x1, planeinfo[c].y1);
+ igt_plane_set_rotation(lplane, planeinfo[c].rotation_hw);
}
-
- ret = igt_display_try_commit2(display, COMMIT_ATOMIC);
- igt_assert_eq(ret, 0);
-
- igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, crc_output);
-
- for (c = 0; c < numplanes && oldplanes; c++)
- igt_remove_fb(data->gfx_fd, &oldplanes[c].fb);
-
- free(oldplanes);
- data->multiplaneoldview = (void*)planes;
return true;
}
@@ -624,30 +615,9 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
igt_output_t *output;
igt_crc_t retcrc_sw, retcrc_hw;
planeinfos p[2];
- int c, used_w, used_h;
- struct p_struct *oldplanes;
+ int used_w, used_h;
drmModeModeInfo *mode;
- static const struct {
- igt_rotation_t rotation;
- float_t width;
- float_t height;
- uint64_t tiling;
- } planeconfigs[] = {
- {IGT_ROTATION_0, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE },
- {IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED },
- {IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- {IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- {IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- };
-
/*
* These are those modes which are tested. For testing feel interesting
* case with tiling are 2 bpp, 4 bpp and NV12.
@@ -655,8 +625,30 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
static const uint32_t formatlist[] = {DRM_FORMAT_RGB565,
DRM_FORMAT_XRGB8888, DRM_FORMAT_NV12};
+ static struct {
+ const char* txt;
+ igt_rotation_t rotation;
+ float_t width;
+ float_t height;
+ uint64_t tiling;
+ struct igt_fb fbs[ARRAY_SIZE(formatlist)][2];
+ } planeconfigs[] = {
+ {"rotation 0 modifier none", IGT_ROTATION_0, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE},
+ {"rotation 0 modifier x-tile", IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED},
+ {"rotation 0 modifier y-tile", IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED},
+ {"rotation 0 modifier yf-tile", IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED},
+ {"rotation 90 modifier y-tile", IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED},
+ {"rotation 90 modifier yf-tile", IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED},
+ {"rotation 180 modifier none", IGT_ROTATION_180, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE},
+ {"rotation 180 modifier x-tile", IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED},
+ {"rotation 180 modifier y-tile", IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED},
+ {"rotation 180 modifier yf-tile", IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED},
+ {"rotation 270 modifier y-tile", IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED},
+ {"rotation 270 modifier yf-tile", IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED},
+ };
+
for_each_valid_output_on_pipe(display, pipe, output) {
- int i, j, k, l;
+ int i, j, k, l, flipsw, fliphw;
igt_output_set_pipe(output, pipe);
mode = igt_output_get_mode(output);
igt_display_require_output(display);
@@ -704,20 +696,39 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
&& intel_gen(data->devid) < 11)
continue;
+ igt_debug("plane1 %s %.4s plane2 %s %.4s\n",
+ planeconfigs[i].txt,
+ (char*) &p[0].format,
+ planeconfigs[j].txt,
+ (char*) &p[1].format);
+
p[0].rotation_sw = planeconfigs[i].rotation;
p[0].rotation_hw = IGT_ROTATION_0;
p[1].rotation_sw = planeconfigs[j].rotation;
p[1].rotation_hw = IGT_ROTATION_0;
- if (!get_multiplane_crc(data, output, &retcrc_sw,
- (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
+ if (!get_multiplane_crc(data, output,
+ (planeinfos *)&p,
+ &planeconfigs[i].fbs[k][MULTIPLANE_REFERENCE],
+ &planeconfigs[j].fbs[l][MULTIPLANE_REFERENCE]))
continue;
+ igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+ flipsw = kmstest_get_vblank(data->gfx_fd, pipe, 0) + 1;
+
igt_swap(p[0].rotation_sw, p[0].rotation_hw);
igt_swap(p[1].rotation_sw, p[1].rotation_hw);
- if (!get_multiplane_crc(data, output, &retcrc_hw,
- (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
+
+ if (!get_multiplane_crc(data, output,
+ (planeinfos *)&p,
+ &planeconfigs[i].fbs[k][MULTIPLANE_ROTATED],
+ &planeconfigs[j].fbs[l][MULTIPLANE_ROTATED]))
continue;
+ igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+ fliphw = kmstest_get_vblank(data->gfx_fd, pipe, 0) + 1;
+
+ igt_pipe_crc_get_for_frame(data->gfx_fd, data->pipe_crc, flipsw, &retcrc_sw);
+ igt_pipe_crc_get_for_frame(data->gfx_fd, data->pipe_crc, fliphw, &retcrc_hw);
igt_assert_crc_equal(&retcrc_sw, &retcrc_hw);
}
}
@@ -725,19 +736,15 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
}
igt_pipe_crc_stop(data->pipe_crc);
igt_pipe_crc_free(data->pipe_crc);
- igt_output_set_pipe(output, PIPE_ANY);
- }
-
- /*
- * Old fbs are deleted only after new ones are set on planes.
- * This is done to speed up the test
- */
- oldplanes = data->multiplaneoldview;
- for (c = 0; c < MAXMULTIPLANESAMOUNT && oldplanes; c++)
- igt_remove_fb(data->gfx_fd, &oldplanes[c].fb);
- free(oldplanes);
- data->multiplaneoldview = NULL;
+ for (i = 0; i < ARRAY_SIZE(planeconfigs); i++) {
+ for (j = 0; j < ARRAY_SIZE(formatlist); j++) {
+ igt_remove_fb(data->gfx_fd, &planeconfigs[i].fbs[j][0]);
+ igt_remove_fb(data->gfx_fd, &planeconfigs[i].fbs[j][1]);
+ }
+ }
+ igt_output_set_pipe(output, PIPE_NONE);
+ }
data->pipe_crc = NULL;
}
--
2.28.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [igt-dev] [PATCH i-g-t 1/2] tests/kms_rotation_crc: reduce executions time on multiplane tests
@ 2021-02-14 12:25 Juha-Pekka Heikkila
0 siblings, 0 replies; 13+ messages in thread
From: Juha-Pekka Heikkila @ 2021-02-14 12:25 UTC (permalink / raw)
To: igt-dev
reduce repetitive work and wait less
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
tests/kms_rotation_crc.c | 141 ++++++++++++++++++++-------------------
1 file changed, 74 insertions(+), 67 deletions(-)
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 6d4e87ed9..5bff6ea64 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -31,6 +31,8 @@
#define TEST_MAX_WIDTH 640
#define TEST_MAX_HEIGHT 480
#define MAX_TESTED_MODES 8
+#define MULTIPLANE_REFERENCE 0
+#define MULTIPLANE_ROTATED 1
struct p_struct {
igt_plane_t *plane;
@@ -527,20 +529,18 @@ typedef struct {
} planeinfos;
static bool get_multiplane_crc(data_t *data, igt_output_t *output,
- igt_crc_t *crc_output, planeinfos *planeinfo,
- int numplanes)
+ planeinfos *planeinfo,
+ struct igt_fb *fbleft, struct igt_fb *fbright)
{
uint32_t w, h;
- igt_display_t *display = &data->display;
- struct p_struct *planes, *oldplanes;
- int c, ret;
+ struct igt_fb *planes[2] = {fbleft, fbright};
- oldplanes = data->multiplaneoldview;
- planes = calloc(sizeof(*planes), numplanes);
+ int c;
- for (c = 0; c < numplanes; c++) {
- planes[c].plane = igt_output_get_plane_type(output,
- planeinfo[c].planetype);
+ for (c = 0; c < MAXMULTIPLANESAMOUNT; c++) {
+ igt_plane_t *lplane;
+ lplane = igt_output_get_plane_type(output,
+ planeinfo[c].planetype);
/*
* make plane and fb width and height always divisible by 4
@@ -552,34 +552,25 @@ static bool get_multiplane_crc(data_t *data, igt_output_t *output,
if (planeinfo[c].rotation_sw & (IGT_ROTATION_90 | IGT_ROTATION_270))
igt_swap(w, h);
- if (!igt_plane_has_format_mod(planes[c].plane,
+ if (!igt_plane_has_format_mod(lplane,
planeinfo[c].format,
planeinfo[c].tiling))
return false;
- igt_create_fb(data->gfx_fd, w, h, planeinfo[c].format,
- planeinfo[c].tiling, &planes[c].fb);
+ if (planes[c]->fb_id == 0) {
+ igt_create_fb(data->gfx_fd, w, h, planeinfo[c].format,
+ planeinfo[c].tiling, planes[c]);
- paint_squares(data, planeinfo[c].rotation_sw, &planes[c].fb, 1.0f);
- igt_plane_set_fb(planes[c].plane, &planes[c].fb);
+ paint_squares(data, planeinfo[c].rotation_sw, planes[c], 1.0f);
+ }
+ igt_plane_set_fb(lplane, planes[c]);
if (planeinfo[c].rotation_hw & (IGT_ROTATION_90 | IGT_ROTATION_270))
- igt_plane_set_size(planes[c].plane, h, w);
+ igt_plane_set_size(lplane, h, w);
- igt_plane_set_position(planes[c].plane, planeinfo[c].x1, planeinfo[c].y1);
- igt_plane_set_rotation(planes[c].plane, planeinfo[c].rotation_hw);
+ igt_plane_set_position(lplane, planeinfo[c].x1, planeinfo[c].y1);
+ igt_plane_set_rotation(lplane, planeinfo[c].rotation_hw);
}
-
- ret = igt_display_try_commit2(display, COMMIT_ATOMIC);
- igt_assert_eq(ret, 0);
-
- igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, crc_output);
-
- for (c = 0; c < numplanes && oldplanes; c++)
- igt_remove_fb(data->gfx_fd, &oldplanes[c].fb);
-
- free(oldplanes);
- data->multiplaneoldview = (void*)planes;
return true;
}
@@ -624,30 +615,9 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
igt_output_t *output;
igt_crc_t retcrc_sw, retcrc_hw;
planeinfos p[2];
- int c, used_w, used_h;
- struct p_struct *oldplanes;
+ int used_w, used_h;
drmModeModeInfo *mode;
- static const struct {
- igt_rotation_t rotation;
- float_t width;
- float_t height;
- uint64_t tiling;
- } planeconfigs[] = {
- {IGT_ROTATION_0, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE },
- {IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED },
- {IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- {IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- {IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- };
-
/*
* These are those modes which are tested. For testing feel interesting
* case with tiling are 2 bpp, 4 bpp and NV12.
@@ -655,8 +625,30 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
static const uint32_t formatlist[] = {DRM_FORMAT_RGB565,
DRM_FORMAT_XRGB8888, DRM_FORMAT_NV12};
+ static struct {
+ const char* txt;
+ igt_rotation_t rotation;
+ float_t width;
+ float_t height;
+ uint64_t tiling;
+ struct igt_fb fbs[ARRAY_SIZE(formatlist)][2];
+ } planeconfigs[] = {
+ {"rotation 0 modifier none", IGT_ROTATION_0, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE},
+ {"rotation 0 modifier x-tile", IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED},
+ {"rotation 0 modifier y-tile", IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED},
+ {"rotation 0 modifier yf-tile", IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED},
+ {"rotation 90 modifier y-tile", IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED},
+ {"rotation 90 modifier yf-tile", IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED},
+ {"rotation 180 modifier none", IGT_ROTATION_180, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE},
+ {"rotation 180 modifier x-tile", IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED},
+ {"rotation 180 modifier y-tile", IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED},
+ {"rotation 180 modifier yf-tile", IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED},
+ {"rotation 270 modifier y-tile", IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED},
+ {"rotation 270 modifier yf-tile", IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED},
+ };
+
for_each_valid_output_on_pipe(display, pipe, output) {
- int i, j, k, l;
+ int i, j, k, l, flipsw, fliphw;
igt_output_set_pipe(output, pipe);
mode = igt_output_get_mode(output);
igt_display_require_output(display);
@@ -704,20 +696,39 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
&& intel_gen(data->devid) < 11)
continue;
+ igt_debug("plane1 %s %.4s plane2 %s %.4s\n",
+ planeconfigs[i].txt,
+ (char*) &p[0].format,
+ planeconfigs[j].txt,
+ (char*) &p[1].format);
+
p[0].rotation_sw = planeconfigs[i].rotation;
p[0].rotation_hw = IGT_ROTATION_0;
p[1].rotation_sw = planeconfigs[j].rotation;
p[1].rotation_hw = IGT_ROTATION_0;
- if (!get_multiplane_crc(data, output, &retcrc_sw,
- (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
+ if (!get_multiplane_crc(data, output,
+ (planeinfos *)&p,
+ &planeconfigs[i].fbs[k][MULTIPLANE_REFERENCE],
+ &planeconfigs[j].fbs[l][MULTIPLANE_REFERENCE]))
continue;
+ igt_display_commit_atomic(display, 0, NULL);
+ flipsw = kmstest_get_vblank(data->gfx_fd, pipe, 0) + 1;
+
igt_swap(p[0].rotation_sw, p[0].rotation_hw);
igt_swap(p[1].rotation_sw, p[1].rotation_hw);
- if (!get_multiplane_crc(data, output, &retcrc_hw,
- (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
+
+ if (!get_multiplane_crc(data, output,
+ (planeinfos *)&p,
+ &planeconfigs[i].fbs[k][MULTIPLANE_ROTATED],
+ &planeconfigs[j].fbs[l][MULTIPLANE_ROTATED]))
continue;
+ igt_display_commit_atomic(display, 0, NULL);
+ fliphw = kmstest_get_vblank(data->gfx_fd, pipe, 0) + 1;
+
+ igt_pipe_crc_get_for_frame(data->gfx_fd, data->pipe_crc, flipsw, &retcrc_sw);
+ igt_pipe_crc_get_for_frame(data->gfx_fd, data->pipe_crc, fliphw, &retcrc_hw);
igt_assert_crc_equal(&retcrc_sw, &retcrc_hw);
}
}
@@ -725,19 +736,15 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
}
igt_pipe_crc_stop(data->pipe_crc);
igt_pipe_crc_free(data->pipe_crc);
+
+ for (i = 0; i < ARRAY_SIZE(planeconfigs); i++) {
+ for (j = 0; j < ARRAY_SIZE(formatlist); j++) {
+ igt_remove_fb(data->gfx_fd, &planeconfigs[i].fbs[j][0]);
+ igt_remove_fb(data->gfx_fd, &planeconfigs[i].fbs[j][1]);
+ }
+ }
igt_output_set_pipe(output, PIPE_ANY);
}
-
- /*
- * Old fbs are deleted only after new ones are set on planes.
- * This is done to speed up the test
- */
- oldplanes = data->multiplaneoldview;
- for (c = 0; c < MAXMULTIPLANESAMOUNT && oldplanes; c++)
- igt_remove_fb(data->gfx_fd, &oldplanes[c].fb);
-
- free(oldplanes);
- data->multiplaneoldview = NULL;
data->pipe_crc = NULL;
}
--
2.28.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [igt-dev] [PATCH i-g-t 1/2] tests/kms_rotation_crc: reduce executions time on multiplane tests
@ 2021-02-13 21:52 Juha-Pekka Heikkila
0 siblings, 0 replies; 13+ messages in thread
From: Juha-Pekka Heikkila @ 2021-02-13 21:52 UTC (permalink / raw)
To: igt-dev
reduce repetitive work and wait less
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
tests/kms_rotation_crc.c | 141 ++++++++++++++++++++-------------------
1 file changed, 74 insertions(+), 67 deletions(-)
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 6d4e87ed9..8f0a38a75 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -31,6 +31,8 @@
#define TEST_MAX_WIDTH 640
#define TEST_MAX_HEIGHT 480
#define MAX_TESTED_MODES 8
+#define MULTIPLANE_REFERENCE 0
+#define MULTIPLANE_ROTATED 1
struct p_struct {
igt_plane_t *plane;
@@ -527,20 +529,18 @@ typedef struct {
} planeinfos;
static bool get_multiplane_crc(data_t *data, igt_output_t *output,
- igt_crc_t *crc_output, planeinfos *planeinfo,
- int numplanes)
+ planeinfos *planeinfo,
+ struct igt_fb *fbleft, struct igt_fb *fbright)
{
uint32_t w, h;
- igt_display_t *display = &data->display;
- struct p_struct *planes, *oldplanes;
- int c, ret;
+ struct igt_fb *planes[2] = {fbleft, fbright};
- oldplanes = data->multiplaneoldview;
- planes = calloc(sizeof(*planes), numplanes);
+ int c;
- for (c = 0; c < numplanes; c++) {
- planes[c].plane = igt_output_get_plane_type(output,
- planeinfo[c].planetype);
+ for (c = 0; c < MAXMULTIPLANESAMOUNT; c++) {
+ igt_plane_t *lplane;
+ lplane = igt_output_get_plane_type(output,
+ planeinfo[c].planetype);
/*
* make plane and fb width and height always divisible by 4
@@ -552,34 +552,25 @@ static bool get_multiplane_crc(data_t *data, igt_output_t *output,
if (planeinfo[c].rotation_sw & (IGT_ROTATION_90 | IGT_ROTATION_270))
igt_swap(w, h);
- if (!igt_plane_has_format_mod(planes[c].plane,
+ if (!igt_plane_has_format_mod(lplane,
planeinfo[c].format,
planeinfo[c].tiling))
return false;
- igt_create_fb(data->gfx_fd, w, h, planeinfo[c].format,
- planeinfo[c].tiling, &planes[c].fb);
+ if (planes[c]->fb_id == 0) {
+ igt_create_fb(data->gfx_fd, w, h, planeinfo[c].format,
+ planeinfo[c].tiling, planes[c]);
- paint_squares(data, planeinfo[c].rotation_sw, &planes[c].fb, 1.0f);
- igt_plane_set_fb(planes[c].plane, &planes[c].fb);
+ paint_squares(data, planeinfo[c].rotation_sw, planes[c], 1.0f);
+ }
+ igt_plane_set_fb(lplane, planes[c]);
if (planeinfo[c].rotation_hw & (IGT_ROTATION_90 | IGT_ROTATION_270))
- igt_plane_set_size(planes[c].plane, h, w);
+ igt_plane_set_size(lplane, h, w);
- igt_plane_set_position(planes[c].plane, planeinfo[c].x1, planeinfo[c].y1);
- igt_plane_set_rotation(planes[c].plane, planeinfo[c].rotation_hw);
+ igt_plane_set_position(lplane, planeinfo[c].x1, planeinfo[c].y1);
+ igt_plane_set_rotation(lplane, planeinfo[c].rotation_hw);
}
-
- ret = igt_display_try_commit2(display, COMMIT_ATOMIC);
- igt_assert_eq(ret, 0);
-
- igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, crc_output);
-
- for (c = 0; c < numplanes && oldplanes; c++)
- igt_remove_fb(data->gfx_fd, &oldplanes[c].fb);
-
- free(oldplanes);
- data->multiplaneoldview = (void*)planes;
return true;
}
@@ -624,30 +615,9 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
igt_output_t *output;
igt_crc_t retcrc_sw, retcrc_hw;
planeinfos p[2];
- int c, used_w, used_h;
- struct p_struct *oldplanes;
+ int used_w, used_h;
drmModeModeInfo *mode;
- static const struct {
- igt_rotation_t rotation;
- float_t width;
- float_t height;
- uint64_t tiling;
- } planeconfigs[] = {
- {IGT_ROTATION_0, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE },
- {IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED },
- {IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- {IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- {IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED },
- {IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED },
- };
-
/*
* These are those modes which are tested. For testing feel interesting
* case with tiling are 2 bpp, 4 bpp and NV12.
@@ -655,8 +625,30 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
static const uint32_t formatlist[] = {DRM_FORMAT_RGB565,
DRM_FORMAT_XRGB8888, DRM_FORMAT_NV12};
+ static struct {
+ const char* txt;
+ igt_rotation_t rotation;
+ float_t width;
+ float_t height;
+ uint64_t tiling;
+ struct igt_fb fbs[ARRAY_SIZE(formatlist)][2];
+ } planeconfigs[] = {
+ {"rotation 0 modifier none", IGT_ROTATION_0, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE, {{},{}}},
+ {"rotation 0 modifier x-tile", IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED, {{},{}}},
+ {"rotation 0 modifier y-tile", IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED, {{},{}}},
+ {"rotation 0 modifier y-ftile", IGT_ROTATION_0, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED, {{},{}}},
+ {"rotation 90 modifier yt-ile", IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED, {{},{}}},
+ {"rotation 90 modifier yf-tile", IGT_ROTATION_90, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED, {{},{}}},
+ {"rotation 180 modifier none", IGT_ROTATION_180, .2f, .4f, LOCAL_DRM_FORMAT_MOD_NONE, {{},{}}},
+ {"rotation 180 modifier x-tile", IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_X_TILED, {{},{}}},
+ {"rotation 180 modifier y-tile", IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED, {{},{}}},
+ {"rotation 180 modifier yf-tile", IGT_ROTATION_180, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED, {{},{}}},
+ {"rotation 270 modifier y-tile", IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Y_TILED, {{},{}}},
+ {"rotation 270 modifier yf-tile", IGT_ROTATION_270, .2f, .4f, LOCAL_I915_FORMAT_MOD_Yf_TILED, {{},{}}},
+ };
+
for_each_valid_output_on_pipe(display, pipe, output) {
- int i, j, k, l;
+ int i, j, k, l, flipsw, fliphw;
igt_output_set_pipe(output, pipe);
mode = igt_output_get_mode(output);
igt_display_require_output(display);
@@ -688,6 +680,12 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
mode, 1);
for (l = 0; l < ARRAY_SIZE(formatlist); l++) {
+ igt_debug("plane1 %s %.4s plane2 %s %.4s\n",
+ planeconfigs[i].txt,
+ (char*) &formatlist[k],
+ planeconfigs[j].txt,
+ (char*) &formatlist[l]);
+
p[1].format = formatlist[l];
/*
@@ -708,16 +706,29 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
p[0].rotation_hw = IGT_ROTATION_0;
p[1].rotation_sw = planeconfigs[j].rotation;
p[1].rotation_hw = IGT_ROTATION_0;
- if (!get_multiplane_crc(data, output, &retcrc_sw,
- (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
+ if (!get_multiplane_crc(data, output,
+ (planeinfos *)&p,
+ &planeconfigs[i].fbs[k][MULTIPLANE_REFERENCE],
+ &planeconfigs[j].fbs[l][MULTIPLANE_REFERENCE]))
continue;
+ igt_display_commit_atomic(display, 0, NULL);
+ flipsw = kmstest_get_vblank(data->gfx_fd, pipe, 0) + 1;
+
igt_swap(p[0].rotation_sw, p[0].rotation_hw);
igt_swap(p[1].rotation_sw, p[1].rotation_hw);
- if (!get_multiplane_crc(data, output, &retcrc_hw,
- (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
+
+ if (!get_multiplane_crc(data, output,
+ (planeinfos *)&p,
+ &planeconfigs[i].fbs[k][MULTIPLANE_ROTATED],
+ &planeconfigs[j].fbs[l][MULTIPLANE_ROTATED]))
continue;
+ igt_display_commit_atomic(display, 0, NULL);
+ fliphw = kmstest_get_vblank(data->gfx_fd, pipe, 0) + 1;
+
+ igt_pipe_crc_get_for_frame(data->gfx_fd, data->pipe_crc, flipsw, &retcrc_sw);
+ igt_pipe_crc_get_for_frame(data->gfx_fd, data->pipe_crc, fliphw, &retcrc_hw);
igt_assert_crc_equal(&retcrc_sw, &retcrc_hw);
}
}
@@ -725,19 +736,15 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
}
igt_pipe_crc_stop(data->pipe_crc);
igt_pipe_crc_free(data->pipe_crc);
+
+ for (i = 0; i < ARRAY_SIZE(planeconfigs); i++) {
+ for (j = 0; j < ARRAY_SIZE(formatlist); j++) {
+ igt_remove_fb(data->gfx_fd, &planeconfigs[i].fbs[j][0]);
+ igt_remove_fb(data->gfx_fd, &planeconfigs[i].fbs[j][1]);
+ }
+ }
igt_output_set_pipe(output, PIPE_ANY);
}
-
- /*
- * Old fbs are deleted only after new ones are set on planes.
- * This is done to speed up the test
- */
- oldplanes = data->multiplaneoldview;
- for (c = 0; c < MAXMULTIPLANESAMOUNT && oldplanes; c++)
- igt_remove_fb(data->gfx_fd, &oldplanes[c].fb);
-
- free(oldplanes);
- data->multiplaneoldview = NULL;
data->pipe_crc = NULL;
}
--
2.28.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 13+ messages in thread
end of thread, other threads:[~2021-03-02 11:13 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-17 16:03 [igt-dev] [PATCH i-g-t 1/2] tests/kms_rotation_crc: reduce executions time on multiplane tests Juha-Pekka Heikkila
2021-02-17 16:03 ` [igt-dev] [PATCH i-g-t 2/2] HAX remove rotation test from blacklist Juha-Pekka Heikkila
2021-02-17 16:40 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/kms_rotation_crc: reduce executions time on multiplane tests Patchwork
2021-02-17 19:25 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2021-02-18 16:14 [igt-dev] [PATCH i-g-t 1/2] " Juha-Pekka Heikkila
2021-03-02 11:13 ` Karthik B S
2021-02-17 20:12 Juha-Pekka Heikkila
2021-02-16 15:34 Juha-Pekka Heikkila
2021-02-15 15:13 Juha-Pekka Heikkila
2021-02-15 14:30 Juha-Pekka Heikkila
2021-02-14 20:35 Juha-Pekka Heikkila
2021-02-14 12:25 Juha-Pekka Heikkila
2021-02-13 21:52 Juha-Pekka Heikkila
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.