drm/amd/display: update DSC for DCN32
authorRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Thu, 22 Sep 2022 14:06:48 +0000 (10:06 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 6 Oct 2022 16:04:25 +0000 (12:04 -0400)
Update DSC checks in the DCN32 VBA.

Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c

index 75be1e1ce543f919ce96c0cc4274827975bdba9f..8316b1b914c679de67ae6957d817dbfc0c1a10fd 100644 (file)
@@ -2252,9 +2252,8 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
        for (k = 0; k <= mode_lib->vba.NumberOfActiveSurfaces - 1; k++) {
                if (!(mode_lib->vba.DSCInputBitPerComponent[k] == 12.0
                                || mode_lib->vba.DSCInputBitPerComponent[k] == 10.0
-                               || mode_lib->vba.DSCInputBitPerComponent[k] == 8.0
-                               || mode_lib->vba.DSCInputBitPerComponent[k] >
-                               mode_lib->vba.MaximumDSCBitsPerComponent)) {
+                               || mode_lib->vba.DSCInputBitPerComponent[k] == 8.0)
+                               || mode_lib->vba.DSCInputBitPerComponent[k] > mode_lib->vba.MaximumDSCBitsPerComponent) {
                        mode_lib->vba.NonsupportedDSCInputBPC = true;
                }
        }
@@ -2330,16 +2329,15 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
                                if (mode_lib->vba.OutputMultistreamId[k] == k && mode_lib->vba.ForcedOutputLinkBPP[k] == 0)
                                        mode_lib->vba.BPPForMultistreamNotIndicated = true;
                                for (j = 0; j < mode_lib->vba.NumberOfActiveSurfaces; ++j) {
-                                       if (mode_lib->vba.OutputMultistreamId[k] == j && mode_lib->vba.OutputMultistreamEn[k]
+                                       if (mode_lib->vba.OutputMultistreamId[k] == j
                                                && mode_lib->vba.ForcedOutputLinkBPP[k] == 0)
                                                mode_lib->vba.BPPForMultistreamNotIndicated = true;
                                }
                        }
 
                        if ((mode_lib->vba.Output[k] == dm_edp || mode_lib->vba.Output[k] == dm_hdmi)) {
-                               if (mode_lib->vba.OutputMultistreamId[k] == k && mode_lib->vba.OutputMultistreamEn[k])
+                               if (mode_lib->vba.OutputMultistreamEn[k] == true && mode_lib->vba.OutputMultistreamId[k] == k)
                                        mode_lib->vba.MultistreamWithHDMIOreDP = true;
-
                                for (j = 0; j < mode_lib->vba.NumberOfActiveSurfaces; ++j) {
                                        if (mode_lib->vba.OutputMultistreamEn[k] == true && mode_lib->vba.OutputMultistreamId[k] == j)
                                                mode_lib->vba.MultistreamWithHDMIOreDP = true;