[Intel-gfx] [PATCH i-g-t v4 2/3] chamelium: Remove init reset duplicate in favor of per-test reset

Lyude Paul lyude at redhat.com
Thu Jul 6 15:45:54 UTC 2017


RB'd and pushed

On Tue, 2017-07-04 at 16:33 +0300, Paul Kocialkowski wrote:
> Since most tests are already doing a reset, there is no need to
> duplicate it at init time. This removes that duplicate reset and adds
> a call to reset_state where in-test resets where not done previously.
> 
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski at linux.intel.com>
> ---
>  lib/igt_chamelium.c | 2 --
>  tests/chamelium.c   | 6 ++++++
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
> index 225f98c3..624f448b 100644
> --- a/lib/igt_chamelium.c
> +++ b/lib/igt_chamelium.c
> @@ -1233,8 +1233,6 @@ struct chamelium *chamelium_init(int drm_fd)
>  	if (!chamelium_read_config(chamelium, drm_fd))
>  		goto error;
>  
> -	chamelium_reset(chamelium);
> -
>  	cleanup_instance = chamelium;
>  	igt_install_exit_handler(chamelium_exit_handler);
>  
> diff --git a/tests/chamelium.c b/tests/chamelium.c
> index 346018a5..6247d537 100644
> --- a/tests/chamelium.c
> +++ b/tests/chamelium.c
> @@ -431,6 +431,8 @@ test_display_crc_single(data_t *data, struct
> chamelium_port *port)
>  	drmModeConnector *connector;
>  	int fb_id, i;
>  
> +	reset_state(data, port);
> +
>  	output = prepare_output(data, &display, port);
>  	connector = chamelium_port_get_connector(data->chamelium,
> port, false);
>  	primary = igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_PRIMARY);
> @@ -485,6 +487,8 @@ test_display_crc_multiple(data_t *data, struct
> chamelium_port *port)
>  	drmModeConnector *connector;
>  	int fb_id, i, j, captured_frame_count;
>  
> +	reset_state(data, port);
> +
>  	output = prepare_output(data, &display, port);
>  	connector = chamelium_port_get_connector(data->chamelium,
> port, false);
>  	primary = igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_PRIMARY);
> @@ -544,6 +548,8 @@ test_display_frame_dump(data_t *data, struct
> chamelium_port *port)
>  	drmModeConnector *connector;
>  	int fb_id, i, j;
>  
> +	reset_state(data, port);
> +
>  	output = prepare_output(data, &display, port);
>  	connector = chamelium_port_get_connector(data->chamelium,
> port, false);
>  	primary = igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_PRIMARY);
-- 
Cheers,
	Lyude


More information about the Intel-gfx mailing list