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/virtio: Freeze and restore hooks to support suspend and resume Date: Tue, 05 May 2026 11:00:34 +1000 Message-ID: In-Reply-To: <20260429204729.993669-2-dongwon.kim@intel.com> References: <20260429204729.993669-1-dongwon.kim@intel.com> <20260429204729.993669-2-dongwon.kim@intel.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 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