mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 02:24:24 +02:00
drm/amd/display: Remove unused MaxUsedBW variable
Remove the variable MaxUsedBW from the function
DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation.
As a side-effect, the variables MaxPerPlaneVActiveWRBandwidth and
WRBandwidth are also removed.
This was pointed by clang with the following warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/display_mode_vba_30.c:3043:10:
warning: variable 'MaxUsedBW' set but not used [-Wunused-but-set-variable]
double MaxUsedBW = 0;
^
1 warning generated.
Reviewed-by: André Almeida <andrealmeid@igalia.com>
Signed-off-by: Maíra Canal <mairacanal@riseup.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
54c3e9493c
commit
869618c344
|
|
@ -3037,40 +3037,12 @@ static void DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerforman
|
|||
|
||||
{
|
||||
//Maximum Bandwidth Used
|
||||
double TotalWRBandwidth = 0;
|
||||
double MaxPerPlaneVActiveWRBandwidth = 0;
|
||||
double WRBandwidth = 0;
|
||||
double MaxUsedBW = 0;
|
||||
for (k = 0; k < v->NumberOfActivePlanes; ++k) {
|
||||
if (v->WritebackEnable[k] == true
|
||||
&& v->WritebackPixelFormat[k] == dm_444_32) {
|
||||
WRBandwidth = v->WritebackDestinationWidth[k] * v->WritebackDestinationHeight[k]
|
||||
/ (v->HTotal[k] * v->WritebackSourceHeight[k] / v->PixelClock[k]) * 4;
|
||||
} else if (v->WritebackEnable[k] == true) {
|
||||
WRBandwidth = v->WritebackDestinationWidth[k] * v->WritebackDestinationHeight[k]
|
||||
/ (v->HTotal[k] * v->WritebackSourceHeight[k] / v->PixelClock[k]) * 8;
|
||||
}
|
||||
TotalWRBandwidth = TotalWRBandwidth + WRBandwidth;
|
||||
MaxPerPlaneVActiveWRBandwidth = dml_max(MaxPerPlaneVActiveWRBandwidth, WRBandwidth);
|
||||
}
|
||||
|
||||
v->TotalDataReadBandwidth = 0;
|
||||
for (k = 0; k < v->NumberOfActivePlanes; ++k) {
|
||||
v->TotalDataReadBandwidth = v->TotalDataReadBandwidth
|
||||
+ v->ReadBandwidthPlaneLuma[k]
|
||||
+ v->ReadBandwidthPlaneChroma[k];
|
||||
}
|
||||
|
||||
{
|
||||
double MaxPerPlaneVActiveRDBandwidth = 0;
|
||||
for (k = 0; k < v->NumberOfActivePlanes; ++k) {
|
||||
MaxPerPlaneVActiveRDBandwidth = dml_max(MaxPerPlaneVActiveRDBandwidth,
|
||||
v->ReadBandwidthPlaneLuma[k] + v->ReadBandwidthPlaneChroma[k]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
MaxUsedBW = MaxTotalRDBandwidth + TotalWRBandwidth;
|
||||
}
|
||||
|
||||
// VStartup Margin
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user