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: Wed, 27 May 2026 14:17:08 +1000 Message-ID: In-Reply-To: <20260526192814.179673-2-dongwon.kim@intel.com> References: <20260526192814.179673-1-dongwon.kim@intel.com> <20260526192814.179673-2-dongwon.kim@intel.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 =E2=80=94 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 =3D drm_mode_config_helper_suspend(dev); if (error) { DRM_ERROR("suspend error %d\n", error); return error; } flush_work(&vgdev->obj_free_work); // ... error =3D 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 =E2=80=94 no recovery } ``` The error paths after the successful suspend should call `drm_mode_config_h= elper_resume(dev)` before returning. **Issue 2 =E2=80=94 Redundant min() in wait_queue call site:** The caller passes `vgdev->ctrlq.vq->num_max` and `virtio_gpu_wait_queue` ca= ps at `vgvq->vq->num_max`. This is harmless (the helper is designed for gen= eral use), just noting it. **Nit =E2=80=94 Extra blank lines in freeze between call and error check:** ```c error =3D 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 e= rror check. Minor. --- --- Generated by Claude Code Patch Reviewer