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/virtio: Freeze and restore hooks to support suspend and resume
Date: Wed, 27 May 2026 14:17:08 +1000	[thread overview]
Message-ID: <review-patch1-20260526192814.179673-2-dongwon.kim@intel.com> (raw)
In-Reply-To: <20260526192814.179673-2-dongwon.kim@intel.com>

Patch Review

**Overall:** Clean extraction of `virtio_gpu_find_vqs()` helper and a well-structured `virtio_gpu_wait_queue()`. The freeze/restore flow is correct.

**Issue 1 — Missing error recovery in freeze (medium severity):**

If `virtio_gpu_wait_queue` times out after `drm_mode_config_helper_suspend()` has already succeeded, the function returns an error but leaves the DRM subsystem in a suspended state:

```c
error = drm_mode_config_helper_suspend(dev);
if (error) {
    DRM_ERROR("suspend error %d\n", error);
    return error;
}

flush_work(&vgdev->obj_free_work);
// ...

error = virtio_gpu_wait_queue(&vgdev->ctrlq, vgdev->ctrlq.vq->num_max);

if (error) {
    DRM_ERROR("suspend error %d\n", error);
    return error;  // DRM still suspended — no recovery
}
```

The error paths after the successful suspend should call `drm_mode_config_helper_resume(dev)` before returning.

**Issue 2 — Redundant min() in wait_queue call site:**

The caller passes `vgdev->ctrlq.vq->num_max` and `virtio_gpu_wait_queue` caps at `vgvq->vq->num_max`. This is harmless (the helper is designed for general use), just noting it.

**Nit — Extra blank lines in freeze between call and error check:**

```c
error = virtio_gpu_wait_queue(&vgdev->ctrlq, vgdev->ctrlq.vq->num_max);

if (error) {
```

Typical kernel style omits the blank line between a function call and its error check. Minor.

---

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-05-27  4:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26 19:28 [PATCH v9 0/3] Virtio-GPU S4 support dongwon.kim
2026-05-26 19:28 ` [PATCH v9 1/3] drm/virtio: Freeze and restore hooks to support suspend and resume dongwon.kim
2026-05-27  4:17   ` Claude Code Review Bot [this message]
2026-05-26 19:28 ` [PATCH v9 2/3] drm/virtio: Add support for saving and restoring virtio_gpu_objects dongwon.kim
2026-05-27  4:17   ` Claude review: " Claude Code Review Bot
2026-05-26 19:28 ` [PATCH v9 3/3] drm/virtio: Add PM notifier to restore objects after hibernation dongwon.kim
2026-05-27  4:17   ` Claude review: " Claude Code Review Bot
2026-05-27  4:17 ` Claude review: Virtio-GPU S4 support Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-04-29 20:47 [PATCH v8 0/3] Virtio-GPU S4 (hibernation) support dongwon.kim
2026-04-29 20:47 ` [PATCH v8 1/3] drm/virtio: Freeze and restore hooks to support suspend and resume dongwon.kim
2026-05-05  1:00   ` Claude review: " 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-20260526192814.179673-2-dongwon.kim@intel.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