From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm: uapi: Add macro for chipset specific event ID region
Date: Mon, 25 May 2026 22:50:39 +1000 [thread overview]
Message-ID: <review-overall-20260519140548.28853-2-bence.csokas@arm.com> (raw)
In-Reply-To: <20260519140548.28853-2-bence.csokas@arm.com>
Overall Series Review
Subject: drm: uapi: Add macro for chipset specific event ID region
Author: Bence Csokas <bence.csokas@arm.com>
Patches: 1
Reviewed: 2026-05-25T22:50:39.045663
---
This is a single-patch cleanup to the DRM UAPI headers. It introduces a `DRM_EVENT_VENDOR_SPECIFIC(_v)` macro that codifies the existing convention documented in the `struct drm_event` comment: event types `>= 0x80000000` are chipset-specific. It then converts the three existing in-tree users (exynos, virtgpu, vmwgfx) from raw hex constants to the new macro.
The patch is straightforward, correct, and all resulting values are bit-identical to the originals:
- `DRM_EXYNOS_G2D_EVENT`: `0x80000000` → `DRM_EVENT_VENDOR_SPECIFIC(0x0)` = `0x80000000` ✓
- `DRM_EXYNOS_IPP_EVENT`: `0x80000002` → `DRM_EVENT_VENDOR_SPECIFIC(0x2)` = `0x80000002` ✓
- `VIRTGPU_EVENT_FENCE_SIGNALED`: `0x90000000` → `DRM_EVENT_VENDOR_SPECIFIC(0x10000000)` = `0x90000000` ✓
- `DRM_VMW_EVENT_FENCE_SIGNALED`: `0x80000000` → `DRM_EVENT_VENDOR_SPECIFIC(0x0)` = `0x80000000` ✓
No UAPI ABI break. All three driver headers already `#include "drm.h"`, so the macro resolves correctly.
**Minor observations (not blocking):**
1. The macro uses bitwise OR (`|`), which means a caller passing a value that already has bit 31 set (e.g., `DRM_EVENT_VENDOR_SPECIFIC(0x80000001)`) would silently produce a "vendor" event indistinguishable from `DRM_EVENT_VENDOR_SPECIFIC(0x1)`. This is unlikely to happen in practice, but the macro doesn't guard against it. A comment or `BUILD_BUG_ON` for kernel-internal usage could prevent future mistakes, but for a UAPI header macro this is probably acceptable as-is.
2. `DRM_VMW_EVENT_FENCE_SIGNALED` and `DRM_EXYNOS_G2D_EVENT` share the same value `0x80000000`. This is pre-existing — different drivers handle their own event space, so there's no actual conflict. But the conversion to the macro makes this more visible. Worth noting, not a bug.
**Verdict:** Looks good. Clean mechanical conversion with no value changes.
---
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-25 12:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 14:05 [PATCH resend] drm: uapi: Add macro for chipset specific event ID region Bence Csokas
2026-05-25 12:50 ` Claude Code Review Bot [this message]
2026-05-25 12:50 ` Claude review: " Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-04-08 16:36 [PATCH] " Bence Csokas
2026-04-12 2:13 ` Claude review: " Claude Code Review Bot
2026-04-12 2:13 ` 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-20260519140548.28853-2-bence.csokas@arm.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