The MaximumDCCCompressionYSurface variable from the struct vba_vars_st is only used on assignments, so its value is not used on code. So, remove the MaximumDCCCompressionYSurface entry from the struct vba_vars_st. Signed-off-by: Maíra Canal <mairacanal@xxxxxxxxxx> --- .../amd/display/dc/dml/dcn21/display_mode_vba_21.c | 13 +++---------- .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 1 - 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c b/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c index bc8cc21cf3f6..7007b6e16e7d 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c @@ -143,7 +143,7 @@ static bool CalculatePrefetchSchedule( double *VReadyOffsetPix); static double RoundToDFSGranularityUp(double Clock, double VCOSpeed); static double RoundToDFSGranularityDown(double Clock, double VCOSpeed); -static double CalculateDCCConfiguration( +static void CalculateDCCConfiguration( bool DCCEnabled, bool DCCProgrammingAssumesScanDirectionUnknown, unsigned int ViewportWidth, @@ -1072,7 +1072,7 @@ static double RoundToDFSGranularityDown(double Clock, double VCOSpeed) return VCOSpeed * 4 / dml_ceil(VCOSpeed * 4 / Clock, 1); } -static double CalculateDCCConfiguration( +static void CalculateDCCConfiguration( bool DCCEnabled, bool DCCProgrammingAssumesScanDirectionUnknown, unsigned int ViewportWidth, @@ -1087,7 +1087,6 @@ static double CalculateDCCConfiguration( unsigned int *MaxCompressedBlock, unsigned int *Independent64ByteBlock) { - double MaximumDCCCompressionSurface = 0.0; enum { REQ_256Bytes, REQ_128BytesNonContiguous, @@ -1185,25 +1184,19 @@ static double CalculateDCCConfiguration( *MaxUncompressedBlock = 256; *MaxCompressedBlock = 256; *Independent64ByteBlock = false; - MaximumDCCCompressionSurface = 4.0; } else if (Request == REQ_128BytesContiguous) { *MaxUncompressedBlock = 128; *MaxCompressedBlock = 128; *Independent64ByteBlock = false; - MaximumDCCCompressionSurface = 2.0; } else if (Request == REQ_128BytesNonContiguous) { *MaxUncompressedBlock = 256; *MaxCompressedBlock = 64; *Independent64ByteBlock = true; - MaximumDCCCompressionSurface = 4.0; } else { *MaxUncompressedBlock = 0; *MaxCompressedBlock = 0; *Independent64ByteBlock = 0; - MaximumDCCCompressionSurface = 0.0; } - - return MaximumDCCCompressionSurface; } static double CalculatePrefetchSourceLines( @@ -2568,7 +2561,7 @@ static void DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerforman // DCC Configuration mode_lib->vba.ActiveDPPs = 0; for (k = 0; k < mode_lib->vba.NumberOfActivePlanes; ++k) { - locals->MaximumDCCCompressionYSurface[k] = CalculateDCCConfiguration( + CalculateDCCConfiguration( mode_lib->vba.DCCEnable[k], false, // We should always know the direction DCCProgrammingAssumesScanDirectionUnknown, mode_lib->vba.ViewportWidth[k], diff --git a/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h b/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h index 46e69f941bff..a07e97035dd1 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h +++ b/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h @@ -1032,7 +1032,6 @@ struct vba_vars_st { unsigned int DCCYMaxUncompressedBlock[DC__NUM_DPP__MAX]; unsigned int DCCYMaxCompressedBlock[DC__NUM_DPP__MAX]; unsigned int DCCYIndependent64ByteBlock[DC__NUM_DPP__MAX]; - double MaximumDCCCompressionYSurface[DC__NUM_DPP__MAX]; unsigned int BlockHeight256BytesY[DC__NUM_DPP__MAX]; unsigned int BlockHeight256BytesC[DC__NUM_DPP__MAX]; unsigned int BlockWidth256BytesY[DC__NUM_DPP__MAX]; -- 2.37.1