]> git.baikalelectronics.ru Git - kernel.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2023 07:50:32 +0000 (08:50 +0100)
commit599a94a5578b3bc0cdb64ace6edb51e488e0a90b
tree718f206c109b80aa8963fe3d00a401ad8b636371
parentbce530a26e338cb79df7e92e9796353ca451563a
drm/amd/display: adjust MALL size available for DCN32 and DCN321

commit 1ecd60ad8fa9849ff216006af1940f9f0606c185 upstream.

[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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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