public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/imagination: Count paired job fence as dependency in prepare_job()
Date: Tue, 31 Mar 2026 17:33:24 +1000	[thread overview]
Message-ID: <review-patch1-20260330-job-submission-fixes-cleanup-v1-1-7de8c09cef8c@imgtec.com> (raw)
In-Reply-To: <20260330-job-submission-fixes-cleanup-v1-1-7de8c09cef8c@imgtec.com>

Patch Review

**Status**: Correct fix, Cc: stable appropriate.

This fixes the case where `job_count_remaining_native_deps()` failed to count the paired job fence as a native dependency because `to_pvr_queue_job_fence()` can't resolve it (the parent fence isn't assigned until submission). The fix manually counts it.

The `is_paired_job_fence()` helper is well-factored and immediately reused in the existing `pvr_queue_submit_job_to_cccb()` check:

```c
+static bool
+is_paired_job_fence(struct dma_fence *fence, struct pvr_job *job)
+{
+	/* This assumes "fence" is one of "job"'s drm_sched_job::dependencies */
+	return job->type == DRM_PVR_JOB_TYPE_FRAGMENT &&
+	       job->paired_job &&
+	       &job->paired_job->base.s_fence->scheduled == fence;
+}
```

The `WARN_ON(dma_fence_is_signaled(fence))` in the counting code is a reasonable sanity check - the paired job's scheduled fence shouldn't be signaled before submission.

One minor observation: the comment update `"backed by a UFO"` -> `"already backed by a UFO"` on `to_pvr_queue_job_fence()` is a good clarification to include here since it directly relates to understanding why the paired fence can't be resolved.

**No issues.**

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-03-31  7:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-30  7:56 [PATCH 0/8] drm/imagination: Job submission fixes and cleanup Alessio Belle
2026-03-30  7:56 ` [PATCH 1/8] drm/imagination: Count paired job fence as dependency in prepare_job() Alessio Belle
2026-03-31  7:33   ` Claude Code Review Bot [this message]
2026-03-30  7:56 ` [PATCH 2/8] drm/imagination: Fit paired fragment job in the correct CCCB Alessio Belle
2026-03-31  7:33   ` Claude review: " Claude Code Review Bot
2026-03-30  7:56 ` [PATCH 3/8] drm/imagination: Skip check on paired job fence during job submission Alessio Belle
2026-03-31  7:33   ` Claude review: " Claude Code Review Bot
2026-03-30  7:56 ` [PATCH 4/8] drm/imagination: Rename pvr_queue_fence_is_ufo_backed() to reflect usage Alessio Belle
2026-03-31  7:33   ` Claude review: " Claude Code Review Bot
2026-03-30  7:56 ` [PATCH 5/8] drm/imagination: Rename fence returned by pvr_queue_job_arm() Alessio Belle
2026-03-31  7:33   ` Claude review: " Claude Code Review Bot
2026-03-30  7:56 ` [PATCH 6/8] drm/imagination: Move repeated job fence check to its own function Alessio Belle
2026-03-31  7:33   ` Claude review: " Claude Code Review Bot
2026-03-30  7:56 ` [PATCH 7/8] drm/imagination: Update check to skip prepare_job() for fragment jobs Alessio Belle
2026-03-31  7:33   ` Claude review: " Claude Code Review Bot
2026-03-30  7:56 ` [PATCH 8/8] drm/imagination: Minor improvements to job submission code documentation Alessio Belle
2026-03-31  7:33   ` Claude review: " Claude Code Review Bot
2026-03-31  7:33 ` Claude review: drm/imagination: Job submission fixes and cleanup Claude Code Review Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=review-patch1-20260330-job-submission-fixes-cleanup-v1-1-7de8c09cef8c@imgtec.com \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox