Commit 920340ae authored by Steve Longerbeam's avatar Steve Longerbeam Committed by Philipp Zabel
Browse files

gpu: ipu-v3: image-convert: Only wait for abort completion if active run



Only wait for the ctx->aborted completion if there is an active run
in progress, otherwise the wait will just timeout after 10 seconds.
If there is no active run in progress, the done queue just needs to
be emptied.

Signed-off-by: default avatarSteve Longerbeam <slongerbeam@gmail.com>
Tested-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent 819bec35
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -1562,9 +1562,14 @@ static void __ipu_image_convert_abort(struct ipu_image_convert_ctx *ctx)
		return;
	}

	if (!active_run) {
		empty_done_q(chan);
		return;
	}

	dev_dbg(priv->ipu->dev,
		"%s: task %u: wait for completion: %d runs, active run %p\n",
		__func__, chan->ic_task, run_count, active_run);
		"%s: task %u: wait for completion: %d runs\n",
		__func__, chan->ic_task, run_count);

	ret = wait_for_completion_timeout(&ctx->aborted,
					  msecs_to_jiffies(10000));