Re: [PATCH] drm/i915/selftests: Use preemption timeout on cleanup

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

 



Hi Janusz,

...

>  	for_each_gt(gt, i915, i) {
> +		struct intel_engine_cs *engine;
> +		unsigned long timeout_ms = 0;
> +		unsigned int id;
> +
>  		if (intel_gt_is_wedged(gt))
>  			ret = -EIO;
>  
> +		for_each_engine(engine, gt, id) {
> +			if (engine->props.preempt_timeout_ms > timeout_ms)
> +				timeout_ms = engine->props.preempt_timeout_ms;
> +		}


the brackets are not really required here.

> +
>  		cond_resched();
>  
> -		if (intel_gt_wait_for_idle(gt, HZ * 3) == -ETIME) {
> +		if (intel_gt_wait_for_idle(gt, HZ * timeout_ms / 500) == -ETIME) {

where is this 500 coming from?

Thanks,
Andi

>  			pr_err("%pS timed out, cancelling all further testing.\n",
>  			       __builtin_return_address(0));
>  
> -- 
> 2.47.1



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux