diff mbox

[i-g-t] tests/kms_plane_multiple: Fix CRC based atomic correctness test

Message ID 1480427824-9948-1-git-send-email-mika.kahola@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mika Kahola Nov. 29, 2016, 1:57 p.m. UTC
Fixes issues on kms_plane_multiple i-g-t test found when running CI tests

v1:
 - don't use tiling for cursor plane (Ville)
 - for y/yf tiling check that the platform is at least GEN9 (Ville)

Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
 tests/kms_plane_multiple.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Maarten Lankhorst Nov. 30, 2016, 2:18 p.m. UTC | #1
Op 29-11-16 om 14:57 schreef Mika Kahola:
> Fixes issues on kms_plane_multiple i-g-t test found when running CI tests
>
> v1:
>  - don't use tiling for cursor plane (Ville)
>  - for y/yf tiling check that the platform is at least GEN9 (Ville)
>
> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> ---
>  tests/kms_plane_multiple.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
> index bedee16..5e12be4 100644
> --- a/tests/kms_plane_multiple.c
> +++ b/tests/kms_plane_multiple.c
> @@ -210,7 +210,7 @@ prepare_planes(data_t *data, enum pipe pipe, color_t *color,
>  		igt_create_color_fb(data->drm_fd,
>  				    size[i], size[i],
>  				    data->plane[i]->is_cursor ? DRM_FORMAT_ARGB8888 : DRM_FORMAT_XRGB8888,
> -				    tiling,
> +				    data->plane[i]->is_cursor ? LOCAL_DRM_FORMAT_MOD_NONE : tiling,
>  				    color->red, color->green, color->blue,
>  				    &data->fb[i]);
In the future we could be more smart here and do some TEST_ONLY to see if tiling is allowed, but this is fine for now.
> @@ -349,6 +349,7 @@ test_plane_position(data_t *data, enum pipe pipe, bool atomic, int max_planes,
>  {
>  	igt_output_t *output;
>  	int connected_outs;
> +	int devid = intel_get_drm_devid(data->drm_fd);
>  
>  	if (atomic)
>  		igt_require(data->display.is_atomic);
> @@ -356,6 +357,10 @@ test_plane_position(data_t *data, enum pipe pipe, bool atomic, int max_planes,
>  	igt_skip_on(pipe >= data->display.n_pipes);
>  	igt_skip_on(max_planes >= data->display.pipes[pipe].n_planes);
>  
> +	if ((tiling == LOCAL_I915_FORMAT_MOD_Y_TILED ||
> +	     tiling == LOCAL_I915_FORMAT_MOD_Yf_TILED))
> +		igt_require(AT_LEAST_GEN(devid, 9));
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
diff mbox

Patch

diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
index bedee16..5e12be4 100644
--- a/tests/kms_plane_multiple.c
+++ b/tests/kms_plane_multiple.c
@@ -210,7 +210,7 @@  prepare_planes(data_t *data, enum pipe pipe, color_t *color,
 		igt_create_color_fb(data->drm_fd,
 				    size[i], size[i],
 				    data->plane[i]->is_cursor ? DRM_FORMAT_ARGB8888 : DRM_FORMAT_XRGB8888,
-				    tiling,
+				    data->plane[i]->is_cursor ? LOCAL_DRM_FORMAT_MOD_NONE : tiling,
 				    color->red, color->green, color->blue,
 				    &data->fb[i]);
 
@@ -349,6 +349,7 @@  test_plane_position(data_t *data, enum pipe pipe, bool atomic, int max_planes,
 {
 	igt_output_t *output;
 	int connected_outs;
+	int devid = intel_get_drm_devid(data->drm_fd);
 
 	if (atomic)
 		igt_require(data->display.is_atomic);
@@ -356,6 +357,10 @@  test_plane_position(data_t *data, enum pipe pipe, bool atomic, int max_planes,
 	igt_skip_on(pipe >= data->display.n_pipes);
 	igt_skip_on(max_planes >= data->display.pipes[pipe].n_planes);
 
+	if ((tiling == LOCAL_I915_FORMAT_MOD_Y_TILED ||
+	     tiling == LOCAL_I915_FORMAT_MOD_Yf_TILED))
+		igt_require(AT_LEAST_GEN(devid, 9));
+
 	if (!opt.user_seed)
 		opt.seed = time(NULL);