On Wed, Apr 22, 2015 at 05:00:27PM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <[email protected]>
> 
> This matches the behaviour in kernel patch
> "drm/i915/skl: Disallow tiling changes during page flip".
> 
> Signed-off-by: Tvrtko Ursulin <[email protected]>
> Cc: Chris Wilson <[email protected]>
> ---
>  tests/kms_flip_tiling.c | 23 ++++++++++++++---------
>  1 file changed, 14 insertions(+), 9 deletions(-)
> 
> diff --git a/tests/kms_flip_tiling.c b/tests/kms_flip_tiling.c
> index 8345505..3eef4cc 100644
> --- a/tests/kms_flip_tiling.c
> +++ b/tests/kms_flip_tiling.c
> @@ -63,7 +63,7 @@ fill_linear_fb(struct igt_fb *fb, data_t *data, 
> drmModeModeInfo *mode)
>  }
>  
>  static void
> -test_flip_changes_tiling(data_t *data, igt_output_t *output, uint64_t tiling)
> +test_flip_changes_tiling(data_t *data, igt_output_t *output, uint64_t 
> tiling, int expect)
>  {
>       struct igt_fb linear, tiled;
>       drmModeModeInfo *mode;
> @@ -107,13 +107,15 @@ test_flip_changes_tiling(data_t *data, igt_output_t 
> *output, uint64_t tiling)
>       /* flip to the linear buffer */
>       ret = drmModePageFlip(data->drm_fd, output->config.crtc->crtc_id,
>                             fb_id, 0, NULL);
> -     igt_assert_eq(ret, 0);
> +     igt_assert_eq(ret, expect);
>  
> -     igt_wait_for_vblank(data->drm_fd, pipe);
> +     if (expect == 0) {

I'd still accept ret == 0 since maybe one day it will work happily.

So perhaps:
if (ret) igt_assert_rq(ret, expect);
igt_require(ret == 0);
?

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to