Thread (4 messages) 4 messages, 3 authors, 2021-01-06

Re: [igt-dev] [PATCH i-g-t] tests/kms_plane_scaling: reduce repetitive work per round

From: Karthik B S <hidden>
Date: 2021-01-06 03:56:40

On 1/5/2021 4:43 PM, Juha-Pekka Heikkila wrote:
create needed planes only when needed and not destroying them in between.

This reduces execution time for clipping clamping dynamic tests on my ICL
from 75s to 29s

Signed-off-by: Juha-Pekka Heikkila <redacted>
LGTM.

Reviewed-by: Karthik B S <redacted>
quoted hunk ↗ jump to hunk
---
  tests/kms_plane_scaling.c | 26 +++++++++++++-------------
  1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index 89b82416d..c63eb428f 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -483,19 +483,8 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output)
  }
  
  static void
-__test_scaler_with_clipping_clamping_scenario(data_t *d, drmModeModeInfo *mode,
-					      uint32_t f1, uint32_t f2)
+__test_scaler_with_clipping_clamping_scenario(data_t *d, drmModeModeInfo *mode)
  {
-	cleanup_fbs(d);
-
-	igt_create_pattern_fb(d->drm_fd,
-			      mode->hdisplay, mode->vdisplay, f1,
-			      LOCAL_I915_FORMAT_MOD_X_TILED, &d->fb[1]);
-
-	igt_create_pattern_fb(d->drm_fd,
-			      mode->hdisplay, mode->vdisplay, f2,
-			      LOCAL_I915_FORMAT_MOD_Y_TILED, &d->fb[2]);
-
  	igt_plane_set_fb(d->plane1, &d->fb[1]);
  	igt_plane_set_fb(d->plane2, &d->fb[2]);
  
@@ -549,6 +538,10 @@ test_scaler_with_clipping_clamping_scenario(data_t *d, enum pipe pipe, igt_outpu
  
  		igt_vec_init(&tested_formats2, sizeof(uint32_t));
  
+		igt_create_pattern_fb(d->drm_fd,
+				      mode->hdisplay, mode->vdisplay, f1,
+				      LOCAL_I915_FORMAT_MOD_X_TILED, &d->fb[1]);
+
  		for (int j = 0; j < d->plane2->drm_plane->count_formats; j++) {
  			unsigned f2 = d->plane2->drm_plane->formats[j];
  
@@ -556,8 +549,15 @@ test_scaler_with_clipping_clamping_scenario(data_t *d, enum pipe pipe, igt_outpu
  			    !can_scale(d, f2))
  				continue;
  
-			__test_scaler_with_clipping_clamping_scenario(d, mode, f1, f2);
+			igt_create_pattern_fb(d->drm_fd,
+					      mode->hdisplay, mode->vdisplay, f2,
+					      LOCAL_I915_FORMAT_MOD_Y_TILED,
+					      &d->fb[2]);
+
+			__test_scaler_with_clipping_clamping_scenario(d, mode);
+			igt_remove_fb(d->drm_fd, &d->fb[2]);
  		}
+		igt_remove_fb(d->drm_fd, &d->fb[1]);
  
  		igt_vec_fini(&tested_formats2);
  	}

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help