]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/amd/display: adjust MALL size available for DCN32 and DCN321
authorSamson Tam <Samson.Tam@amd.com>
Wed, 11 Jan 2023 18:31:31 +0000 (13:31 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 24 Jan 2023 18:26:25 +0000 (13:26 -0500)
commit235fef6c7fd341026eee90cc546e6e8ff8b2c315
tree99aff8dff7857ef742b90bc40e0f82c162f5fd3a
parent01ecd870ce2f06fe9ef5ef67b449e3f24289c575
drm/amd/display: adjust MALL size available for DCN32 and DCN321

[Why]
MALL size available can vary for different SKUs.
Use num_chans read from VBIOS to determine the available MALL size we can use

[How]
Define max_chans for DCN32 and DCN321.
If num_chans is max_chans, then return max_chans as we can access the
 entire MALL space.
Otherwise, define avail_chans as the number of available channels we are
 allowed instead.
Return corresponding number of channels back and use this to calculate
 available MALL size.

Reviewed-by: Nevenko Stupar <Nevenko.Stupar@amd.com>
Acked-by: Alan Liu <HaoPing.Liu@amd.com>
Signed-off-by: Samson Tam <Samson.Tam@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.h
drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
drivers/gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c