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/amdgpu: fix build for CONFIG_DRM_FBDEV_EMULATION=n
Date: Tue, 28 Apr 2026 13:41:56 +1000	[thread overview]
Message-ID: <review-patch1-20260428024942.452389-1-ynorov@nvidia.com> (raw)
In-Reply-To: <20260428024942.452389-1-ynorov@nvidia.com>

Patch Review

**Correctness: Good.** The stub returns `false`, which is semantically correct — if fbdev emulation is disabled, no GEM object can be the fbdev framebuffer. Both callers use the result in a `!drm_fb_helper_gem_is_fb(...)` guard to decide whether to unpin buffers:

```c
// amdgpu_display.c:1777
if (!drm_fb_helper_gem_is_fb(dev->fb_helper, fb->obj[0])) {
    struct amdgpu_bo *robj = gem_to_amdgpu_bo(fb->obj[0]);
    r = amdgpu_bo_reserve(robj, true);
```

```c
// radeon_device.c:1592
if (!drm_fb_helper_gem_is_fb(dev->fb_helper, fb->obj[0])) {
    struct radeon_bo *robj = gem_to_radeon_bo(fb->obj[0]);
    r = radeon_bo_reserve(robj, false);
```

With the stub returning `false`, the `!false` evaluates to `true`, meaning all buffers get unpinned when there's no fbdev — which is the right behavior since there's no kernel fbdev object to protect.

**Function signature: Matches exactly.** The stub's signature matches the real declaration at line 274-275:

```c
bool drm_fb_helper_gem_is_fb(const struct drm_fb_helper *fb_helper,
                             const struct drm_gem_object *obj);
```

**Placement: Correct.** The stub goes right after `#else` on line 276, inside the `#ifdef CONFIG_DRM_FBDEV_EMULATION` / `#else` / `#endif` structure.

**Fixes tag:** Points to the merge commit `02e778f12359` rather than either individual commit. This is appropriate since neither commit in isolation caused the breakage — it only manifested when both sides were merged together.

**Minor note on the subject line:** The subject says "drm/amdgpu" but this is really a fix to `include/drm/drm_fb_helper.h`, a core DRM header. Both amdgpu and radeon benefit from it. A more precise prefix might have been `drm/fbdev-helper`, but this is cosmetic and doesn't affect correctness.

**v2 note:** The changelog says v1 was revised per Thomas Zimmermann's feedback to restore only `drm_fb_helper_gem_is_fb()` (rather than presumably more stubs), which shows appropriate scope reduction.

**No issues found.** The patch is straightforward, correct, and properly scoped.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-04-28  3:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-28  2:49 [PATCH v2] drm/amdgpu: fix build for CONFIG_DRM_FBDEV_EMULATION=n Yury Norov
2026-04-28  3:41 ` Claude Code Review Bot [this message]
2026-04-28  3:41 ` 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-patch1-20260428024942.452389-1-ynorov@nvidia.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