提交 6f66ccf0 编写于 作者: R Roman Li 提交者: Alex Deucher

drm/amd/display: fix potential infinite loop in fbc path

- Fixing integer overflow bug in wait_for_fbc_state_changed()
- Correct the max value of retries for the corresponding warning
Signed-off-by: NRoman Li <Roman.Li@amd.com>
Reviewed-by: NTony Cheng <Tony.Cheng@amd.com>
Acked-by: NHarry Wentland <harry.wentland@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 d4fa93e0
......@@ -143,7 +143,7 @@ static void wait_for_fbc_state_changed(
struct dce110_compressor *cp110,
bool enabled)
{
uint16_t counter = 0;
uint32_t counter = 0;
uint32_t addr = mmFBC_STATUS;
uint32_t value;
......@@ -158,7 +158,7 @@ static void wait_for_fbc_state_changed(
counter++;
}
if (counter == 10) {
if (counter == 1000) {
DC_LOG_WARNING("%s: wait counter exceeded, changes to HW not applied",
__func__);
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册