From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: <20260519140548.28853-2-bence.csokas@arm.com> References: <20260519140548.28853-2-bence.csokas@arm.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Overall Series Review Subject: drm: uapi: Add macro for chipset specific event ID region Author: Bence Csokas Patches: 1 Reviewed: 2026-05-25T22:50:39.045663 --- This is a single-patch cleanup to the DRM UAPI headers. It introduces a `DR= M_EVENT_VENDOR_SPECIFIC(_v)` macro that codifies the existing convention do= cumented in the `struct drm_event` comment: event types `>=3D 0x80000000` a= re chipset-specific. It then converts the three existing in-tree users (exy= nos, virtgpu, vmwgfx) from raw hex constants to the new macro. The patch is straightforward, correct, and all resulting values are bit-ide= ntical to the originals: - `DRM_EXYNOS_G2D_EVENT`: `0x80000000` =E2=86=92 `DRM_EVENT_VENDOR_SPECIFIC= (0x0)` =3D `0x80000000` =E2=9C=93 - `DRM_EXYNOS_IPP_EVENT`: `0x80000002` =E2=86=92 `DRM_EVENT_VENDOR_SPECIFIC= (0x2)` =3D `0x80000002` =E2=9C=93 - `VIRTGPU_EVENT_FENCE_SIGNALED`: `0x90000000` =E2=86=92 `DRM_EVENT_VENDOR_= SPECIFIC(0x10000000)` =3D `0x90000000` =E2=9C=93 - `DRM_VMW_EVENT_FENCE_SIGNALED`: `0x80000000` =E2=86=92 `DRM_EVENT_VENDOR_= SPECIFIC(0x0)` =3D `0x80000000` =E2=9C=93 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 th= at already has bit 31 set (e.g., `DRM_EVENT_VENDOR_SPECIFIC(0x80000001)`) w= ould silently produce a "vendor" event indistinguishable from `DRM_EVENT_VE= NDOR_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 u= sage could prevent future mistakes, but for a UAPI header macro this is pro= bably acceptable as-is. 2. `DRM_VMW_EVENT_FENCE_SIGNALED` and `DRM_EXYNOS_G2D_EVENT` share the same= value `0x80000000`. This is pre-existing =E2=80=94 different drivers handl= e 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