mirror of
https://github.com/torvalds/linux.git
synced 2026-10-14 11:54:03 +02:00
drm/amd/display: Fix dead-code panel type detection from DID
[Why] In amdgpu_dm_set_panel_type() the DID fallback branch tested and wrote link->panel_type, while the rest of the function tracked the result in the local variable panel_type. The final assignment unconditionally overwrites link->panel_type from panel_type, so the value derived from DID was always discarded, making the DID branch dead code. [How] Use the local panel_type variable in the DID fallback branch so that the DID result participates in the source priority (VSDB -> DPCD -> DID -> vendor luminance heuristic -> LCD default) and is preserved by the final assignment. Assisted-by: Copilot:Claude-Opus-4.8 Reviewed-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
8fa813b7fd
commit
560cb7437c
|
|
@ -420,11 +420,11 @@ static void amdgpu_dm_set_panel_type(struct amdgpu_dm_connector *aconnector)
|
|||
}
|
||||
|
||||
/* If VSDB and DPCD didn't determine panel type, check DID */
|
||||
if (link->panel_type == PANEL_TYPE_NONE) {
|
||||
if (panel_type == PANEL_TYPE_NONE) {
|
||||
if (display_info->panel_type == DRM_MODE_PANEL_TYPE_LCD)
|
||||
link->panel_type = PANEL_TYPE_LCD;
|
||||
panel_type = PANEL_TYPE_LCD;
|
||||
else if (display_info->panel_type == DRM_MODE_PANEL_TYPE_OLED)
|
||||
link->panel_type = PANEL_TYPE_OLED;
|
||||
panel_type = PANEL_TYPE_OLED;
|
||||
}
|
||||
|
||||
if (panel_type == PANEL_TYPE_NONE) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user