drm/amd/display: Add MALL status readback support for DCN 4.0.1

[why]
The IGT test igt@amdgpu/amd_mall@static-screen always fails on DCN 4.0.1
 because debugfs reports "mall enabled: no" even when MALL is
actually active. This is because the DCN 4.0.1 hubbub function table is
missing the .get_mall_en callback, so capabilities_show() always sees
mall_in_use as false.

[how]
Reuse hubbub32_get_mall_en() for DCN 4.0.1 since the DCHUBBUB_ARB_MALL_CNTL
register layout is identical to DCN 3.2:
- Register the DCHUBBUB_ARB_MALL_CNTL register offset in dcn401_resource.h
- Add MALL_PREFETCH_COMPLETE and MALL_IN_USE mask/shift definitions in
  dcn401_hubbub.h
- Wire up .get_mall_en = hubbub32_get_mall_en in hubbub4_01_funcs

Reviewed-by: ChiaHsuan (Tom) Chung <chiahsuan.chung@amd.com>
Signed-off-by: James Lin <PingLei.Lin@amd.com>
Signed-off-by: George Zhang <george.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
James Lin 2026-06-24 15:36:03 +08:00 committed by Alex Deucher
parent fd651b9a3b
commit cee2f77c77
3 changed files with 7 additions and 3 deletions

View File

@ -1250,7 +1250,8 @@ static const struct hubbub_funcs hubbub4_01_funcs = {
.program_compbuf_segments = dcn401_program_compbuf_segments,
.wait_for_det_update = dcn401_wait_for_det_update,
.program_arbiter = dcn401_program_arbiter,
.hubbub_read_reg_state = hubbub3_read_reg_state
.hubbub_read_reg_state = hubbub3_read_reg_state,
.get_mall_en = hubbub32_get_mall_en
};
void hubbub401_construct(struct dcn20_hubbub *hubbub2,

View File

@ -133,7 +133,9 @@
HUBBUB_SF(DCHUBBUB_CTRL_STATUS, ROB_OVERFLOW_STATUS, mask_sh),\
HUBBUB_SF(DCHUBBUB_CTRL_STATUS, ROB_OVERFLOW_CLEAR, mask_sh),\
HUBBUB_SF(DCHUBBUB_CTRL_STATUS, DCHUBBUB_HW_DEBUG, mask_sh),\
HUBBUB_SF(DCHUBBUB_CTRL_STATUS, CSTATE_SWATH_CHK_GOOD_MODE, mask_sh)
HUBBUB_SF(DCHUBBUB_CTRL_STATUS, CSTATE_SWATH_CHK_GOOD_MODE, mask_sh),\
HUBBUB_SF(DCHUBBUB_ARB_MALL_CNTL, MALL_PREFETCH_COMPLETE, mask_sh),\
HUBBUB_SF(DCHUBBUB_ARB_MALL_CNTL, MALL_IN_USE, mask_sh)
bool hubbub401_program_urgent_watermarks(
struct hubbub *hubbub,

View File

@ -622,7 +622,8 @@ int dcn401_get_power_profile(const struct dc_state *context);
SR(DCHUBBUB_MEM_PWR_MODE_CTRL), \
SR(DCHUBBUB_TIMEOUT_DETECTION_CTRL1), \
SR(DCHUBBUB_TIMEOUT_DETECTION_CTRL2), \
SR(DCHUBBUB_CTRL_STATUS)
SR(DCHUBBUB_CTRL_STATUS), \
SR(DCHUBBUB_ARB_MALL_CNTL)
/* DCCG */