drm/amd/display: Add condition to skip MALL calculations if there is no MALL

[Why & How]
DCN42 has 0 bytes allocated for MALL, but this results in a 0 <= 0 comparison in
CalculateMALLUseForStaticScreen(), which blindly returns true.

This causes DML to calculate with is_using_mall_for_ss[n] = true.
Example:
0 + 0 <= 0  ->  true
        |
        v
   is_using_mall_for_ss[1] = true
        |
        v
   use_one_row_for_frame[1] = true
   PTE_BUFFER_MODE[1]       = true
        |
        v
   dpte_row_height    :     128  ->       808
   dpte_row_width_ub  : 196,608  -> 1,204,224
        |
        +--> DST_Y_PER_PTE_ROW_NOM_L = 808
        |
        +--> N_groups = ceil(1,204,224 / 65,536 / 2) = 10
                 |
                 v
        REFCYC_PER_PTE_GROUP_NOM_L = 8416 (0x20E0)

Currently, DML does not plumb out the programming for PTE_BUFFER_MODE and FORCE_ONE_ROW_FOR_FRAME,
but even adding that programming does not enable the mode to work with these values.

The simplest fix is to just block any opportunistic MALL calculations.

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Ovidiu Bunea <ovidiu.bunea@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Ovidiu Bunea 2026-09-03 16:40:57 -04:00 • committed by Alex Deucher
commit fd81d335f0