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/amd/display: Drop brightness caching in amdgpu_dm Date: Thu, 04 Jun 2026 14:54:32 +1000 Message-ID: In-Reply-To: <20260531114908.1693426-10-superm1@kernel.org> References: <20260531114908.1693426-1-superm1@kernel.org> <20260531114908.1693426-10-superm1@kernel.org> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review **Concern: Get_brightness now returns errors directly** After this patch, `amdgpu_dm_backlight_get_brightness` returns `amdgpu_dm_backlight_get_level(dm, i)` which can return `-EINVAL`. The backlight core's `get_brightness` callback should handle this, but verify the backlight sysfs `actual_brightness` attribute handler deals with negative returns correctly. **Concern: Resume path no longer restores backlight** The patch removes: ```c - /* set the backlight after a reset */ - for (i = 0; i < dm->num_of_edps; i++) { - if (dm->backlight_dev[i]) - amdgpu_dm_backlight_set_level(dm, i, dm->brightness[i]); - } ``` The comment says "DRM core will restore it next time it's on", but this depends on the DRM core atomic commit path restoring `connector->state->luminance` during resume. Is this guaranteed? The `drm_atomic_helper_commit_encoder_bridge_enable` path does restore it, but only if the full modeset path is taken during resume. If the DC layer does a shortcut resume (the `if (dc_enable_dmub_notifications(adev->dm.dc))` early return path at the top of `dm_resume`), no modeset happens and backlight won't be restored. --- Generated by Claude Code Patch Reviewer