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/panthor: Fix the "done_fence is initialized" detection logic
Date: Tue, 10 Mar 2026 12:25:51 +1000	[thread overview]
Message-ID: <review-overall-20260309103053.211415-1-boris.brezillon@collabora.com> (raw)
In-Reply-To: <20260309103053.211415-1-boris.brezillon@collabora.com>

Overall Series Review

Subject: drm/panthor: Fix the "done_fence is initialized" detection logic
Author: Boris Brezillon <boris.brezillon@collabora.com>
Patches: 8
Reviewed: 2026-03-10T12:25:51.999443

---

This is a single-patch fix for the panthor GPU scheduler addressing a regression introduced by commit 541c8f2468b9 ("dma-buf: detach fence ops on signal v3"). That dma-buf change nullifies `dma_fence::ops` on signal, which broke panthor's `job_release()` logic that relied on `ops != NULL` to determine whether a fence was initialized (via `dma_fence_init()`) vs merely allocated (via `kzalloc`).

The approach — encoding an "initialized" flag in the low bit of the pointer — is a well-known kernel pattern and is sound given `dma_fence` alignment guarantees. The patch is generally well-structured, but I have concerns about correctness in certain paths.

**Verdict:** The fix addresses a real bug and the approach is reasonable, but there are issues that should be addressed before merging.

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-03-10  2:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 10:30 [PATCH] drm/panthor: Fix the "done_fence is initialized" detection logic Boris Brezillon
2026-03-09 10:50 ` Christian König
2026-03-09 11:06   ` Boris Brezillon
2026-03-09 11:05 ` Liviu Dudau
2026-03-09 13:15   ` Boris Brezillon
2026-03-09 14:54     ` Liviu Dudau
2026-03-09 15:32       ` Boris Brezillon
2026-03-09 11:06 ` Nicolas Frattaroli
2026-03-10  2:25 ` Claude Code Review Bot [this message]
2026-03-10  2:25 ` Claude review: " Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-03-09 12:43 [PATCH v2] " Boris Brezillon
2026-03-10  2:23 ` Claude review: " Claude Code Review Bot
2026-03-10  2:23 ` 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-overall-20260309103053.211415-1-boris.brezillon@collabora.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