Re: [PATCH i-g-t v3] kms_atomic_transition: Split out modeset tests on internal panels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Op 08-11-17 om 20:33 schreef Imre Deak:
> Doing modeset on internal panels may have a considerable overhead due to
> the panel specific power sequencing delays. To avoid long test runtimes
> in CI split out the testing of internal panels from the plane modeset
> subtests and test only a reduced number of plane combinations on these:
> where only a single plane is enabled, all planes are disabled or all
> planes are enabled.
>
> v2:
> - Add code comment explaining the need for the separate internal-panels
>   subtests.
> - Calculate the number of enabled planes only once. (Chris)
> - Disable the slow internal-panels subtests testing all combinations.
>   (Petri)
>
> v3: (Maarten)
> - Skip the internal-panels subtests if no internal panels are found.
> - Also test transitions with all planes disabled.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103334
> Cc: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
> Cc: Petri Latvala <petri.latvala@xxxxxxxxx>
> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx>
> ---

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>

>  tests/kms_atomic_transition.c | 71 ++++++++++++++++++++++++++++++++++++++++---
>  1 file changed, 67 insertions(+), 4 deletions(-)
>
> diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
> index 4c295125..54581ed7 100644
> --- a/tests/kms_atomic_transition.c
> +++ b/tests/kms_atomic_transition.c
> @@ -189,6 +189,7 @@ enum transition_type {
>  	TRANSITION_PLANES,
>  	TRANSITION_AFTER_FREE,
>  	TRANSITION_MODESET,
> +	TRANSITION_MODESET_FAST,
>  	TRANSITION_MODESET_DISABLE,
>  };
>  
> @@ -528,6 +529,13 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
>  	}
>  
>  	for (i = 0; i < iter_max; i++) {
> +		int n_enable_planes = hweight32(i);
> +
> +		if (type == TRANSITION_MODESET_FAST &&
> +		    n_enable_planes > 1 &&
> +		    n_enable_planes < pipe_obj->n_planes)
> +			continue;
> +
>  		igt_output_set_pipe(output, pipe);
>  
>  		wm_setup_plane(display, pipe, i, parms, fencing);
> @@ -547,16 +555,23 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
>  
>  			/* i -> i+1 will be done when i increases, can be skipped here */
>  			for (j = iter_max - 1; j > i + 1; j--) {
> +				n_enable_planes = hweight32(j);
> +
> +				if (type == TRANSITION_MODESET_FAST &&
> +				    n_enable_planes > 1 &&
> +				    n_enable_planes < pipe_obj->n_planes)
> +					continue;
> +
>  				wm_setup_plane(display, pipe, j, parms, fencing);
>  
> -				if (type == TRANSITION_MODESET)
> +				if (type >= TRANSITION_MODESET)
>  					igt_output_override_mode(output, &override_mode);
>  
>  				atomic_commit(display, pipe, flags, (void *)(unsigned long) j, fencing);
>  				wait_for_transition(display, pipe, nonblocking, fencing);
>  
>  				wm_setup_plane(display, pipe, i, parms, fencing);
> -				if (type == TRANSITION_MODESET)
> +				if (type >= TRANSITION_MODESET)
>  					igt_output_override_mode(output, NULL);
>  
>  				atomic_commit(display, pipe, flags, (void *)(unsigned long) i, fencing);
> @@ -864,6 +879,19 @@ static void run_modeset_transition(igt_display_t *display, int requested_outputs
>  	run_modeset_tests(display, requested_outputs, nonblocking, fencing);
>  }
>  
> +static bool output_is_internal_panel(igt_output_t *output)
> +{
> +	switch (output->config.connector->connector_type) {
> +	case DRM_MODE_CONNECTOR_LVDS:
> +	case DRM_MODE_CONNECTOR_eDP:
> +	case DRM_MODE_CONNECTOR_DSI:
> +	case DRM_MODE_CONNECTOR_DPI:
> +		return true;
> +	default:
> +		return false;
> +	}
> +}
> +
>  igt_main
>  {
>  	igt_display_t display;
> @@ -913,13 +941,48 @@ igt_main
>  		for_each_pipe_with_valid_output(&display, pipe, output)
>  			run_transition_test(&display, pipe, output, TRANSITION_AFTER_FREE, true, true);
>  
> +	/*
> +	 * Test modeset cases on internal panels separately with a reduced
> +	 * number of combinations, to avoid long runtimes due to modesets on
> +	 * panels with long power cycle delays.
> +	 */
>  	igt_subtest("plane-all-modeset-transition")
> -		for_each_pipe_with_valid_output(&display, pipe, output)
> +		for_each_pipe_with_valid_output(&display, pipe, output) {
> +			if (output_is_internal_panel(output))
> +				continue;
>  			run_transition_test(&display, pipe, output, TRANSITION_MODESET, false, false);
> +		}
>  
>  	igt_subtest("plane-all-modeset-transition-fencing")
> -		for_each_pipe_with_valid_output(&display, pipe, output)
> +		for_each_pipe_with_valid_output(&display, pipe, output) {
> +			if (output_is_internal_panel(output))
> +				continue;
>  			run_transition_test(&display, pipe, output, TRANSITION_MODESET, false, true);
> +		}
> +
> +	igt_subtest("plane-all-modeset-transition-internal-panels") {
> +		int tested = 0;
> +
> +		for_each_pipe_with_valid_output(&display, pipe, output) {
> +			if (!output_is_internal_panel(output))
> +				continue;
> +			run_transition_test(&display, pipe, output, TRANSITION_MODESET_FAST, false, false);
> +			tested++;
> +		}
> +		igt_skip_on_f(!tested, "No output with internal panel found\n");
> +	}
> +
> +	igt_subtest("plane-all-modeset-transition-fencing-internal-panels") {
> +		int tested = 0;
> +
> +		for_each_pipe_with_valid_output(&display, pipe, output) {
> +			if (!output_is_internal_panel(output))
> +				continue;
> +			run_transition_test(&display, pipe, output, TRANSITION_MODESET_FAST, false, true);
> +			tested++;
> +		}
> +		igt_skip_on_f(!tested, "No output with internal panel found\n");
> +	}
>  
>  	igt_subtest("plane-toggle-modeset-transition")
>  		for_each_pipe_with_valid_output(&display, pipe, output)


_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux