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/v3d: Skip CSD when it has zeroed workgroups
Date: Thu, 04 Jun 2026 12:49:58 +1000	[thread overview]
Message-ID: <review-patch2-20260602-v3d-fix-indirect-csd-v3-2-cc79e06e543c@igalia.com> (raw)
In-Reply-To: <20260602-v3d-fix-indirect-csd-v3-2-cc79e06e543c@igalia.com>

Patch Review

**Status: Good**

This patch adds a check in `v3d_csd_job_run()` to skip hardware submission when any workgroup dimension is zero. The check is placed after the existing error check and before setting `active_job`:

```c
if (!V3D_GET_FIELD(job->args.cfg[0], V3D_CSD_QUEUED_CFG0_NUM_WGS_X) ||
    !V3D_GET_FIELD(job->args.cfg[1], V3D_CSD_QUEUED_CFG1_NUM_WGS_Y) ||
    !V3D_GET_FIELD(job->args.cfg[2], V3D_CSD_QUEUED_CFG2_NUM_WGS_Z))
	return NULL;
```

The use of `V3D_GET_FIELD` with the proper field macros (bits [31:16] per `v3d_regs.h:416-429`) is the right approach, extracting only the workgroup count bits rather than checking the whole register value. This correctly handles `cfg[]` values that might have non-zero bits in the lower half but a zero workgroup count in the upper half.

The comment explaining the hardware behavior (0 is interpreted as 65536) is accurate and provides good justification for why this check is needed.

The placement before `v3d->queue[V3D_CSD].active_job = &job->base` is correct — by returning `NULL` before setting `active_job`, the function avoids leaving the queue in a state where it thinks a job is active but no fence was created and no hardware submission occurred. This matches the existing pattern used by the error-path check above it (lines 350-353 in the current tree).

The `Fixes` tag references the original CSD support commit, which is appropriate since the zero-workgroup case was always a latent bug — it just wasn't reachable until indirect CSD was added.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-06-04  2:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-02 11:57 [PATCH v3 0/2] drm/v3d: Fix indirect CSD jobs with zeroed workgroups Maíra Canal
2026-06-02 11:57 ` [PATCH v3 1/2] drm/v3d: Fix vaddr leak when indirect CSD has " Maíra Canal
2026-06-04  2:49   ` Claude review: " Claude Code Review Bot
2026-06-02 11:57 ` [PATCH v3 2/2] drm/v3d: Skip CSD when it " Maíra Canal
2026-06-04  2:49   ` Claude Code Review Bot [this message]
2026-06-04  2:49 ` Claude review: drm/v3d: Fix indirect CSD jobs with " Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-06-02 17:50 [PATCH v4 0/2] " Maíra Canal
2026-06-02 17:50 ` [PATCH v4 2/2] drm/v3d: Skip CSD when it has " Maíra Canal
2026-06-04  2:23   ` Claude review: " Claude Code Review Bot
2026-06-01 19:13 [PATCH v2 0/2] drm/v3d: Fix indirect CSD jobs with " Maíra Canal
2026-06-01 19:13 ` [PATCH v2 2/2] drm/v3d: Skip CSD when it has " Maíra Canal
2026-06-04  3:44   ` Claude review: " Claude Code Review Bot
2026-05-30 19:51 [PATCH 0/2] drm/v3d: Fix indirect CSD jobs with " Maíra Canal
2026-05-30 19:51 ` [PATCH 2/2] drm/v3d: Skip CSD when it has " Maíra Canal
2026-06-04  5:15   ` Claude review: " 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-patch2-20260602-v3d-fix-indirect-csd-v3-2-cc79e06e543c@igalia.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