drm/amd/display: Set compbuf size to min at prep prevent overbook crb
authorDuncan Ma <duncanma@amd.com>
Tue, 8 Feb 2022 20:05:09 +0000 (15:05 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 23 Feb 2022 19:26:36 +0000 (14:26 -0500)
commitb51178d6edddbfc8cb4da5b5e9c924f2d24bbcac
tree48fde58d761d73b2479db7ed116d845ae38d3f33
parent5b45b1c8b89f84d01fea8939b672631b51cdf95b
drm/amd/display: Set compbuf size to min at prep prevent overbook crb

[Why]
Detbuffer size is dynamically set for dcn31x. At certain moment,
compbuf+(def size * num pipes) > config return buffer size causing
flickering. This is easily reproducible when MPO is
enabled with two displays.

[How]
At prepare BW, use the min comp buffer size. When it is to
optimize BW, set compbuf size back to maximum possible size.

Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Duncan Ma <duncanma@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c