drm/amd/display: Blocking invalid 420 modes on HDMI TMDS for DCN314
authorLeo Chen <sancchen@amd.com>
Thu, 27 Jul 2023 02:44:13 +0000 (22:44 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Sep 2023 09:11:04 +0000 (11:11 +0200)
[ Upstream commit 4c6107a653ccf361cb1b6ba35d558a1a5e6e57ac ]

[Why & How]
HDMI TMDS does not have ODM support. Filtering 420 modes that
exceed the 4096 FMT limitation on DCN314 will resolve
intermittent corruptions issues.

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Leo Chen <sancchen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c

index 4998b21..5b47ccd 100644 (file)
@@ -4225,7 +4225,9 @@ void dml314_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_
                                }
                                if (v->OutputFormat[k] == dm_420 && v->HActive[k] > DCN314_MAX_FMT_420_BUFFER_WIDTH
                                                && v->ODMCombineEnablePerState[i][k] != dm_odm_combine_mode_4to1) {
-                                       if (v->HActive[k] / 2 > DCN314_MAX_FMT_420_BUFFER_WIDTH) {
+                                       if (v->Output[k] == dm_hdmi) {
+                                               FMTBufferExceeded = true;
+                                       } else if (v->HActive[k] / 2 > DCN314_MAX_FMT_420_BUFFER_WIDTH) {
                                                v->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_4to1;
                                                v->PlaneRequiredDISPCLK = v->PlaneRequiredDISPCLKWithODMCombine4To1;