[bisected] eDP internal display breaks when logging into Chromebook
Brief summary of the problem:
Happens on a Lenovo 300e 2nd Gen AMD Chromebook, based on the Stoney Ridge platform.
When the device boots, the display is working. But when trying to login or enter guest mode, the display goes black with flickering white/green lines in the top half. See the attached video.
git bisect gives the first bad commit: 4588f7b7dd5f09e "drm/amd/display: Enable ASSR in DM"
The issue is fixed when reverting this change and 9127daa0a8d88a6 "drm/amd/display: Guard ASSR with internal display flag"
This is very similar to #1625 (closed), especially the part about "The garbage appears once the panel was been re-initialized, i.e. it works properly during the kernel boot phase." Here too, the display works on boot, but breaks when logging in, since this re-initialises the display. I believe these issues have the same root cause.
I think the root cause is a mismatch between the ASSR config in the panel and in the processor. On Stoney, the panel_mode is now set to DP_PANEL_MODE_DEFAULT, where before it was DP_PANEL_MODE_EDP. It's set here, since on Stoney the cp_psp->funcs.enable_assr callback is not defined. This means ASSR is not enabled in the panel.
However, it is still enabled in the processor since setup_panel_mode is called with DP_PANEL_MODE_EDP. This is because dp_get_panel_mode only considers the ASSR capability of the panel, not whether ASSR is enabled. So ASSR is enabled in the processor but not in the display.
Hardware description:
- CPU/GPU: AMD A4-9120C RADEON R4, 5 COMPUTE CORES 2C+3G
- System Memory: 4GB
- Display(s): Integrated display "AUO Model 615c Serial Number 0"
- Type of Diplay Connection: eDP
System information:
- Distro name and Version: Chrome OS 14055.0.0
- Kernel version: 5.10.46
- Custom kernel: Chrome OS custom kernel, with backported amd-drm changes up to 'amd-drm-next-5.14-2021-06-09'
- AMD package version: No package
How to reproduce the issue:
- Boot device, display is working.
- Click 'Browse as Guest'.
- Display goes black with flickering white/green lines.
Attached files:
/var/log/messages with drm.debug=0x1ce: messages
Video of display: video_display_broken