[PATCH] drm/amd/display: Fix a loop timeout in wait_for_fbc_state_changed()
Harry Wentland
harry.wentland at amd.com
Wed Jun 20 14:12:05 UTC 2018
On 2018-06-20 08:05 AM, Dan Carpenter wrote:
> We changed this loop so now it loops 1000 times instead of 10. We need
> to make the counter larger because a uint8_t can't go up to 1000 and
> we need to update the test at the end to test for 1000 instead of 10.
>
> Fixes: 2b6199a1d1b7 ("drm/amd/display: replace msleep with udelay in fbc path")
> Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
Thanks for the patch. An equivalent one is already on-route to be merged: https://patchwork.freedesktop.org/patch/230412/
Harry
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c
> index e2994d337044..8e83ec66fd22 100644
> --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c
> +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c
> @@ -143,7 +143,7 @@ static void wait_for_fbc_state_changed(
> struct dce110_compressor *cp110,
> bool enabled)
> {
> - uint8_t counter = 0;
> + int 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 {
>
More information about the amd-gfx
mailing list