]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/amd/display: Use mdelay to avoid context switch
authorMartin Tsai <martin.tsai@amd.com>
Thu, 26 Dec 2019 08:19:47 +0000 (16:19 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 16 Jan 2020 19:16:40 +0000 (14:16 -0500)
[why]
The rapid msleep operation causes the white line garbage when
DAL check flip pending status in SetVidPnSourceVisibility.
To execute this msleep will induce context switch, and longer
delay could cause worse garbage situation.

[how]
To replace msleep with mdelay.

Signed-off-by: Martin Tsai <martin.tsai@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c

index 89920924a1546368b784f3ef5bdef7d19deb3b82..f07899e270f59017cb53de216b6375300073fde5 100644 (file)
@@ -1642,9 +1642,9 @@ void dcn20_program_front_end_for_ctx(
                        struct hubp *hubp = pipe->plane_res.hubp;
                        int j = 0;
 
-                       for (j = 0; j < TIMEOUT_FOR_PIPE_ENABLE_MS
+                       for (j = 0; j < TIMEOUT_FOR_PIPE_ENABLE_MS*1000
                                        && hubp->funcs->hubp_is_flip_pending(hubp); j++)
-                               msleep(1);
+                               mdelay(1);
                }
        }