Skip to contentSkip to conversation

tests/kms_plane: Reduce execution time by reducing source size and performing upscaling.

PATCH In review Maarten Lankhorst 3 participants 5 messages Mar 7, 2019 – Mar 11, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/kms_plane: Reduce execution time by reducing source size and performing upscaling.

Execution time is way too high because of all the various conversion routines and inefficient accesses done by pixman on uncached memory. Fix it by reducing the source fb siaze, and using scaling to increase to span the entire crtc.

---
 tests/kms_plane.c | 44 ++++++++++++++++++++++++++++++++++----------
 1 file changed, 34 insertions(+), 10 deletions(-)
tests/kms_plane.c +34 -10
index 91de46948a3a..3a2dd3e3f1f9 100644
@@ -407,14 +407,15 @@ static void set_legacy_lut(data_t *data, enum pipe pipe,
 
 static void test_format_plane_color(data_t *data, enum pipe pipe,
 				    igt_plane_t *plane,
-				    uint32_t format, int width, int height,
+				    uint32_t format, int src_w, int src_h,
+				    int dst_w, int dst_h,
 				    int color, igt_crc_t *crc, struct igt_fb *fb)
 {
 	const color_t *c = &colors[color];
 	struct igt_fb old_fb = *fb;
 
 	if (data->crop == 0 || format == DRM_FORMAT_XRGB8888) {
-		igt_create_color_fb(data->drm_fd, width, height, format,
+		igt_create_color_fb(data->drm_fd, src_w, src_h, format,
 				    LOCAL_DRM_FORMAT_MOD_NONE,
 				    c->red, c->green, c->blue, fb);
 	} else {
@@ -424,22 +425,22 @@ static void test_format_plane_color(data_t *data, enum pipe pipe,
 	 */
 		cairo_t *cr;
 
-		igt_create_fb(data->drm_fd, width + data->crop * 2,
-				    height + data->crop * 2, format,
+		igt_create_fb(data->drm_fd, src_w + data->crop * 2,
+				    src_h + data->crop * 2, format,
 				    LOCAL_DRM_FORMAT_MOD_NONE,
 				    fb);
 
 		cr = igt_get_cairo_ctx(data->drm_fd, fb);
 
 		igt_paint_color(cr, 0, 0,
-				width+data->crop * 2,
-				height+data->crop * 2,
+				src_w+data->crop * 2,
+				src_h+data->crop * 2,
 				1.0f - c->red,
 				1.0f - c->green,
 				1.0f - c->blue);
 
 		igt_paint_color(cr, data->crop, data->crop,
-				width, height,
+				src_w, src_h,
 				c->red, c->green, c->blue);
 
 		igt_put_cairo_ctx(data->drm_fd, fb, cr);
@@ -451,10 +452,10 @@ static void test_format_plane_color(data_t *data, enum pipe pipe,
 	 * if clamping test. DRM_FORMAT_XRGB8888 is used for reference color.
 	 */
 	if (data->crop != 0  && format != DRM_FORMAT_XRGB8888) {
-		igt_plane_set_size(plane, width, height);
 		igt_fb_set_position(fb, plane, data->crop, data->crop);
-		igt_fb_set_size(fb, plane, width, height);
+		igt_fb_set_size(fb, plane, src_w, src_h);
 	}
+	igt_plane_set_size(plane, dst_w, dst_h);
 
 	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_UNIVERSAL);
 	igt_pipe_crc_get_current(data->display.drm_fd, data->pipe_crc, crc);
@@ -470,7 +471,7 @@ static void test_format_plane(data_t *data, enum pipe pipe,
 	struct igt_fb fb = {};
 	drmModeModeInfo *mode;
 	uint32_t format, ref_format;
-	uint64_t width, height;
+	uint64_t width, height, dst_w, dst_h;
 	igt_crc_t ref_crc[ARRAY_SIZE(colors)];
 
 	/*
@@ -493,6 +494,8 @@ static void test_format_plane(data_t *data, enum pipe pipe,
 		do_or_die(drmGetCap(data->drm_fd, DRM_CAP_CURSOR_HEIGHT, &height));
 		ref_format = format = DRM_FORMAT_ARGB8888;
 	}
+	dst_w = width;
+	dst_h = height;
 
 	igt_debug("Testing connector %s on %s plane %s.%u\n",
 		  igt_output_name(output), kmstest_plane_type_name(plane->type),
@@ -516,9 +519,29 @@ static void test_format_plane(data_t *data, enum pipe pipe,
 		 IGT_FORMAT_ARGS(format),
 		 kmstest_pipe_name(pipe), plane->index);
 
+	if (plane->type != DRM_PLANE_TYPE_CURSOR && data->display.is_atomic) {
+		int ret;
+
+		igt_create_fb(data->drm_fd, 256, 256, format,
+				    LOCAL_DRM_FORMAT_MOD_NONE, &fb);
+
+		igt_plane_set_fb(plane, &fb);
+		/* Upscale to max size */
+		igt_plane_set_size(plane, dst_w, dst_h);
+
+		ret = igt_display_try_commit_atomic(&data->display, DRM_MODE_ATOMIC_TEST_ONLY, NULL);
+		igt_remove_fb(data->drm_fd, &fb);
+
+		if (!ret)
+			width = height = 256;
+
+		igt_plane_set_fb(plane, NULL);
+	}
+
 	for (int i = 0; i < ARRAY_SIZE(colors); i++) {
 		test_format_plane_color(data, pipe, plane,
 					format, width, height,
+					dst_w, dst_h,
 					i, &ref_crc[i], &fb);
 	}
 
@@ -550,6 +573,7 @@ static void test_format_plane(data_t *data, enum pipe pipe,
 		for (int j = 0; j < ARRAY_SIZE(colors); j++) {
 			test_format_plane_color(data, pipe, plane,
 						format, width, height,
+						dst_w, dst_h,
 						j, &crc, &fb);
 
 			igt_assert_crc_equal(&crc, &ref_crc[j]);
Signature · 6 lines
2.20.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#1 lore raw

[igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_plane: Reduce execution time by reducing source size and performing upscaling.

== Series Details ==

== Series Details ==

Series: tests/kms_plane: Reduce execution time by reducing source size and performing upscaling.
URL : https://patchwork.freedesktop.org/series/57694/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_5714 -> IGTPW_2564
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_2564 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_2564, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://patchwork.freedesktop.org/api/1.0/series/57694/revisions/1/mbox/

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in IGTPW_2564:

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live_contexts:
- fi-skl-gvtdvm: PASS -> DMESG-FAIL

Known issues
------------

Here are the changes found in IGTPW_2564 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@amdgpu/amd_basic@cs-compute:
- fi-kbl-8809g: NOTRUN -> FAIL [fdo#108094]

* igt@amdgpu/amd_basic@cs-sdma:
- fi-kbl-7560u: NOTRUN -> SKIP [fdo#109271] +17

* igt@amdgpu/amd_basic@query-info:
- fi-bsw-kefka: NOTRUN -> SKIP [fdo#109271] +56

* igt@gem_exec_basic@basic-bsd2:
- fi-kbl-7500u: NOTRUN -> SKIP [fdo#109271] +38

* igt@gem_exec_basic@gtt-bsd:
- fi-bwr-2160: NOTRUN -> SKIP [fdo#109271] +103

* igt@gem_exec_suspend@basic-s3:
- fi-icl-u2: PASS -> FAIL [fdo#103375]

* igt@i915_pm_rpm@basic-rte:
- fi-bsw-kefka: NOTRUN -> FAIL [fdo#108800]

* igt@i915_selftest@live_execlists:
- fi-apl-guc: NOTRUN -> INCOMPLETE [fdo#103927] / [fdo#109720]

* igt@kms_busy@basic-flip-a:
- fi-kbl-7567u: PASS -> SKIP [fdo#109271] / [fdo#109278] +2

* igt@kms_busy@basic-flip-c:

    - fi-bwr-2160:        NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
    - fi-blb-e6850:       NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
    - fi-byt-j1900:       NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
    - fi-bsw-kefka:       NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

* igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-7500u: NOTRUN -> DMESG-WARN [fdo#102505] / [fdo#103558] / [fdo#105079] / [fdo#105602]

* igt@kms_chamelium@hdmi-crc-fast:
- fi-byt-j1900: NOTRUN -> SKIP [fdo#109271] +52

* igt@kms_chamelium@vga-edid-read:
- fi-skl-6600u: NOTRUN -> SKIP [fdo#109271] +41

* igt@kms_force_connector_basic@force-load-detect:
- fi-bxt-j4205: NOTRUN -> SKIP [fdo#109271] +47

* igt@kms_pipe_crc_basic@hang-read-crc-pipe-c:
- fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] +48

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362]

* igt@kms_psr@primary_page_flip:
- fi-apl-guc: NOTRUN -> SKIP [fdo#109271] +50

* igt@prime_vgem@basic-fence-flip:
- fi-hsw-4770: PASS -> FAIL [fdo#104008]

* igt@runner@aborted:
- fi-apl-guc: NOTRUN -> FAIL [fdo#108622] / [fdo#109720]

#### Possible fixes ####

* igt@amdgpu/amd_basic@userptr:
- fi-kbl-8809g: DMESG-WARN [fdo#108965] -> PASS

* igt@gem_exec_suspend@basic-s4-devices:
- fi-blb-e6850: INCOMPLETE [fdo#107718] -> PASS

* igt@i915_module_load@reload-with-fault-injection:
- fi-kbl-7560u: INCOMPLETE -> PASS

[fdo#102505]: https://bugs.freedesktop.org/show_bug.cgi?id=102505
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104008]: https://bugs.freedesktop.org/show_bug.cgi?id=104008
[fdo#105079]: https://bugs.freedesktop.org/show_bug.cgi?id=105079
[fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#108094]: https://bugs.freedesktop.org/show_bug.cgi?id=108094
[fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622
[fdo#108800]: https://bugs.freedesktop.org/show_bug.cgi?id=108800
[fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720

Participating hosts (40 -> 41)
------------------------------

Additional (7): fi-byt-j1900 fi-bwr-2160 fi-apl-guc fi-kbl-7500u fi-bxt-j4205 fi-bsw-kefka fi-skl-6600u
Missing (6): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-ctg-p8600 fi-icl-u3

Build changes
-------------

* IGT: IGT_4876 -> IGTPW_2564

CI_DRM_5714: f0591e61349e96e8faba5348515043884e5ba542 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2564: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2564/
IGT_4876: 51b8d4cfde8d5b0176180b9683accea91474c7ff @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2564/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#2 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for tests/kms_plane: Reduce execution time by reducing source size and performing upscaling. (rev2)

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: tests/kms_plane: Reduce execution time by reducing source size and performing upscaling. (rev2)
URL : https://patchwork.freedesktop.org/series/57694/
State : success

== Summary ==

CI Bug Log - changes from IGT_4878 -> IGTPW_2577
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/57694/revisions/2/mbox/

Known issues
------------

Here are the changes found in IGTPW_2577 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_basic@readonly-bsd2:
- fi-pnv-d510: NOTRUN -> SKIP [fdo#109271] +76

* igt@i915_pm_rpm@module-reload:
- fi-skl-6770hq: PASS -> FAIL [fdo#108511]

* igt@kms_busy@basic-flip-a:
- fi-kbl-7567u: PASS -> SKIP [fdo#109271] / [fdo#109278] +2
- fi-gdg-551: PASS -> FAIL [fdo#103182]

* igt@kms_busy@basic-flip-c:
- fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
- fi-pnv-d510: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

* igt@kms_pipe_crc_basic@hang-read-crc-pipe-c:
- fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] +48

* igt@kms_psr@cursor_plane_move:
- fi-skl-6260u: NOTRUN -> SKIP [fdo#109271] +37

* igt@runner@aborted:
- fi-apl-guc: NOTRUN -> FAIL [fdo#108622] / [fdo#109720]

#### Possible fixes ####

* igt@gem_exec_suspend@basic-s4-devices:
- fi-blb-e6850: INCOMPLETE [fdo#107718] -> PASS

* igt@i915_selftest@live_evict:
- fi-bsw-kefka: DMESG-WARN [fdo#107709] -> PASS

* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u3: FAIL [fdo#103167] -> PASS

* igt@prime_vgem@basic-fence-flip:
- fi-gdg-551: DMESG-FAIL [fdo#103182] -> PASS

#### Warnings ####

* igt@i915_selftest@live_contexts:
- fi-icl-u2: DMESG-FAIL [fdo#108569] -> INCOMPLETE [fdo#108569]

* igt@i915_selftest@live_execlists:
- fi-apl-guc: INCOMPLETE [fdo#103927] / [fdo#109720] -> DMESG-WARN [fdo#108622]

[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#107709]: https://bugs.freedesktop.org/show_bug.cgi?id=107709
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#108511]: https://bugs.freedesktop.org/show_bug.cgi?id=108511
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720

Participating hosts (46 -> 43)
------------------------------

Additional (2): fi-skl-6260u fi-pnv-d510
Missing (5): fi-kbl-soraka fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-bdw-samus

Build changes
-------------

* IGT: IGT_4878 -> IGTPW_2577

CI_DRM_5728: 78b288a16a32e8828f93c5e2e9eb3c1b73bfdce7 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2577: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2577/
IGT_4878: 478615b1edba88559386ba80ccbf0f035f3360a9 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2577/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#3 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for tests/kms_plane: Reduce execution time by reducing source size and performing upscaling. (rev2)

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: tests/kms_plane: Reduce execution time by reducing source size and performing upscaling. (rev2)
URL : https://patchwork.freedesktop.org/series/57694/
State : success

== Summary ==

CI Bug Log - changes from IGT_4878_full -> IGTPW_2577_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/57694/revisions/2/mbox/

Known issues
------------

Here are the changes found in IGTPW_2577_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@i915_pm_rpm@modeset-lpsp-stress-no-wait:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] +29

* igt@kms_atomic_transition@5x-modeset-transitions-nonblocking:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +4

* igt@kms_busy@extended-modeset-hang-newfb-render-c:
- shard-hsw: NOTRUN -> DMESG-WARN [fdo#107956]
- shard-kbl: PASS -> DMESG-WARN [fdo#107956]

* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c:
- shard-glk: NOTRUN -> DMESG-WARN [fdo#107956]

* igt@kms_chamelium@dp-hpd-storm-disable:
- shard-glk: NOTRUN -> SKIP [fdo#109271] +53

* igt@kms_content_protection@atomic-dpms:
- shard-kbl: NOTRUN -> FAIL [fdo#108739]

* igt@kms_cursor_crc@cursor-256x256-random:
- shard-glk: NOTRUN -> FAIL [fdo#103232]

* igt@kms_cursor_crc@cursor-64x21-random:
- shard-kbl: PASS -> FAIL [fdo#103232]

* igt@kms_cursor_crc@cursor-64x64-suspend:
- shard-kbl: PASS -> INCOMPLETE [fdo#103665]

* igt@kms_flip@flip-vs-suspend:
- shard-apl: PASS -> DMESG-WARN [fdo#108566]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
- shard-kbl: PASS -> FAIL [fdo#103167]
- shard-apl: PASS -> FAIL [fdo#103167]

* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-move:
- shard-glk: PASS -> FAIL [fdo#103167] +8

* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-gtt:
- shard-glk: NOTRUN -> FAIL [fdo#103167]

* igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-pri-indfb-draw-pwrite:
- shard-hsw: NOTRUN -> SKIP [fdo#109271] +38

* igt@kms_plane_alpha_blend@pipe-a-alpha-basic:
- shard-kbl: NOTRUN -> FAIL [fdo#108145] / [fdo#108590]

* igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
- shard-kbl: NOTRUN -> FAIL [fdo#108145]

* igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb:

    - shard-hsw:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3
    - shard-kbl:          PASS -> FAIL [fdo#108145]
    - shard-apl:          PASS -> FAIL [fdo#108145]
    - shard-glk:          PASS -> FAIL [fdo#108145]

* igt@kms_plane_multiple@atomic-pipe-c-tiling-none:
- shard-glk: PASS -> FAIL [fdo#103166] +3

* igt@kms_plane_scaling@pipe-b-scaler-with-clipping-clamping:
- shard-glk: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +4

* igt@kms_setmode@basic:
- shard-apl: PASS -> FAIL [fdo#99912]

* igt@kms_universal_plane@universal-plane-pipe-c-functional:
- shard-apl: PASS -> FAIL [fdo#103166] +2

* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-apl: PASS -> FAIL [fdo#104894] +1

#### Possible fixes ####

* igt@i915_pm_rps@reset:
- shard-kbl: FAIL [fdo#102250] -> PASS
- shard-glk: FAIL [fdo#102250] -> PASS

* igt@i915_suspend@forcewake:
- shard-kbl: INCOMPLETE [fdo#103665] -> PASS

* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a:
- shard-hsw: DMESG-WARN [fdo#107956] -> PASS

* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
- shard-kbl: DMESG-WARN [fdo#107956] -> PASS +1
- shard-snb: DMESG-WARN [fdo#107956] -> PASS +2

* igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
- shard-apl: FAIL [fdo#107725] / [fdo#108145] -> PASS
- shard-glk: FAIL [fdo#108145] -> PASS

* igt@kms_color@pipe-a-degamma:
- shard-apl: FAIL [fdo#104782] / [fdo#108145] -> PASS

* igt@kms_cursor_crc@cursor-256x256-random:
- shard-apl: FAIL [fdo#103232] -> PASS +5
- shard-kbl: FAIL [fdo#103232] -> PASS

* igt@kms_cursor_crc@cursor-256x85-sliding:
- shard-hsw: INCOMPLETE [fdo#103540] -> PASS

* igt@kms_flip@flip-vs-dpms-interruptible:
- shard-hsw: DMESG-WARN [fdo#102614] -> PASS

* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-glk: FAIL [fdo#102887] / [fdo#105363] -> PASS

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
- shard-apl: FAIL [fdo#103167] -> PASS +6

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-onoff:
- shard-kbl: FAIL [fdo#103167] -> PASS +1

* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-blt:
- shard-glk: FAIL [fdo#103167] -> PASS +3

* igt@kms_plane@pixel-format-pipe-a-planes-source-clamping:
- shard-apl: FAIL [fdo#108948] -> PASS

* igt@kms_plane_multiple@atomic-pipe-b-tiling-none:
- shard-glk: FAIL [fdo#103166] -> PASS

* igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
- shard-apl: FAIL [fdo#103166] -> PASS +5
- shard-kbl: FAIL [fdo#103166] -> PASS +1

* igt@kms_rotation_crc@multiplane-rotation-cropping-bottom:
- shard-kbl: DMESG-FAIL [fdo#105763] -> PASS

* igt@kms_vblank@pipe-a-ts-continuation-modeset-rpm:
- shard-apl: FAIL [fdo#104894] -> PASS +1

* igt@kms_vblank@pipe-b-ts-continuation-suspend:
- shard-kbl: FAIL [fdo#104894] -> PASS

* igt@tools_test@tools_test:
- shard-glk: SKIP [fdo#109271] -> PASS

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#102250]: https://bugs.freedesktop.org/show_bug.cgi?id=102250
[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#107725]: https://bugs.freedesktop.org/show_bug.cgi?id=107725
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108590]: https://bugs.freedesktop.org/show_bug.cgi?id=108590
[fdo#108739]: https://bugs.freedesktop.org/show_bug.cgi?id=108739
[fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912

Participating hosts (7 -> 5)
------------------------------

Missing (2): shard-skl shard-iclb

Build changes
-------------

* IGT: IGT_4878 -> IGTPW_2577

CI_DRM_5728: 78b288a16a32e8828f93c5e2e9eb3c1b73bfdce7 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2577: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2577/
IGT_4878: 478615b1edba88559386ba80ccbf0f035f3360a9 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2577/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

Reviewed-by on v1 1/1
#4 lore raw
In reply to Maarten Lankhorst

Hi,

I tested it on my computer with i915, and the performance improvements are significant. Without your patch, the pixel-format-pipe-A-planes test took 42s to finish; with this patch, the test completed in 13s. Also, the final result was the same. I just have some tiny comments inline, feel free to ignore them.

Quoted 3 lines · Maarten Lankhorst

Execution time is way too high because of all the various conversion routines and inefficient accesses done by pixman on uncached memory. Fix it by reducing the source fb siaze, and using scaling to increase

fb siaze -> fb size

Quoted 98 lines

to span the entire crtc.

---
 tests/kms_plane.c | 44 ++++++++++++++++++++++++++++++++++----------
 1 file changed, 34 insertions(+), 10 deletions(-)
tests/kms_plane.c +19 -10
index 91de46948a3a..3a2dd3e3f1f9 100644
@@ -407,14 +407,15 @@ static void set_legacy_lut(data_t *data, enum pipe pipe,
 
 static void test_format_plane_color(data_t *data, enum pipe pipe,
 				    igt_plane_t *plane,
-				    uint32_t format, int width, int height,
+				    uint32_t format, int src_w, int src_h,
+				    int dst_w, int dst_h,
 				    int color, igt_crc_t *crc, struct igt_fb *fb)
 {
 	const color_t *c = &colors[color];
 	struct igt_fb old_fb = *fb;
 
 	if (data->crop == 0 || format == DRM_FORMAT_XRGB8888) {
-		igt_create_color_fb(data->drm_fd, width, height, format,
+		igt_create_color_fb(data->drm_fd, src_w, src_h, format,
 				    LOCAL_DRM_FORMAT_MOD_NONE,
 				    c->red, c->green, c->blue, fb);
 	} else {
@@ -424,22 +425,22 @@ static void test_format_plane_color(data_t *data, enum pipe pipe,
 	 */
 		cairo_t *cr;
 
-		igt_create_fb(data->drm_fd, width + data->crop * 2,
-				    height + data->crop * 2, format,
+		igt_create_fb(data->drm_fd, src_w + data->crop * 2,
+				    src_h + data->crop * 2, format,
 				    LOCAL_DRM_FORMAT_MOD_NONE,
 				    fb);
 
 		cr = igt_get_cairo_ctx(data->drm_fd, fb);
 
 		igt_paint_color(cr, 0, 0,
-				width+data->crop * 2,
-				height+data->crop * 2,
+				src_w+data->crop * 2,
+				src_h+data->crop * 2,
 				1.0f - c->red,
 				1.0f - c->green,
 				1.0f - c->blue);
 
 		igt_paint_color(cr, data->crop, data->crop,
-				width, height,
+				src_w, src_h,
 				c->red, c->green, c->blue);
 
 		igt_put_cairo_ctx(data->drm_fd, fb, cr);
@@ -451,10 +452,10 @@ static void test_format_plane_color(data_t *data, enum pipe pipe,
 	 * if clamping test. DRM_FORMAT_XRGB8888 is used for reference color.
 	 */
 	if (data->crop != 0  && format != DRM_FORMAT_XRGB8888) {
-		igt_plane_set_size(plane, width, height);
 		igt_fb_set_position(fb, plane, data->crop, data->crop);
-		igt_fb_set_size(fb, plane, width, height);
+		igt_fb_set_size(fb, plane, src_w, src_h);
 	}
+	igt_plane_set_size(plane, dst_w, dst_h);
 
 	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_UNIVERSAL);
 	igt_pipe_crc_get_current(data->display.drm_fd, data->pipe_crc, crc);
@@ -470,7 +471,7 @@ static void test_format_plane(data_t *data, enum pipe pipe,
 	struct igt_fb fb = {};
 	drmModeModeInfo *mode;
 	uint32_t format, ref_format;
-	uint64_t width, height;
+	uint64_t width, height, dst_w, dst_h;
 	igt_crc_t ref_crc[ARRAY_SIZE(colors)];
 
 	/*
@@ -493,6 +494,8 @@ static void test_format_plane(data_t *data, enum pipe pipe,
 		do_or_die(drmGetCap(data->drm_fd, DRM_CAP_CURSOR_HEIGHT, &height));
 		ref_format = format = DRM_FORMAT_ARGB8888;
 	}
+	dst_w = width;
+	dst_h = height;
 
 	igt_debug("Testing connector %s on %s plane %s.%u\n",
 		  igt_output_name(output), kmstest_plane_type_name(plane->type),
@@ -516,9 +519,29 @@ static void test_format_plane(data_t *data, enum pipe pipe,
 		 IGT_FORMAT_ARGS(format),
 		 kmstest_pipe_name(pipe), plane->index);
 
+	if (plane->type != DRM_PLANE_TYPE_CURSOR && data->display.is_atomic) {
+		int ret;
+
+		igt_create_fb(data->drm_fd, 256, 256, format,
+				    LOCAL_DRM_FORMAT_MOD_NONE, &fb);
+

tests/kms_plane.c static void test_format_plane(data_t *data, enum pipe pipe, · line 537

Quoted 10 lines
tests/kms_plane.c +10 -0
+		igt_plane_set_fb(plane, &fb);
+		/* Upscale to max size */
+		igt_plane_set_size(plane, dst_w, dst_h);
+
+		ret = igt_display_try_commit_atomic(&data->display, DRM_MODE_ATOMIC_TEST_ONLY, NULL);
+		igt_remove_fb(data->drm_fd, &fb);
+
+		if (!ret)
+			width = height = 256;
+

You used the constant 256 three times here. How about creating a define for it? Maybe it could be easy to change the value if required.

Best Regards

Quoted 25 lines
tests/kms_plane.c +5 -0
+		igt_plane_set_fb(plane, NULL);
+	}
+
 	for (int i = 0; i < ARRAY_SIZE(colors); i++) {
 		test_format_plane_color(data, pipe, plane,
 					format, width, height,
+					dst_w, dst_h,
 					i, &ref_crc[i], &fb);
 	}
 
@@ -550,6 +573,7 @@ static void test_format_plane(data_t *data, enum pipe pipe,
 		for (int j = 0; j < ARRAY_SIZE(colors); j++) {
 			test_format_plane_color(data, pipe, plane,
 						format, width, height,
+						dst_w, dst_h,
 						j, &crc, &fb);
 
 			igt_assert_crc_equal(&crc, &ref_crc[j]);
Signature · 6 lines
2.20.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Signature · 5 lines
Rodrigo Siqueira
https://siqueira.tech
Graduate Student
Department of Computer Science
University of São Paulo

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev