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/vmwgfx: Move vblank handling into separate helper Date: Tue, 28 Apr 2026 14:31:50 +1000 Message-ID: In-Reply-To: <20260427150250.699768-3-tzimmermann@suse.de> References: <20260427150250.699768-1-tzimmermann@suse.de> <20260427150250.699768-3-tzimmermann@suse.de> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review **Purpose:** Extracts the vblank event handling and CRC work scheduling from `vmw_vkms_vblank_simulate()` into a new `vmw_vkms_handle_vblank_timeout()` function that matches the `handle_vblank_timeout` callback signature (`bool (*)(struct drm_crtc *)`). **Assessment: Looks good.** The split is mechanical and correct. The new `vmw_vkms_handle_vblank_timeout()` contains the vblank handling logic: ```c bool vmw_vkms_handle_vblank_timeout(struct drm_crtc *crtc) { ... locked = vmw_vkms_vblank_trylock(crtc); ret = drm_crtc_handle_vblank(crtc); WARN_ON(!ret); if (!locked) return true; ... return true; } ``` The function always returns `true` (restart the timer), which preserves the existing behavior: the old code only returned `HRTIMER_NORESTART` when `vmw_vkms_handle_vblank_timeout()` returned false, but it never does. The commit message correctly notes this: "returns true to restart the next vblank timeout even if it could not acquire vmwgfx's vblank lock." The remaining `vmw_vkms_vblank_simulate()` wrapper is a thin shim that handles the hrtimer-specific forward logic and delegates to the new helper. This wrapper is then cleanly removed in patch 3. The declaration in `vmwgfx_vkms.h` is correctly added. No issues. --- --- Generated by Claude Code Patch Reviewer