drm/amd/display: Add MALL status readback support for DCN 4.0.1
authorJames Lin <PingLei.Lin@amd.com>
Wed, 24 Jun 2026 07:36:03 +0000 (15:36 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 14 Jul 2026 23:12:35 +0000 (19:12 -0400)
commitcee2f77c774f256676422483e4cad2c38e10d68b
treeec8b81f28fabf41d2e8d72dd18fecb7fa17b38b6
parentfd651b9a3be9e7aba98ac2afacbf10b541d9ba00
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>
drivers/gpu/drm/amd/display/dc/hubbub/dcn401/dcn401_hubbub.c
drivers/gpu/drm/amd/display/dc/hubbub/dcn401/dcn401_hubbub.h
drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.h