drm/amd/display: Blocking invalid 420 modes on HDMI TMDS for DCN314
authorjsg <jsg@openbsd.org>
Mon, 25 Sep 2023 03:09:43 +0000 (03:09 +0000)
committerjsg <jsg@openbsd.org>
Mon, 25 Sep 2023 03:09:43 +0000 (03:09 +0000)
From Leo Chen
a101b1bdd24acf648a55b86d8b429b76e1bd202b in linux-6.1.y/6.1.55
4c6107a653ccf361cb1b6ba35d558a1a5e6e57ac in mainline linux

sys/dev/pci/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;