drm/amdgpu: fix enum odm_combine_mode mismatch
authorjsg <jsg@openbsd.org>
Mon, 27 Mar 2023 03:29:46 +0000 (03:29 +0000)
committerjsg <jsg@openbsd.org>
Mon, 27 Mar 2023 03:29:46 +0000 (03:29 +0000)
From Arnd Bergmann
099bd0a7b363a17e6796896838708d957ef78463 in linux-6.1.y/6.1.16
087bad7eb1f6945f8232f132953ecc2bda8bd38d in mainline linux

sys/dev/pci/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c
sys/dev/pci/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c
sys/dev/pci/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c

index d3b5b6f..6266b07 100644 (file)
@@ -3897,14 +3897,14 @@ void dml20_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
                                        mode_lib->vba.PlaneRequiredDISPCLKWithODMCombine = mode_lib->vba.PixelClock[k] / 2
                                                        * (1 + mode_lib->vba.DISPCLKDPPCLKDSCCLKDownSpreading / 100.0);
 
-                               locals->ODMCombineEnablePerState[i][k] = false;
+                               locals->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_disabled;
                                mode_lib->vba.PlaneRequiredDISPCLK = mode_lib->vba.PlaneRequiredDISPCLKWithoutODMCombine;
                                if (mode_lib->vba.ODMCapability) {
                                        if (locals->PlaneRequiredDISPCLKWithoutODMCombine > mode_lib->vba.MaxDispclkRoundedDownToDFSGranularity) {
-                                               locals->ODMCombineEnablePerState[i][k] = true;
+                                               locals->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_2to1;
                                                mode_lib->vba.PlaneRequiredDISPCLK = mode_lib->vba.PlaneRequiredDISPCLKWithODMCombine;
                                        } else if (locals->HActive[k] > DCN20_MAX_420_IMAGE_WIDTH && locals->OutputFormat[k] == dm_420) {
-                                               locals->ODMCombineEnablePerState[i][k] = true;
+                                               locals->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_2to1;
                                                mode_lib->vba.PlaneRequiredDISPCLK = mode_lib->vba.PlaneRequiredDISPCLKWithODMCombine;
                                        }
                                }
@@ -3957,7 +3957,7 @@ void dml20_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
                                locals->RequiredDISPCLK[i][j] = 0.0;
                                locals->DISPCLK_DPPCLK_Support[i][j] = true;
                                for (k = 0; k <= mode_lib->vba.NumberOfActivePlanes - 1; k++) {
-                                       locals->ODMCombineEnablePerState[i][k] = false;
+                                       locals->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_disabled;
                                        if (locals->SwathWidthYSingleDPP[k] <= locals->MaximumSwathWidth[k]) {
                                                locals->NoOfDPP[i][j][k] = 1;
                                                locals->RequiredDPPCLK[i][j][k] = locals->MinDPPCLKUsingSingleDPP[k]
index edd098c..989d83e 100644 (file)
@@ -4008,17 +4008,17 @@ void dml20v2_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode
                                        mode_lib->vba.PlaneRequiredDISPCLKWithODMCombine = mode_lib->vba.PixelClock[k] / 2
                                                        * (1 + mode_lib->vba.DISPCLKDPPCLKDSCCLKDownSpreading / 100.0);
 
-                               locals->ODMCombineEnablePerState[i][k] = false;
+                               locals->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_disabled;
                                mode_lib->vba.PlaneRequiredDISPCLK = mode_lib->vba.PlaneRequiredDISPCLKWithoutODMCombine;
                                if (mode_lib->vba.ODMCapability) {
                                        if (locals->PlaneRequiredDISPCLKWithoutODMCombine > MaxMaxDispclkRoundedDown) {
-                                               locals->ODMCombineEnablePerState[i][k] = true;
+                                               locals->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_2to1;
                                                mode_lib->vba.PlaneRequiredDISPCLK = mode_lib->vba.PlaneRequiredDISPCLKWithODMCombine;
                                        } else if (locals->DSCEnabled[k] && (locals->HActive[k] > DCN20_MAX_DSC_IMAGE_WIDTH)) {
-                                               locals->ODMCombineEnablePerState[i][k] = true;
+                                               locals->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_2to1;
                                                mode_lib->vba.PlaneRequiredDISPCLK = mode_lib->vba.PlaneRequiredDISPCLKWithODMCombine;
                                        } else if (locals->HActive[k] > DCN20_MAX_420_IMAGE_WIDTH && locals->OutputFormat[k] == dm_420) {
-                                               locals->ODMCombineEnablePerState[i][k] = true;
+                                               locals->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_2to1;
                                                mode_lib->vba.PlaneRequiredDISPCLK = mode_lib->vba.PlaneRequiredDISPCLKWithODMCombine;
                                        }
                                }
@@ -4071,7 +4071,7 @@ void dml20v2_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode
                                locals->RequiredDISPCLK[i][j] = 0.0;
                                locals->DISPCLK_DPPCLK_Support[i][j] = true;
                                for (k = 0; k <= mode_lib->vba.NumberOfActivePlanes - 1; k++) {
-                                       locals->ODMCombineEnablePerState[i][k] = false;
+                                       locals->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_disabled;
                                        if (locals->SwathWidthYSingleDPP[k] <= locals->MaximumSwathWidth[k]) {
                                                locals->NoOfDPP[i][j][k] = 1;
                                                locals->RequiredDPPCLK[i][j][k] = locals->MinDPPCLKUsingSingleDPP[k]
index 1d84ae5..b7c2844 100644 (file)
@@ -4102,17 +4102,17 @@ void dml21_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
                                        mode_lib->vba.PlaneRequiredDISPCLKWithODMCombine = mode_lib->vba.PixelClock[k] / 2
                                                        * (1 + mode_lib->vba.DISPCLKDPPCLKDSCCLKDownSpreading / 100.0);
 
-                               locals->ODMCombineEnablePerState[i][k] = false;
+                               locals->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_disabled;
                                mode_lib->vba.PlaneRequiredDISPCLK = mode_lib->vba.PlaneRequiredDISPCLKWithoutODMCombine;
                                if (mode_lib->vba.ODMCapability) {
                                        if (locals->PlaneRequiredDISPCLKWithoutODMCombine > MaxMaxDispclkRoundedDown) {
-                                               locals->ODMCombineEnablePerState[i][k] = true;
+                                               locals->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_2to1;
                                                mode_lib->vba.PlaneRequiredDISPCLK = mode_lib->vba.PlaneRequiredDISPCLKWithODMCombine;
                                        } else if (locals->DSCEnabled[k] && (locals->HActive[k] > DCN21_MAX_DSC_IMAGE_WIDTH)) {
-                                               locals->ODMCombineEnablePerState[i][k] = true;
+                                               locals->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_2to1;
                                                mode_lib->vba.PlaneRequiredDISPCLK = mode_lib->vba.PlaneRequiredDISPCLKWithODMCombine;
                                        } else if (locals->HActive[k] > DCN21_MAX_420_IMAGE_WIDTH && locals->OutputFormat[k] == dm_420) {
-                                               locals->ODMCombineEnablePerState[i][k] = true;
+                                               locals->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_2to1;
                                                mode_lib->vba.PlaneRequiredDISPCLK = mode_lib->vba.PlaneRequiredDISPCLKWithODMCombine;
                                        }
                                }
@@ -4165,7 +4165,7 @@ void dml21_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
                                locals->RequiredDISPCLK[i][j] = 0.0;
                                locals->DISPCLK_DPPCLK_Support[i][j] = true;
                                for (k = 0; k <= mode_lib->vba.NumberOfActivePlanes - 1; k++) {
-                                       locals->ODMCombineEnablePerState[i][k] = false;
+                                       locals->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_disabled;
                                        if (locals->SwathWidthYSingleDPP[k] <= locals->MaximumSwathWidth[k]) {
                                                locals->NoOfDPP[i][j][k] = 1;
                                                locals->RequiredDPPCLK[i][j][k] = locals->MinDPPCLKUsingSingleDPP[k]
@@ -5230,7 +5230,7 @@ void dml21_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
                        mode_lib->vba.ODMCombineEnabled[k] =
                                        locals->ODMCombineEnablePerState[mode_lib->vba.VoltageLevel][k];
                } else {
-                       mode_lib->vba.ODMCombineEnabled[k] = false;
+                       mode_lib->vba.ODMCombineEnabled[k] = dm_odm_combine_mode_disabled;
                }
                mode_lib->vba.DSCEnabled[k] =
                                locals->RequiresDSC[mode_lib->vba.VoltageLevel][k];