Skip to content

Commit d3579f5

Browse files
Ovidiu Buneaalexdeucher
authored andcommitted
drm/amd/display: Fix DML2 watermark calculation
[Why] core_mode_programming in DML2 should output watermark calculations to locals, but it incorrectly uses mode_lib [How] update code to match HW DML2 Cc: Mario Limonciello <mario.limonciello@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Reviewed-by: Charlene Liu <charlene.liu@amd.com> Acked-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Ovidiu Bunea <ovidiu.bunea@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 3ba2a0b commit d3579f5

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9446,13 +9446,13 @@ void dml_core_mode_programming(struct display_mode_lib_st *mode_lib, const struc
94469446
CalculateWatermarks_params->CompressedBufferSizeInkByte = locals->CompressedBufferSizeInkByte;
94479447

94489448
// Output
9449-
CalculateWatermarks_params->Watermark = &s->dummy_watermark; // Watermarks *Watermark
9450-
CalculateWatermarks_params->DRAMClockChangeSupport = &mode_lib->ms.support.DRAMClockChangeSupport[0];
9451-
CalculateWatermarks_params->MaxActiveDRAMClockChangeLatencySupported = &s->dummy_single_array[0][0]; // dml_float_t *MaxActiveDRAMClockChangeLatencySupported[]
9452-
CalculateWatermarks_params->SubViewportLinesNeededInMALL = &mode_lib->ms.SubViewportLinesNeededInMALL[j]; // dml_uint_t SubViewportLinesNeededInMALL[]
9453-
CalculateWatermarks_params->FCLKChangeSupport = &mode_lib->ms.support.FCLKChangeSupport[0];
9454-
CalculateWatermarks_params->MaxActiveFCLKChangeLatencySupported = &s->dummy_single[0]; // dml_float_t *MaxActiveFCLKChangeLatencySupported
9455-
CalculateWatermarks_params->USRRetrainingSupport = &mode_lib->ms.support.USRRetrainingSupport[0];
9449+
CalculateWatermarks_params->Watermark = &locals->Watermark; // Watermarks *Watermark
9450+
CalculateWatermarks_params->DRAMClockChangeSupport = &locals->DRAMClockChangeSupport;
9451+
CalculateWatermarks_params->MaxActiveDRAMClockChangeLatencySupported = locals->MaxActiveDRAMClockChangeLatencySupported; // dml_float_t *MaxActiveDRAMClockChangeLatencySupported[]
9452+
CalculateWatermarks_params->SubViewportLinesNeededInMALL = locals->SubViewportLinesNeededInMALL; // dml_uint_t SubViewportLinesNeededInMALL[]
9453+
CalculateWatermarks_params->FCLKChangeSupport = &locals->FCLKChangeSupport;
9454+
CalculateWatermarks_params->MaxActiveFCLKChangeLatencySupported = &locals->MaxActiveFCLKChangeLatencySupported; // dml_float_t *MaxActiveFCLKChangeLatencySupported
9455+
CalculateWatermarks_params->USRRetrainingSupport = &locals->USRRetrainingSupport;
94569456

94579457
CalculateWatermarksMALLUseAndDRAMSpeedChangeSupport(
94589458
&mode_lib->scratch,

0 commit comments

Comments
 (0)