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: media: rockchip-rga: attach dma_resv release fence at buf_queue
Date: Tue, 05 May 2026 11:08:37 +1000	[thread overview]
Message-ID: <review-patch3-20260429195306.239666-4-mfritsche@reauktion.de> (raw)
In-Reply-To: <20260429195306.239666-4-mfritsche@reauktion.de>

Patch Review

**Same OUTPUT/CAPTURE issue as patch 2**

RGA is an M2M image processor. `rga_buf_queue` handles both source (OUTPUT) and destination (CAPTURE) buffers. The fence is attached unconditionally:
```c
v4l2_m2m_buf_queue(ctx->fh.m2m_ctx, vbuf);
...
(void)vb2_buffer_attach_release_fence(vb);
```

Same fix needed: guard with `V4L2_TYPE_IS_CAPTURE()`.

**Same verbose comment issue**

The 7-line comment block is excessive for a single function call.

---

**Summary of required fixes before this can move past RFC:**

1. Handle the requeue path (`VB2_BUF_STATE_QUEUED`) -- signal or clean up the old fence so re-attach doesn't WARN and leak.
2. Add defensive fence cleanup in `__vb2_queue_cancel`.
3. Guard fence attachment with `V4L2_TYPE_IS_CAPTURE()` in both driver patches (or move the check into the helper itself).
4. Optionally skip allocation when no planes have dmabufs.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-05-05  1:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-29 19:53 [PATCH RFC 0/3] media: videobuf2: opt-in dma_resv producer fences for V4L2 dmabuf exports Markus Fritsche
2026-04-29 19:53 ` [PATCH RFC 1/3] media: videobuf2: add dma_resv release-fence helper Markus Fritsche
2026-05-05  1:08   ` Claude review: " Claude Code Review Bot
2026-04-29 19:53 ` [PATCH RFC 2/3] media: hantro: attach dma_resv release fence at buf_queue Markus Fritsche
2026-05-05  1:08   ` Claude review: " Claude Code Review Bot
2026-04-29 19:53 ` [PATCH RFC 3/3] media: rockchip-rga: " Markus Fritsche
2026-05-05  1:08   ` Claude Code Review Bot [this message]
2026-04-29 21:22 ` [PATCH RFC 0/3] media: videobuf2: opt-in dma_resv producer fences for V4L2 dmabuf exports Nicolas Dufresne
2026-04-30  6:51   ` Christian König
2026-05-05  1:08   ` 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-patch3-20260429195306.239666-4-mfritsche@reauktion.de \
    --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