[Intel-gfx] [PATCH 1/1] tests/kms_rotate_crc: Test to verify rotation of planes through CRC

Daniel Vetter daniel at ffwll.ch
Thu Feb 6 17:58:16 CET 2014


On Thu, Feb 06, 2014 at 08:34:31PM +0530, sagar.a.kamble at intel.com wrote:
> From: Sagar Kamble <sagar.a.kamble at intel.com>
> 
> This test will verify 180 degree rotation of CRTC and sprite planes
> by grabbing CRC for already rotated image and comparing with CRC calculated
> after triggering rotation through DRM property.
> 
> Signed-off-by: Sagar Kamble <sagar.a.kamble at intel.com>
> Tested-by: Sagar Kamble <sagar.a.kamble at intel.com>

Minor style nit: The tested-by tag is to credit testing done by
non-authors. This is especially important if testing requires a special
machine/setup (e.g. the one from a bug reporter) - adding the mail helps
in contacting the right people again if a commit breaks something.

Adding your own mail is redundant since it's assumed that developers test
their own stuff ;-)

Two more general comments below.


[snip]

> +igt_main
> +{
> +	data_t data = {};

igt_fixture/subtest use longjmps, so putting stack variables into the same
function as those is ill-defined. bkm is to add them as global variables
right above igt_main.

> +	fp = fopen("rotate.log", "w+"); 

Please log data to stdout using printf and friends. That way test runners
can easily redirect test output or capture it themselve for storage into a
db. Maybe we need an official igt_log, Jeff McGee somewhat proposed this
already. Also anything not related to enumerating the subtests must be put
into igt_fictures.

> +
> +	igt_skip_on_simulation();
> +
> +	igt_fixture {
> +		data.drm_fd = drm_open_any();
> +		igt_set_vt_graphics_mode();
> +
> +		igt_debugfs_init(&data.debugfs);
> +		igt_pipe_crc_check(&data.debugfs);
> +
> +		display_init(&data);
> +	}
> +
> +	run_test(&data);
> +
> +	igt_fixture {
> +		display_fini(&data);
> +	}
> +
> +	fclose(fp);
> +}
> -- 
> 1.8.5
> 

> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx


-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list