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/vmwgfx: Move vblank handling into separate helper
Date: Tue, 28 Apr 2026 14:31:50 +1000	[thread overview]
Message-ID: <review-patch2-20260427150250.699768-3-tzimmermann@suse.de> (raw)
In-Reply-To: <20260427150250.699768-3-tzimmermann@suse.de>

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

  reply	other threads:[~2026-04-28  4:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-27 15:00 [PATCH v2 0/3] drm/vmwgfx: Use DRM's vblank timer Thomas Zimmermann
2026-04-27 15:00 ` [PATCH v2 1/3] drm/vmwgfx: Determine lock-waiting timeout from vblank state Thomas Zimmermann
2026-04-28  4:31   ` Claude review: " Claude Code Review Bot
2026-04-27 15:00 ` [PATCH v2 2/3] drm/vmwgfx: Move vblank handling into separate helper Thomas Zimmermann
2026-04-28  4:31   ` Claude Code Review Bot [this message]
2026-04-27 15:00 ` [PATCH v2 3/3] drm/vmwgfx: Convert to DRM vblank timers Thomas Zimmermann
2026-04-28  4:31   ` Claude review: " Claude Code Review Bot
2026-04-28  4:31 ` Claude review: drm/vmwgfx: Use DRM's vblank timer 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-patch2-20260427150250.699768-3-tzimmermann@suse.de \
    --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