[Intel-gfx] [PATCH 14/19] drm/i915/gt: Schedule next retirement worker first

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Tue Nov 19 16:07:50 UTC 2019


On 18/11/2019 23:02, Chris Wilson wrote:
> As we may park the gt during request retirement, we may then cancel the
> retirement worker only to then program the delayed worker once more.
> 
> If we schedule the next delayed retirement worker first, if we then park
> the gt, the work remain cancelled [until we unpark].
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>   drivers/gpu/drm/i915/gt/intel_gt_requests.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_requests.c b/drivers/gpu/drm/i915/gt/intel_gt_requests.c
> index 74356db43325..4dc3cbeb1b36 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_requests.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_requests.c
> @@ -109,9 +109,9 @@ static void retire_work_handler(struct work_struct *work)
>   	struct intel_gt *gt =
>   		container_of(work, typeof(*gt), requests.retire_work.work);
>   
> -	intel_gt_retire_requests(gt);
>   	schedule_delayed_work(&gt->requests.retire_work,
>   			      round_jiffies_up_relative(HZ));
> +	intel_gt_retire_requests(gt);
>   }
>   
>   void intel_gt_init_requests(struct intel_gt *gt)


Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Regards,

Tvrtko


More information about the Intel-gfx mailing list