From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: accel/amdxdna: Fix suspend failure after enabling turbo mode Date: Wed, 11 Feb 2026 16:14:59 +1000 Message-ID: In-Reply-To: <20260210191652.312000-1-lizhi.hou@amd.com> References: <20260210191652.312000-1-lizhi.hou@amd.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Mailer: Claude Code Patch Reviewer Overall Series Review Subject: accel/amdxdna: Fix suspend failure after enabling turbo mode Author: Lizhi Hou Patches: 1 Reviewed: 2026-02-11T16:14:59.929102 --- This single-patch series addresses a suspend/resume issue in the AMD XDNA accelerator driver related to turbo mode and hardware clock gating. The fix is straightforward and addresses a clear bug where enabling turbo mode (which disables clock gating) causes subsequent suspend operations to fail because suspend requires clock gating to be enabled. **High-Level Assessment:** The patch correctly identifies that the suspend path needs to re-enable clock gating before suspending the device, and the resume path needs to ensure firmware is initialized before modifying clock gating settings. However, there are several concerns with the implementation: 1. **Error handling**: The added call to `aie2_runtime_cfg()` in `aie2_hw_stop()` doesn't check return values 2. **Ordering logic**: The swap of `aie2_pm_init()` and `aie2_mgmt_fw_init()` in the resume path needs better justification 3. **Missing cleanup**: If the new ordering causes failures, the cleanup path may be incorrect 4. **Documentation**: No comments explain the ordering requirements **Recommendation:** Needs revision to address error handling and provide clearer rationale for the initialization order change. --- --- Generated by Claude Code Patch Reviewer