]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm/dp: Sleep properly in dp_hpd_handler kthread
authorStephen Boyd <swboyd@chromium.org>
Thu, 17 Sep 2020 22:44:25 +0000 (15:44 -0700)
committerRob Clark <robdclark@chromium.org>
Sun, 20 Sep 2020 17:12:51 +0000 (10:12 -0700)
commit5f6f8ff2ca5b9576fa16d06729327483a79a9615
treecc7497622078afa7164d09255619ddc67aa52c61
parenteefaf4c9366d7091b6d9ad9eaedc2a3fd821c86d
drm/msm/dp: Sleep properly in dp_hpd_handler kthread

We shouldn't be waiting for an event here with a timeout of 100ms when
we're not in the 'timeout' arm of the if condition. Instead we should be
sleeping in the interruptible state (S) until something happens and we
need to wakeup. Right now this kthread is running almost all the time
because it sleeps for 100ms, wakes up, sees there's nothing to do, and
then starts the process all over again. Looking at top it shows up in
the D state (uninterruptible) because it uses wait_event_timeout(). FIx
this up.

Cc: Tanmay Shah <tanmay@codeaurora.org>
Cc: Kuogee Hsieh <khsieh@codeaurora.org>
Reported-by: Douglas Anderson <dianders@chromium.org>
Fixes: 0e087be8d0ce ("drm/msm/dp: Add DP compliance tests on Snapdragon Chipsets")
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/dp/dp_display.c