Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Medium] drm/i915/alpm: hardware state leak on hot-unplug due to premature 
capability reset
--

commit b6800420511819216ede410fb998491c8d931411
Author: Animesh Manna <[email protected]>

drm/i915/alpm: alpm_init() for DP2.1

This commit initializes ALPM for DP2.1 and separates out ALPM mutex-init
from alpm-init.

> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index 650c8b39270be..b4742bd33cb42 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -6354,6 +6354,7 @@ intel_dp_detect(struct drm_connector *_connector,
>               connector->dp.panel_replay_caps.su_support = false;
>               connector->dp.panel_replay_caps.dsc_support =
>                       INTEL_DP_PANEL_REPLAY_DSC_NOT_SUPPORTED;
> +             intel_dp->alpm_dpcd = 0;

[Severity: Medium]
Does clearing this capability flag during the detect callback cause a 
hardware state leak on hot-unplug?

When an active display is hot-unplugged, intel_dp_detect() runs and zeroes 
intel_dp->alpm_dpcd here. However, userspace will subsequently issue an 
atomic commit to disable the CRTC. 

During that disable sequence, intel_alpm_disable() in intel_alpm.c checks 
intel_dp->alpm_dpcd to see if it should proceed. Since the capability was 
already cleared, the check evaluates to false and the function exits early. 
This skips the register cleanup, leaving the transcoder's ALPM_CTL hardware 
registers enabled.

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=3

Reply via email to