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: Tue, 05 May 2026 11:00:34 +1000 [thread overview]
Message-ID: <review-patch1-20260429204729.993669-2-dongwon.kim@intel.com> (raw)
In-Reply-To: <20260429204729.993669-2-dongwon.kim@intel.com>
Patch Review
This patch adds `virtgpu_freeze()` / `virtgpu_restore()` and extracts `virtio_gpu_find_vqs()` as a reusable helper. The refactoring of `virtio_gpu_init()` to call the new helper is clean.
**Issue 1 (medium): `wait_event_timeout` return values ignored in freeze**
```c
wait_event_timeout(vgdev->ctrlq.ack_queue,
vgdev->ctrlq.vq->num_free == vgdev->ctrlq.vq->num_max,
5 * HZ);
wait_event_timeout(vgdev->cursorq.ack_queue,
vgdev->cursorq.vq->num_free == vgdev->cursorq.vq->num_max,
5 * HZ);
```
If either wait times out, the function proceeds to `del_vqs()` without warning. This means in-flight commands could be silently lost. At minimum a `DRM_WARN` on timeout would help debugging; better would be to return an error from freeze, which would abort the hibernation attempt.
**Observation: `del_vqs()` called via `config->del_vqs` vs direct**
In `virtgpu_freeze()`:
```c
vdev->config->del_vqs(vdev);
```
This is fine and matches the style used in `virtio_gpu_deinit()`.
Otherwise the patch is straightforward and correct. The helper extraction is clean.
---
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-05 1:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 Code Review Bot [this message]
2026-04-29 20:47 ` [PATCH v8 2/3] drm/virtio: Add support for saving and restoring virtio_gpu_objects dongwon.kim
2026-05-05 1:00 ` Claude review: " Claude Code Review Bot
2026-04-29 20:47 ` [PATCH v8 3/3] drm/virtio: Add PM notifier to restore objects after hibernation dongwon.kim
2026-05-05 1:00 ` Claude review: " Claude Code Review Bot
2026-05-05 1:00 ` Claude review: Virtio-GPU S4 (hibernation) support 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-20260429204729.993669-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