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: Determine lock-waiting timeout from vblank state
Date: Tue, 28 Apr 2026 14:31:50 +1000	[thread overview]
Message-ID: <review-patch1-20260427150250.699768-2-tzimmermann@suse.de> (raw)
In-Reply-To: <20260427150250.699768-2-tzimmermann@suse.de>

Patch Review

**Purpose:** Switches `vmw_vkms_lock_max_wait_ns()` from reading `du->vkms.period_ns` (the hrtimer period) to reading `vblank->framedur_ns` from the DRM vblank core. This decouples the lock timeout from the timer implementation details.

**Assessment: Looks good.**

The change from:
```c
s64 nsecs = ktime_to_ns(du->vkms.period_ns);
return (nsecs > 0) ? nsecs : 16666666;
```
to:
```c
struct drm_vblank_crtc *vblank = drm_crtc_vblank_crtc(crtc);
if (!vblank || !vblank->framedur_ns)
    return NSEC_PER_SEC / 60;
return vblank->framedur_ns;
```

is semantically equivalent. The fallback value `NSEC_PER_SEC / 60 = 16666666` matches the old hardcoded `16666666`.

**Minor observation:** `drm_crtc_vblank_crtc()` is a simple index into `dev->vblank`, which is allocated by `drm_vblank_init()`. The `!vblank` check is defensive — in practice, if `drm_vblank_init()` succeeded (which is required for `vkms_enabled` to be true), this shouldn't be NULL. But it's harmless and provides safety if the function is called before vblank init, which is reasonable.

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 Code Review Bot [this message]
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 review: " Claude Code Review Bot
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-patch1-20260427150250.699768-2-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