Re: [i-g-t PATCH v10 4/5] igt/kms_flip: Use new igt_spin_batch

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

 



On Wed, Nov 23, 2016 at 12:59:42PM +0200, Abdiel Janulgue wrote:
> @@ -933,8 +755,13 @@ static unsigned int run_test_step(struct test_output *o)
>  	if (o->flags & TEST_MODESET)
>  		igt_assert(set_mode(o, o->fb_ids[o->current_fb_id], 0, 0) == 0);
>  
> -	if (o->flags & TEST_DPMS)
> +	if (o->flags & TEST_DPMS) {
> +		if (spin_rcs)
> +			igt_spin_batch_end(spin_rcs);
> +		if (spin_bcs)
> +			igt_spin_batch_end(spin_bcs);
>  		set_dpms(o, DRM_MODE_DPMS_ON);

This is subtly different as the set_dpms() is now called with an idle
bo. Now, set_dpms() may or may not block so calling it first then
igt_spin_batch_end() may deadlock, so this requires a set_timeout first
followed by end afterwards.
> +	}
>  
>  	if (o->flags & TEST_VBLANK_RACE) {
>  		struct vblank_reply reply;
> @@ -967,8 +794,13 @@ static unsigned int run_test_step(struct test_output *o)
>  		igt_assert(__wait_for_vblank(TEST_VBLANK_BLOCK, o->pipe, 1, 0, &reply) == 0);
>  	}
>  
> -	if (do_flip)
> +	if (do_flip) {
>  		do_or_die(do_page_flip(o, new_fb_id, !(o->flags & TEST_NOEVENT)));
> +		if (spin_rcs)
> +			igt_spin_batch_end(spin_rcs);
> +		if (spin_bcs)
> +			igt_spin_batch_end(spin_bcs);

Hmm, these need new_fb_id to be busy (separate tests for current /
both), I think you made current busy instead.

Order is good here (i.e. queue flip whilst busy). However, better would
be to delay the batch completion for a vblank just to stress the code
that little bit harder. (Even an assert that flip / bo are still busy as
we handle the vblank and complete the batch.)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
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