disp: msm: dp: modify hdcp wait loop to not add to cpu load

Currently, hdcp wait loops uses the wait_event() macro which sets the
status of the thread to WAIT_UNINTERRUPTIBLE and contributes to system
load. The macro wait_event_idle() polls for a changing condition in the
same way but instead sets the thread status to WAIT_IDLE which does not
contribute to system load. This prevents hdcp threads from appearing as
hung threads in system load summaries while still properly polling for
status changes.

Change-Id: Ie6991881d912ba6fca6bb0fd9558633b1fb83492
Signed-off-by: Andrew Bartfeld <quic_abartfel@quicinc.com>
This commit is contained in:
Andrew Bartfeld
2022-10-28 13:02:30 -07:00
parent d3d044ec00
commit c7d1996e90
2 changed files with 4 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.
*/
@@ -970,7 +971,7 @@ static int sde_hdcp_2x_main(void *data)
enum sde_hdcp_2x_wakeup_cmd cmd;
while (1) {
wait_event(hdcp->wait_q,
wait_event_idle(hdcp->wait_q,
!kfifo_is_empty(&hdcp->cmd_q) ||
kthread_should_stop() ||
kthread_should_park());