Re: [PATCH v15 05/15] accel/rocket: factor the completion tail out of the IRQ handler
From: Heiko Stübner
Date: Wed Nov 04 2026 - 05:28:41 EST
Am Sonntag, 1. November 2026, 09:22:57 Mitteleuropäische Normalzeit schrieb Jiaxing Hu:
> Move the part of rocket_job_handle_irq() that starts the next task or
> retires the job into rocket_job_next_locked(). No functional change.
>
> Signed-off-by: Jiaxing Hu <gahing@xxxxxxxxxxxxx>
> Reviewed-by: Igor Paunovic <royalnet026@xxxxxxxxx>
this makes the irq-handler more descriptive in what it does
Reviewed-by: Heiko Stuebner <heiko@xxxxxxxxx>
> ---
> drivers/accel/rocket/rocket_job.c | 31 ++++++++++++++++++++-----------
> 1 file changed, 20 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/accel/rocket/rocket_job.c b/drivers/accel/rocket/rocket_job.c
> index 152a9098634b..417d5ef06c09 100644
> --- a/drivers/accel/rocket/rocket_job.c
> +++ b/drivers/accel/rocket/rocket_job.c
> @@ -365,6 +365,25 @@ static struct dma_fence *rocket_job_run(struct drm_sched_job *sched_job)
> return ERR_PTR(ret);
> }
>
> +/* Start the job's next task, or retire it. Caller holds job_lock. */
> +static void rocket_job_next_locked(struct rocket_core *core)
> +{
> + lockdep_assert_held(&core->job_lock);
> +
> + if (!core->in_flight_job)
> + return;
> +
> + if (core->in_flight_job->next_task_idx < core->in_flight_job->task_count) {
> + rocket_job_hw_submit(core, core->in_flight_job);
> + return;
> + }
> +
> + iommu_detach_group(NULL, iommu_group_get(core->dev));
> + dma_fence_signal(core->in_flight_job->done_fence);
> + pm_runtime_put_autosuspend(core->dev);
> + core->in_flight_job = NULL;
> +}
> +
> static void rocket_job_handle_irq(struct rocket_core *core)
> {
> pm_runtime_mark_last_busy(core->dev);
> @@ -378,17 +397,7 @@ static void rocket_job_handle_irq(struct rocket_core *core)
> rocket_pc_writel(core, OPERATION_ENABLE, 0x0);
> rocket_pc_writel(core, INTERRUPT_CLEAR, 0x1ffff);
>
> - if (core->in_flight_job) {
> - if (core->in_flight_job->next_task_idx < core->in_flight_job->task_count) {
> - rocket_job_hw_submit(core, core->in_flight_job);
> - return;
> - }
> -
> - iommu_detach_group(NULL, iommu_group_get(core->dev));
> - dma_fence_signal(core->in_flight_job->done_fence);
> - pm_runtime_put_autosuspend(core->dev);
> - core->in_flight_job = NULL;
> - }
> + rocket_job_next_locked(core);
> }
> }
>
>