drm: Convert CPU-invariant uninterruptible waits to TASK_IDLE

These waits are invariant with respect to CPU frequency, so make them use
TASK_IDLE in order to not contribute to load avg.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
[Tashar02: Adapt to msm-5.4]
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
This commit is contained in:
Sultan Alsawaf
2023-11-16 21:06:37 -08:00
committed by kondors1995
parent d0164cdf9a
commit a252ff2d01

View File

@@ -1273,7 +1273,7 @@ void drm_atomic_helper_wait_for_flip_done(struct drm_device *dev,
if (!commit)
continue;
ret = wait_for_completion_timeout(&commit->flip_done, 10 * HZ);
ret = wait_for_common(&commit->flip_done, 10 * HZ, TASK_IDLE);
if (ret == 0)
DRM_ERROR("[CRTC:%d:%s] flip_done timed out\n",
crtc->base.id, crtc->name);
@@ -1825,16 +1825,14 @@ void drm_atomic_helper_wait_for_dependencies(struct drm_atomic_state *old_state)
if (!commit)
continue;
ret = wait_for_completion_timeout(&commit->hw_done,
10*HZ);
ret = wait_for_common(&commit->hw_done, 10 * HZ, TASK_IDLE);
if (ret == 0)
DRM_ERROR("[CRTC:%d:%s] hw_done timed out\n",
crtc->base.id, crtc->name);
/* Currently no support for overwriting flips, hence
* stall for previous one to execute completely. */
ret = wait_for_completion_timeout(&commit->flip_done,
10*HZ);
ret = wait_for_common(&commit->flip_done, 10 * HZ, TASK_IDLE);
if (ret == 0)
DRM_ERROR("[CRTC:%d:%s] flip_done timed out\n",
crtc->base.id, crtc->name);