Skip to content

Correct a series of off by 1 errors in DML and DML2

Mario Limonciello amd-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4drm/amd/display: Adjust plane init for off by one errordrivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c+1 -12 replies
2/4drm/amd/display: Correct off by one errors in DMLdrivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c+34 -340 replies
3/4drm/amd/display: Correct some suspect code indentationdrivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c+27 -280 replies
4/4drm/amd/display: Correct off by one errors in DML2drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_shared.c+82 -820 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by.

PatchLuke Jones
1/4Reported-and-tested-by
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] Correct a series of off by 1 errors in DML and DML2

From: Mario Limonciello <[email protected]>

Many people have reported a series of issues that lead to divide by zero errors in DML2 code on DCN 3.5.

This divide by zero error is caused by accessing outside of the bound of what is initialized on an array for the number of planes.

The first patch in the series fixes the immediate issue. This patch should go to fixes and stable.

The remaining patches fix what appears to be the same problem in other code in both DML and DML2 that has (presumably) been copy/pasted for loop iterators.

Mario Limonciello (4):
drm/amd/display: Adjust plane init for off by one error drm/amd/display: Correct off by one errors in DML drm/amd/display: Correct some suspect code indentation drm/amd/display: Correct off by one errors in DML2

 .../dc/dml/dcn32/display_mode_vba_32.c        |  68 ++++-----
 .../amd/display/dc/dml2/display_mode_core.c   | 131 +++++++++---------
 .../src/dml2_core/dml2_core_dcn4_calcs.c      |  40 +++---
 .../dml21/src/dml2_core/dml2_core_shared.c    |  50 +++----
 4 files changed, 144 insertions(+), 145 deletions(-)
Signature · 1 line
2.43.0