From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: <20260429195306.239666-4-mfritsche@reauktion.de> References: <3d8deeb15581b754e4c061d4c4a13657aa08bc3c.camel@ndufresne.ca> <20260429195306.239666-4-mfritsche@reauktion.de> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 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